Re: Using Cursors
From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 01/25/05
- Next message: mark baekdal: "RE: User functions or Views?"
- Previous message: Aaron Weiker: "Re: What exactly is a query plan (or a SQL plan for that matter)"
- In reply to: galenboyerdev_at_hotpop.com: "Re: Using Cursors"
- Next in thread: galenboyerdev_at_hotpop.com: "Re: Using Cursors"
- Reply: galenboyerdev_at_hotpop.com: "Re: Using Cursors"
- Reply: Jon Waterhouse: "Re: Using Cursors"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 25 Jan 2005 18:19:41 +0100
Galen,
> Actually, Oracle guidelines for a similar type operation are much
> different than SQLServer in that they highly recommend not to use the
> temp table solution, but instead, inline views and let Oracle decide
> how to do it. Works quite well in my experience. I rarely need the
> temp table solution when I code Oracle. So, not only do they
> recommend set based solutions, but they recommend it even more
> strongly than SQLServer.
Hmm, I'm surprised to see that "SQL Server recommends temp table solution". Where did you see that?
Often, you can use temp tables, table variables, views or quite simply incorporate the logic inside
one statement. If you have any MS documentation that recommends a temp table solution over set based
logic, I'd appreciate if you can post it here so we can let MS know about this.
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/ http://www.sqlug.se/ <galenboyerdev@hotpop.com> wrote in message news:7jm132v1.fsf@hotpop.com... > Hugo Kornelis <hugo@pe_NO_rFact.in_SPAM_fo> writes: > >> On Tue, 25 Jan 2005 08:31:22 -0500, >> boyer@BOYER.i-did-not-set--mail-host-address--so-tickle-me wrote: >> >> (snip) >>>> One thing I did learn from posts in thisd and other groups, is that >>>> triggers in Oracle are executed once for each row affected. If this is >>>> true >>> >>>This is not true. You can write many type of triggers in Oracle. >>> >>> Row, Statement, Before, After, Instead of. >> >> Hi Galen, >> >> Ah! I (obviously) didn't know that. Thanks for the information. > > No prob. > >> >> (snip) >>>Set based coding is the norm in Oracle environments. Cursors have >>>their place, but all teachers of Oracle should say, first do it with >>>sets. >> >> I think that the above statement holds for all serious databases. > > Actually, Oracle guidelines for a similar type operation are much > different than SQLServer in that they highly recommend not to use the > temp table solution, but instead, inline views and let Oracle decide > how to do it. Works quite well in my experience. I rarely need the > temp table solution when I code Oracle. So, not only do they > recommend set based solutions, but they recommend it even more > strongly than SQLServer. > > -- > Galen Boyer
- Next message: mark baekdal: "RE: User functions or Views?"
- Previous message: Aaron Weiker: "Re: What exactly is a query plan (or a SQL plan for that matter)"
- In reply to: galenboyerdev_at_hotpop.com: "Re: Using Cursors"
- Next in thread: galenboyerdev_at_hotpop.com: "Re: Using Cursors"
- Reply: galenboyerdev_at_hotpop.com: "Re: Using Cursors"
- Reply: Jon Waterhouse: "Re: Using Cursors"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|