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.
Author |
Topic |
sreekanth939
Starting Member
12 Posts |
Posted - 2010-05-06 : 02:27:46
|
hi,My table details r like this : column1 column2 column3 A P1 1 A P2 2 A P3 3 B P1 4 B P2 5 B P3 6 D P1 7 E P2 8 F P3 9i need a select query which givs reslut likethis:if in where cond i put, column2=p1column1 P1A 1B 4D 7,if in where cond i put, column2=p2columns1 P2A 2B 5E 8help me pls!!!!!!!!!! |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-05-06 : 13:34:13
|
just do likeSELECT column1,column3FROM TableWHERE column2=@val then pass required value through @val. @val should be declared as a parameter.------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|