Saturday 15 February 2014

oracle - Concatenate variable to table element to compare three tables in SQL -



oracle - Concatenate variable to table element to compare three tables in SQL -

i'm using alpha anywhere take sql query company uses create grid. query follows:

select t.name,cat.description,i.item_num,i.type_of_unit,i.brand,i.pack,i.description2 cim i, tname t, cim cat 'p'||i.price_book_code=t.nameid , i.price_book_group=cat.item_num , i.category!=95 , i.buyer_num!=8 , cat.warehouse_num=0 , i.broken_case != 'y' , i.item_num not in (select item_num proprietary_items) order t.name,cat.description,i.description2, type_of_unit;

in clause, 'p' concatenated i.price_book_code equal t.nameid because values have p @ beginning.

this query works fine in sql-developer, alpha anywhere not run it. claims invalid token @ 'p' level. apparently type of concatenation not compatible portable sql. there other way can concatenate , compare?

thank you, howard

the concat function should work. here's illustration of using in clause:

select * dual concat('foo','bar') = 'foobar';

sql oracle concatenation

No comments:

Post a Comment