hi,
if in SQL I have a condition like ‘select from table1 where col1 = “test1” or col1 = “test2”’, how do I translate its in Q?
hi,
if in SQL I have a condition like ‘select from table1 where col1 = “test1” or col1 = “test2”’, how do I translate its in Q?
q)select from table1 where (col1 = test1) or (col1 = test2)
or:
q)select from table1 where col1 in (test1;test2)
sorry the statment SQL is : ‘select from table1 where (col1 = “test1” and col2=“test2” or (col1 = “test2”’ and col2 = “test1)”
Il giorno martedì 18 dicembre 2012 15:39:32 UTC+1, Gregorio Occhiogrosso ha scritto:
hi,
if in SQL I have a condition like ‘select from table1 where col1 = “test1” or col1 = “test2”’, how do I translate its in Q?
sorry the statment SQL is : ‘select from table1 where (col1 = “test1” and col2=“test2”) or (col1 = “test2”’ and col2 = “test1)”
Il giorno martedì 18 dicembre 2012 15:42:58 UTC+1, Nathan ha scritto:
q)select from table1 where (col1 = test1) or (col1 = test2)
or:
q)select from table1 where col1 in (test1;test2)
select from table1 where ((col1 = test1) and (col2=test2)) or ((col1 = test2) and (col2 = test1))
Alternatively:
q)conds:((test1;test2);(test1;test2));
q)select from table1 where in[flip(col1;col2);conds]
tnx it work
Il giorno martedì 18 dicembre 2012 15:50:25 UTC+1, Nathan ha scritto:
select from table1 where ((col1 = test1) and (col2=test2)) or ((col1 = test2) and (col2 = test1))