Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!fernwood!oracle!news From: rmanalac@oracle.com (Roderick Manalac) Newsgroups: comp.databases Subject: Re: ORACLE Dynamic SQL Problem Message-ID: Date: 20 Sep 90 04:11:12 GMT References: <9588@arctic.nprdc.arpa> Sender: news@oracle.com Organization: Oracle Corp., Belmont CA Lines: 19 carroll@nprdc.navy.mil (Larry Carroll) writes: select 'insert into aim.agency(agency_id, agency)' || ' ' || 'values (' || agency_id || ',' || agency || ');' ^^^^^^ from agency; since agency returns the agency name, it needs to be ^^^^^^ enclosed with quotes for valid sql syntax. If you use quotes around agency it will return the literal word agency. How can I get the quote in there? --Any ideas? Try '''' || angency || '''' where you just had agency before. Roderick Manalac Oracle Corp.