Results 1 to 10 of 10
Thread: SQL IF's
Jan 12, 2005, 12:13 #1
- Join Date
- Jan 2002
- Omaha, NE
- 0 Post(s)
- 0 Thread(s)
I use sql server 2000 and I'm hoping someone can help me.
I inherited a system that controls some layouts of webpages through a database. One table has a NumberOfCols field that contains the information for the number of columns in the layout. What I'm looking to do is return the value "A" if the number is 1, "A,B" if the the number is 2, and "A,B,C" if the number is 3.
A simple query to return the data would be
WHERE cid = 100 and sid = 2
I assume you would use some IF's but I'm unsure how.
Thanks"Oh, you hate your job? Why didn't you say so? There's a support group for that.
It's called EVERYBODY, and they meet at the bar."