Cast varchar to an integer in Teradata -


here have:

select * trans transid in (

select cast(trim(firstname) int) customer trim(firstname) between '0' , '9999999999999999' , custid not in (select custid address) )

have numerical values in firstname column have trace trans table, in values in firstname column transid's.

getting error: select failed. 2620: format or data contains bad character

your fails because it's true '0foo', too.

what's teradata release?

in td14 use regular expression:

where regexp_instr(trim(firstname), '^[0-9]+$') > 0 

before need udf, eisinteger or eisbigint of ebay udfs


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -