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 2005 Forums
 Transact-SQL (2005)
 select top

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2007-03-27 : 05:08:40
what's wrong with this syntax

select @geographic=top 1 geographic from dialcodes where @tempdestination like code + '%' ORDER BY len(code) desc

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-27 : 05:14:19
[code]
select top 1 @geographic = geographic from dialcodes where @tempdestination like code + '%' ORDER BY len(code) desc
[/code]


KH

Go to Top of Page
   

- Advertisement -