Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 TSQL assistance

Author  Topic 

mark_b
Starting Member

24 Posts

Posted - 2008-12-30 : 14:41:50
Hi all,

first things ... Happy holidays and happy new year ... ok now onto my problem. I am sure its something really easy, but i think the christmas turkey is still weighing down on me!

I am building an inventory set of tables as follows :

ServerInfo - one line per server, PK UNIQUE of ServerName

Network - one line per network card, FK of ServerName (1 server can have many network)

Disk - one line per drive, FK of ServerName (1 server can have many disk drives)

Memory - one line per memory dim, FK of ServerName (1 server can have many memory modules)

CPU - one line per physical CPU, FK of ServerName (1 server can have many cpus)


The idea is that i want to dynamically create a web page from the information contained in these databases.

At the moment i am trying to work out a way of producing one line per server that will have all the information from each of these tables on it, but cant work out a way to handle the 1 to many tables.

I have been looking at recursive sql queries, but these seem to be more about parent-child relationships within the same table rather than being way of extracting multiple entries.

Am i missing something really obvious here?

Will give this some more thought, but if you guys and gals have any pointers they would be greatfully received.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-30 : 14:50:15
so whats your expected output format. As you obviously cant return all the assocuiated values when you make it 1 record per server.
Go to Top of Page
   

- Advertisement -