Archives of the TeradataForum
Message Posted: Wed, 14 Nov 2012 @ 10:30:33 GMT
I have a table with ?only one column?Request_Id char(20) and one data 'jeeva' in that column.
Below are the queries I am using and the corresponding output
1. select * from table_name where Request_Id ?= 'jeeva'
2. select * from table_name where cast(Request_Id as char(20)) = 'jeeva'
3. select * from table_name where Request_Id like '%a'
Output: No Output
4. select * from table_name where trim(Request_Id) like '%a'
5. select * from artemis_app.trim_1
My question here is why the 3rd query not able to produce any output... For Char(20) excluding those 5 characters if the remaining ?are filled with spaces it should not return any output for the first query itself...
How is this like operator working for char fields?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|