cancel
Showing results for 
Search instead for 
Did you mean: 

Brand New to qSql

mkoon
New Contributor

Just got started with qsql.

how to I compare 2 columns of type string.  childID and parentID are of type string

 

select from data where childID like parentID

 

 

2 ACCEPTED SOLUTIONS

SJT
Valued Contributor

If it’s an exact match you can use Match Each ~'.

 

select from data where childID ~' parentID

 

 

View solution in original post

If it's not an exact match, you could wrap the second column in wildcards characters and use Like Each like'

select from data where childID like' ("*",'parentID,'"*")

 Note - this assumes that the parentID has less characters than childID

View solution in original post

2 REPLIES 2

SJT
Valued Contributor

If it’s an exact match you can use Match Each ~'.

 

select from data where childID ~' parentID

 

 

If it's not an exact match, you could wrap the second column in wildcards characters and use Like Each like'

select from data where childID like' ("*",'parentID,'"*")

 Note - this assumes that the parentID has less characters than childID