where clause with a @ in it


where clause with a @ in it

I'm not sure if this is the right sub-forum, but I'm looking into some old teradata SQL that we've been using for at least 2 years. the query has the following in the where clause C.sec_last_name_1 NOT like '@%'

The @ makes VB.net 2005 think it's supposed to be a parameter, but the query runs fine in Teradata Sql Assistant.

I'd like to know what this symbol or phrasing represents and is possible an alternate way of doing this without the @ sign so vb.net doesn't get confused about it?

Re: where clause with a @ in it

Ok so apparently it's a literal is there a way in Teradata to use chr(40) or something that let's me enter an ascii value instead of the @ literal.

I need to build something like this: where column not like chr(40)+'%'

Not sure if teradata has a way to use ascii values?


Re: where clause with a @ in it

Hi Maslow:

where column not like '40'xc || '%

'40'xc -> "x" indicates it's a hex string and "c" it's representing a char