I have written a procedure, which will accept values dynamically & executes. In this I can insert values manually, but through program data is not inserting.
SET v_QUERY = 'INSERT INTO FR_1
(SELECT '''||v_DATABASE||''','''||v_TABLE_NAME||''','''||v _COLUMN_NAME||''','''||v_COLUMN_TYPE||''','||v_COL UMN_NAME||' FROM '||v_DATABASE||'.'||v_TABLE_NAME||' FETCH FIRST '||SAMPLE||' ROWS ONLY)';
INSERT INTO FR_1
'VARCHAR',LAST_NAME FROM SAMPLE.VE.PATTERN_TEST
FETCH FIRST 8 ROWS ONLY);
what I need to change when I am doing this dynamically.
Kindly forgive me if it is a basic thing as I am learning now.
have you looked at prepare statement? I am guessing that is what you have left out. I know a few folks in your last few queries to the forum here have pointed you to the documentation and samples database. Have you tried looking through them?