Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
LIKE '%1' Not returning expected records
Message
From
12/07/2010 10:45:43
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
LIKE '%1' Not returning expected records
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01472231
Message ID:
01472231
Views:
112
I have a query like this:
SELECT [PolicyNumber]
	FROM [dbo].[Policies]	
		WHERE ([PolicyNumber] LIKE '%1')
this returns no records.

If I change it to this:
SELECT [PolicyNumber]
	FROM [dbo].[Policies]	
		WHERE ([PolicyNumber] LIKE '%')
then I get two records, one with PolicyNumber = '00001'

Why doesn't my first query pull this record out?

PolicyNumber is defined as nchar(10).
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Next
Reply
Map
View

Click here to load this message in the networking platform