temporary tables in stored procedures/parameter views vs stored procedures 
Author Message
 temporary tables in stored procedures/parameter views vs stored procedures

What is the cost of creating a cursor by
using a remote view (eg, a select statement eminating from the front end)
using a server based view ( the select statement is a view definition in
the database) or
using a stored procedure on the database  and called via SQLEXEC to create
the cursor?
I seem to have more success using temporary tables in stored procs rather
than views. I'm beginning to think its not a good idea to select into t1
for example, but to select into #t1, but it seems easier in sps than in
views. GO makes the temp tables go out of scope unless it's the last piece
of the script!
I also need to deal with the issue of parameter passing and outer joins.
These are specifiable in the front end, but I've found it more efficient to
write the sql than play with the view designer, and examine the sql at arms
length. Are sps the only vehicle that accept parameters?
I got here because the SQL I needed had to do a distinct on a text type, so
I was backed into creating the result set in stages ( hence the temp
tables) where I create the substrate that will accommodate the join I neeed
to include a text field.
Thanks all for your pateince and help
Drew



Sat, 26 Aug 2000 03:00:00 GMT
 
 [ 1 post ] 

 Relevant Pages 

1. Stored procedure dependancy on tables, views and other stored procedures

2. image field from stored procedure vs view vs table

3. Passing multiple parameters for a parameter using temporary stored procedures

4. temporary tables vs. stored procedures

5. Storing the result of a stored procedure call in a temporary table

6. Calling a stored procedure with parameters from another stored procedure

7. Calling a stored procedure with parameters from another stored procedure

8. Error at obtaining output parameters of the stored procedure, calling other stored procedure

9. ado recordsets from stored procedures, stored procedures have input parameters

10. output parameters stored procedures / extended stored procedures

11. ado recordsets from stored procedures, stored procedures have input parameters

12. Many Simple Stored Procedures VS. Few Complex Stored Procedures


 
Powered by phpBB® Forum Software