Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
zahid.sabreen
Starting Member
14 Posts |
Posted - 2011-01-20 : 02:27:28
|
Hi ALL,CREATE OR REPLACE PROCEDURE BASE1."GET_CP_JDBC_ORACLE" ( cp_code in VARCHAR2, cp_cursor out SYS_REFCURSOR)------------------------------------------------------------------------CAN ANYONE PLEASE assist me how to write a similar ref cursor in t-sql using sql server 2000 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2011-01-20 : 03:36:28
|
| In SQLServer you don't need to output any reference cursorCREATE OR REPLACE PROCEDURE BASE1."GET_CP_JDBC_SQL" ([b]@/[b]cp_code in VARCHAR2)go select * from mytble where mycol = @cp_code endIn SQL EXEC GET_CP_JDBC_SQL(cp_code=15)In VB/Other assign the SP to a New RecordSet object. the (recordset) output from the SP will be assigned to the VB/Other object. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-01-20 : 10:12:49
|
| CREATE PROCEDURE GET_CP_JDBC_SQL(@cp_code VARCHAR(100))asselect * from mytble where mycol = @cp_code GOEXEC GET_CP_JDBC_SQL @cp_code=15MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|