MSSQL TSQL to Oracle PL/SQL 
Author Message
 MSSQL TSQL to Oracle PL/SQL

Hi.

Can somebody please give me the equivalent of these MSSQL TSQL in Oracle
PL/SQL:

 DECLARE





')')

Basically, all I wanted to do is to dynamically create the SQL
statement, with variables replacing what's supposed to be an object
(i.e. Table's name, Column's Name)....

Please help.

Thanks.

Mio Marquez
Delphi Developer



Tue, 23 Oct 2001 03:00:00 GMT
 MSSQL TSQL to Oracle PL/SQL

Quote:

> Hi.

> Can somebody please give me the equivalent of these MSSQL TSQL in Oracle
> PL/SQL:

>  DECLARE





> ')')

> Basically, all I wanted to do is to dynamically create the SQL
> statement, with variables replacing what's supposed to be an object
> (i.e. Table's name, Column's Name)....

> Please help.

> Thanks.

> Mio Marquez
> Delphi Developer

Hi,

you can pass dynmic SQl  to the database using

the   DBMS_SQL package which is shipped with your Database Server.

example:

declre
   v_cursor integer := dbms_sql.open_cursor;
   table_name varchar2(30)       := 'CUSTOMER ';
   colum_string     varchar2(30) :=  'CustomerKey' ;
   values_string    varchar2(30) := '12345';

begin

   dbms_sql.parse(v_cursor,'INSERT INTO '||'table_name'||' VALUES    
('||column_string ||'),VALUES ('||value_string ||') ,DBMS.sql.v7);

dbms_sql.close_curosr(V_cursor);

end;

For exact syntax rule please  refer to the manual.

Regards steffen



Fri, 26 Oct 2001 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. NH-Concord-105856--ORACLE-API-PL/SQL-Oracle PL/SQL Programmer Analyst

2. NH-Concord-105856--ORACLE-API-PL/SQL-Oracle PL/SQL Programmer Analyst

3. NH-Concord-105856--ORACLE-API-PL/SQL-Oracle PL/SQL Programmer Analyst

4. NH-Concord-105856--ORACLE-API-PL/SQL-Oracle PL/SQL P/A

5. 23467-NC-RALEIGH/DURHAM-ORACLE-PL/SQL-PowerBuilder-Oracle PL/SQL Programmer

6. 23467-NC-RALEIGH/DURHAM-ORACLE-PL/SQL-PowerBuilder-Oracle PL/SQL Programmer

7. SQL-92, Migrate PL/SQL at ORACLE into PL/SQL at SQL Server 7.0

8. pl sql to tsql

9. TSQL versus PL/SQL

10. tsql vs. pl/sql

11. LUXEMBOURG-245730--ORACLE-PL/SQL-ANALYSTE PROGRAMMEUR ORACLE PL/SQL

12. LUXEMBOURG-245730--ORACLE-PL/SQL-ANALYSTE PROGRAMMEUR ORACLE PL/SQL


 
Powered by phpBB® Forum Software