Using like in Teradata for multiple values -


i have requirement have select multiple usernames table based on condition.

username_table: username_column -------- nicky nolan megan fox federar fager 

query be:

select username_column  username_table  username_column ('n%','megan'); 

this give result:

username_column -------- nicky nolan megan 

here comes question: want put ('n%','megan') in table populated business users. table user_filter.

user_filter_table: user_filter_column ----------------- n% megan 

i have changed query below filter table.

select username_column  username_table  username_column (select user_filter_column user_filter_table); 

weirdly gives below result:

username_column -------- megan 

why query skipping n%?

could please help?

appreciate in advance.

thanks santhosh

like not ignore trailing blanks.

'nicky' 'n% ' -> false 'nicky ' 'n% ' -> true 

change datatype varchar or add trim:

where username_column (select trim(trailing user_filter_column) user_filter_table); 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -