Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Dynamic SQL

Re: Dynamic SQL

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: Thu, 10 Feb 2000 08:56:01 +0200
Message-ID: <87tne5$rbk$1@ctb-nnrp1.saix.net>


[i personally hate these stupid crossposting question - so crosspostings to other newsgroup have been nuked in this posting]

My Name wrote in message <38A21B7D.C4C673E6_at_mindspring.com>...
>I am having problem with this dynamic sql because of the single quote
>around foo. Is there a way around it?
>
>select 'select * from '||table_name|| ' where sample_column = 'foo''
>from user_tables where table_name like '%BLAH';

SELECT
  "SELECT * FROM "||table_name||
  "WHERE sample_column = 'foo'"
FROM user_tables
WHERE table_name LIKE '%BLAH';

Some suggestions though. I do not like to reply to postings where the writer is called "My Name". Please have the courtesy to use your real name (preferably) or a nickname. I also detest cross postings. Decide which newsgroup is the best to answer your question and post it there. Crosspostings are simply rude and (IMO) very arrogant.

regards,
Billy Received on Thu Feb 10 2000 - 00:56:01 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US