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 2000 Forums
 SQL Server Development (2000)
 prog SQL

Author  Topic 

tweety
Starting Member

1 Post

Posted - 2004-08-26 : 02:24:34
Hello All,

I am trying to do a program which can select multi columns from the same column,each column has a criteria
Example

given the following record:

type date time ssn
---- --------- ----- --------
sa1 12/3/2004 1 03454
sa2 12/3/2004 2 67689
.
.
sa1 13/3/2004 1 77896

I wish to create like this table per day:

type 1 2 3 4 24
----- -- -- -- -- ----
sa1 03454 67689

Is this possible???.
[/size=3]

timmy
Master Smack Fu Yak Hacker

1242 Posts

Posted - 2004-08-26 : 02:42:23
It is possible - sounds like you want to run some sort of cross-tab query a-la MS Access.
This link explains how to simulate in SQL:
http://www.sqlteam.com/item.asp?ItemID=2955
Go to Top of Page
   

- Advertisement -