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 2008 Forums
 Transact-SQL (2008)
 query

Author  Topic 

nicklibee
Starting Member

2 Posts

Posted - 2015-01-09 : 02:07:01
Dear all,
I have following table

id id1 id2 id3 id4 description
1 1 0 0 0 A
2 1 1 0 0 B
3 1 1 1 0 C
4 1 1 1 1 D


6 1 2 0 0 BB
7 1 2 1 0 CC
8 1 2 1 1 DD

if user searches for D, i want to display A-B-C-D

if user searches for DD, i want to display A-BB-CC-DD

pls help me to generate sql

thanks
nick

nicklibee

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2015-01-09 : 09:10:35
select description where @user_search_parameter >= description
Go to Top of Page
   

- Advertisement -