Viewing 15 posts - 316 through 330 (of 378 total)
Hi greatheep,
Something unorthodox....have you tried to introduce a separate table for keeping the status, with the new table forming a 1-1 relationship with the original. The idea behind it is...
April 29, 2009 at 11:41 pm
For those that are using cursors or are considering using them for accessing various tables depending on some condition there is as I mentioned before the option to make a...
April 29, 2009 at 9:10 am
sharad sinha (4/29/2009)
Use separate queries ...1 for each database...and then return the union of these resultsets...The problem with this approach is that the number of history databases keep...
April 29, 2009 at 8:26 am
I am happy to take a look at it, but right now I have to finish some actual work :(. In the meantime if you can make a test case...
April 29, 2009 at 7:39 am
Thanks min.li for the complement and as you I am happy with the outcome.
Be aware though that technically CTEs are not strictly required for this solution, they do however really...
April 29, 2009 at 5:55 am
Back...
First I modified one of the source tables after looking at the queries.
create nonclustered index ix_TestData_DataID on dbo.TestData ( DataID );
I also added one more result column to my previous...
April 29, 2009 at 5:19 am
Again, I don't see anything that needs a cursor, let me have a go at it!
April 29, 2009 at 4:21 am
Stored procedures aren't bad when they are used for guiding a procedure of a series of actions; it is what they are for basically. What is bad is procedural LOOPING...
April 28, 2009 at 10:19 am
What is counter intuitive to people new to SQL Server is that each statement in a batch carries quite a large overhead. It’s an overhead that is reasonable small in...
April 28, 2009 at 9:51 am
JJ B (4/28/2009)
CROSS APPLY isn't much more than a fancy correlated sub-query with all of the same advantages and disadvantages...
Thanks Jeff and Lynn. I knew that CROSS APPLY wouldn't...
April 28, 2009 at 9:15 am
min.li (4/28/2009)
The real environment where this function to be used, the 'TestData' table is not really large. Or to be exact, the TestData table is large, but...
April 28, 2009 at 8:58 am
I did a quick optization of your own code which is interesting to know in case the time to alter existing code is limited!
I changed the declaration of the cursor...
April 28, 2009 at 7:39 am
Back min.li ( I couldn't resist the challenge)
First I modified your test case in one important way!
alter table dbo.TestData add constraint pk_TestData primary key clustered ( RowNumber );
Adding a clustered...
April 28, 2009 at 7:05 am
Thank you min.li, I ran the test code and that works and is a good starting point. I will take a deeper look at the actual code later today, problably...
April 28, 2009 at 5:54 am
min.li (4/28/2009)
I recently had to use curosr to do a function in my work. Although I knew I should try to avoid cursor, but could not find a way. I...
April 28, 2009 at 4:31 am
Viewing 15 posts - 316 through 330 (of 378 total)