PL/SQL (MOSC)

MOSC Banner

How to appending string into one variable using loop

edited May 23, 2013 2:57AM in PL/SQL (MOSC) 4 commentsAnswered
 hi,
I want to create below dynamic SQL query.  

SELECT A.CUSTOMER_ID, B.MANUFACTURER_ID, B.MANUFACTURER_COUNT FROM CUSTOMER_INFO A , C77VAMn.v_od_manufacturer_count B WHERE A.EC_SERVER_SECURITY_CODE = '77VAMn' UNION 
SELECT A.CUSTOMER_ID, B.MANUFACTURER_ID, B.MANUFACTURER_COUNT FROM CUSTOMER_INFO A , CrLEuVr.v_od_manufacturer_count B WHERE A.EC_SERVER_SECURITY_CODE = 'rLEuVr';

for that I wrote one procedure as below. becuase some value in the above sql are dynamic like schema name and A.EC_SERVER_SECURITY_CODE. but i am facing problem in appending a string, the below procedure return only. . "SELECT A.CUSTOMER_ID, B.MANUFACTURER_ID, B.MANUFACTURER_COUNT FROM CUSTOMER_INFO A , CrLEuVr.v_od_manufacturer_count B WHERE A.EC_SERVER_SECURITY_CODE = 'rLEuVr' UNION"

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center