Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

concatenation in dynamic query -- Error

436511May 14 2009 — edited May 14 2009
dear all

my following concatenation code works fine in a dynamic function as i return value in a single variable:

query_str := 'SELECT STOCK'
|| '||'
|| ' DMS FROM '
|| ' ARTICLE'
|| ' WHERE ART_NO = :ARTNO';

-- Stock and DMS are two different fields.

but i need a static Sring between two fields it give error, i try following:

query_str := 'SELECT STOCK'
|| '||'
|| 'Dms is '
|| '||'
|| ' DMS FROM '
|| ' ARTICLE'
|| ' WHERE ART_NO = :ARTNO';

It gives error 'Unknown Dms is'

Kindly guide me

Regards

Sayeed
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 11 2009
Added on May 14 2009
9 comments
923 views