Problem with sql like
Posted
by phenevo
on Stack Overflow
See other posts from Stack Overflow
or by phenevo
Published on 2010-04-16T09:48:23Z
Indexed on
2010/04/16
9:53 UTC
Read the original article
Hit count: 154
c#
|sql-server
Hi,
I'm writing sql query to my SqlCommand, and some part of them looks like:
WHERE Path like N'+(select top 1 path from [Paths] where objectcode=@objectCode and objecttype=@objectType)+%' order by path desc,objecttype desc
I get no records , bu when I wrote the same in sql server 2005 i have plenty rows...
where path like (select top 1 path from [Paths] where objectcode='eg' and objecttype='0')+'%' order by path desc
What's wrong ??
@objectType is 'eg'
© Stack Overflow or respective owner