Viewing 15 posts - 1 through 15 (of 36 total)
A nice quest! I like the solution for its clever use of the index.
However, you depend on a table to deliver the lookup-values for the age-column (in this case master..spt_values...
December 6, 2010 at 1:22 am
manojkanoi,
I can't do the complete job for you, but here's a suggestion how to construct an UPDATE...FROM query in general:
update ProductAlias
set .....
FROM Products ProductAlias
inner join SalesTotalTemp
RIGHT OUTER JOIN SeqNumberTemp ON...
December 13, 2004 at 2:10 am
I have seen a similar behaviour caused by different locking strategies. It's sometimes not clear to me, why SQL server uses row-level locking or page-level or table-level-locking, but sometimes a...
December 13, 2004 at 1:57 am
It's not clear to me what you're trying to achieve. Pls explain or post some code.
Obviously you're using a cursor (there is a FETCH). Why not
INSERT target_table SELECT...
December 13, 2004 at 1:41 am
Thank you everybody for your support in this matter.
@aj Ahrens: Your Loop is nice, but has performance disadvantages. In addition, I would have to add some logic to...
December 3, 2004 at 3:26 am
OK, stupid me, here's a first shot. Does anybody have anything better ? shorter? faster ?
declare @STARTDATE datetime
declare @ENDDATE datetime
select @STARTDATE ='1.1.2004' , @ENDDATE='31.1.2004'
if...
November 30, 2004 at 7:26 am
How do you connect? What's your connection string ? Do you also get timeouts in Query Analyzer when accessing the same records as your app ?
To me it sounds like...
October 6, 2004 at 4:39 am
It's a tricky question and I don't have a real answer for you, but to me it looks like SQL Profiler reports two types of locks to you: "real" locks and...
October 6, 2004 at 4:34 am
Good idea, but it did not change the server's behavior.
I have checked the query plan - it is identical. Both DBs run in the same SQL Server instance on a single...
October 6, 2004 at 1:06 am
I would also try "TCP" instead of "named pipes". And check the virus scanner on the server to make sure it doesn't block anything. Maybe exclude the SQL server directories...
October 5, 2004 at 9:09 am
Yes, we do have a daily backup. But I don't know when the inconsistency was introduced and I would have to go back month by month until I find a...
February 24, 2004 at 7:40 am
if ProductID is a char, then try this:
declare @string_var varchar(255)
select @string_var = ""
select @string_var = @string_var + ProductID from tbl_a
print @string_var
When I first saw this, I could't believe...
February 16, 2004 at 7:15 am
Does any of these offer a snapshot ?
Not as far as I know them - "READ UNCOMMITTED" reads everything, even stuff that's only half way through, and the other three (READ...
February 11, 2004 at 4:51 am
> Even when different users run queries on different databases, stored on different hard drives
So it can not be Harddisk I/O. My disks are not accessed that much either....
January 14, 2004 at 2:36 am
OK, it may sound a little weird, but how about the following experiment: shrink the ORPostDetail table so it doesn't contain 150 Million rows but maybe just a few hundred...
November 6, 2003 at 10:06 am
Viewing 15 posts - 1 through 15 (of 36 total)