sql - Ignored characters in Where-Clause? -


i have following problem:

i try select below 'g-' seems ignores - , selects g , below.

select * tablea columna > 'g-' order columna  

if use > 'g-t' ignores '-' totally, giving me things 'gt...'

the sorting value of '-' lower 1 't' 'g-' lower 'gt'.

so

select * tablea columna > 'g-' order columna  

will return 'gt', but

select * tablea columna < 'g-' order columna  

won't. '-' not ignored, it's lower 't'.

of course, same goes if try using columna > 'g-t', same reasons.

if want select starts 'g-', use like:

select * tablea columna 'g-%' order columna  

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -