Re: Pro*C --- How to pass a value into a host variable !!

From: Scott Urman <surman_at_oracle.com>
Date: 23 Mar 1995 18:13:48 GMT
Message-ID: <3ksdos$ff1_at_dcsun4.us.oracle.com>


In article <3kqvoc$6k0_at_portal.gmu.edu>, "Yih-feng Hwang (CS 688)" <yhwang> writes:
|> Hi there,
|>
|> I have a problem about how to pass a value (string) into a host variable
|> ( :name_of_table and :name_of_attribute) in a SQL (listed below)
|>
|> EXEC SQL SELECT *
|> FROM :name_of_table
|> WHERE :name_of_attribute;
|>
|>
|> Any suggestions/comments will be very useful for myself !!
|>
|> Thanks in advanced,
|>
|> yhwang_at_fusion.site.gmu.edu
|>
You need to use dynamic SQL. Since this is a query, probably method 3 or method 4. Check out the precompiler manual. You can't use host variables for table names or where clauses, so you have to go with dynamic SQL. Received on Thu Mar 23 1995 - 19:13:48 CET

Original text of this message