PL/SQL (MOSC)

MOSC Banner

select variable

edited Aug 6, 2010 3:53AM in PL/SQL (MOSC) 12 commentsAnswered
 I am trying to select in a loop a number (214) of columns for one specific ROWID but getting errors, this is what I have been trying, this is part of a stored procedure.

The column names are test1, test2, test3, test4.......test214

v_test_fail  NUMBER := 1; 

LOOP    
v_test_no := 'test' || TRIM(TO_CHAR(v_test_fail));
select v_test_no INTO v_test_gen from ns_insprep where rowid = v_rowid;        
IF UPPER(v_test_gen) = 'FAIL' THEN        
UPDATE common       
SET test_fail = 'F'        
WHERE TRIM(idno) = TRIM(v_user_lic) AND TRIM(macno) = TRIM(v_insp_macno);         
EXIT;        

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