Reputation
1,515
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
2 12
Newest
 Nice Answer
Impact
~45k people reached

May
21
awarded  Nice Answer
May
21
answered Selecting rows from same name table from multiple databases in single result set
May
20
comment Sudden poor SELECT performance on a large table with existing indexes
What does your explain plan look like?
May
20
comment How do I find gaps between ranges of numbers?
Does this need to be a set based query, or would it be ok to solve this with a little PL/SQL coding ?
May
14
awarded  Citizen Patrol
May
14
answered How to display the query result separately for each item in an IN clause?
May
14
revised Large update taking too long; looks like it is updating more records than I have
improved ordering
May
8
revised How to get a column of the select to be “cumulative” (like in excel)?
Added the same where clause to the inline subquery as in the main query
May
8
answered How to get a column of the select to be “cumulative” (like in excel)?
May
8
revised Large update taking too long; looks like it is updating more records than I have
added 25 characters in body
May
8
answered Large update taking too long; looks like it is updating more records than I have
May
7
answered Triggers on Insert or Update SQL Server (Spatial)
Apr
16
comment How can I replace the cursor in the below query?
Well, it's hard to say. You either need to put some serious effort into analyzing your procedure and rewriting the code in it's entirety. Failing that, you should ( like @Spörri suggested ), at least start with declaring your cursor as FAST_FORWARD. You might also want to remove the max selection statement from within the cursor, since it's redundant to run this for each iteration. If you need the max value, you can always move that statement to outside of the cursor. Also, the deletion from tmpFinalResult doesn't seem to server any purpose.
Apr
16
comment How can I replace the cursor in the below query?
Possibly if you deconstruct the statement within the procedure you could rewrite this a set based operation. How complex is the logic in the procedure ?
Apr
16
comment How can I replace the cursor in the below query?
Is the procedure call ( core.usp_GetMonitoringPeriod ) required ? If so, you can't really avoid using a row-by-row processing method.
Apr
8
comment SQL Server 2012 Express installation failed
Have you tried running the SQLServer service under a different user account ?
Mar
26
awarded  Yearling
Mar
16
answered Single select from template record oracle
Jan
9
comment How to create script file with PL/SQL?
Depending on your client, you might actually also want to try to look into using the DMBS_OUTPUT package and simply just write the output to the output screen of your client, and then saving that result as a file. It's not very elegant, but it would work.
Jan
9
answered Using Oracle Datapump when target table has additional column