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
 Transact-SQL (2000)
 Sql Query Help

Author  Topic 

saidev
Posting Yak Master

101 Posts

Posted - 2006-09-11 : 20:05:22
Hi Guys,
I have couple of fields in a table called TEMP. ID1, ID2 and so on.

ID1 ID2

1 5
2 4
3 3
4 2
5 1


what i want is if i select 1 from ID1 and click the button then i want to display the data in GUI related to 1 in ID2.
can you guys help me with the query. Appreciate your help
Thanks,

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-11 : 20:17:01
SELECT ID2
FROM TEMP
WHERE ID1 = @id

Tara Kizer
Go to Top of Page

blindman
Master Smack Fu Yak Hacker

2365 Posts

Posted - 2006-09-12 : 00:11:59
Truly an inspired piece of code. I shall have to use that in my next project. Of course, only after bumping of the NZDF factor a notch...

"I have HAD it with these muthu-f$#%in' cursors in my muthu-f$#%in' database!"
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-09-12 : 12:35:29
I was pretty impressed with it.

Tara Kizer
Go to Top of Page
   

- Advertisement -