Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 5th, 2004, 05:09 AM
Registered User
 
Join Date: Jan 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to uskiranj
Default dynamic-sql-cursor

hi all,
i would like to have a function with two parameters.one is coloumn name and another one is table. using that table name i have to fetch the multiple records into the cursor which is dynamic, how can i do that. plz reply me if u know.
thanks&regards,
kiran kumar jonnalagadda
india

 
Old July 5th, 2004, 05:54 AM
Registered User
 
Join Date: Mar 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Uskiranj,

What i understand from the problem is that you have to pass the table name and column to the sql query which will accordingly return you the recordset...
Now in order to implement this i guess you need to have a dynamic sql and also a dynamic cursor...since the number of records returned are more than one i guess it is better to use the oracle supplied package DBMS_SQL for building up and executing your sql query...

If you need some help with the DBMS_SQL package use the follwing link
http://download-west.oracle.com/docs...sql.htm#998120


reagrding the dynamic cursor you can use Ref Cursor..for more info
http://download-west.oracle.com/docs...5_ora.htm#1554





Similar Threads
Thread Thread Starter Forum Replies Last Post
Magnetic Cursor - Target Area Cursor? gcarcass .NET Framework 2.0 1 May 5th, 2008 07:20 AM
Oracle Cursor - SQL Plus gbagdona Oracle 3 October 1st, 2006 04:25 AM
Use returned cursor in another PL/SQL proc robertogalbiati Oracle 0 January 5th, 2006 12:19 PM
PL/SQL Cursor help Wikked Oracle 1 March 12th, 2005 01:19 AM
Dynamic SQL jbenson001 SQL Server 2000 4 January 12th, 2005 11:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.