Viewing 6 posts - 49,546 through 49,552 (of 49,552 total)
There are actually two things wrong, the one the correct answer refers to and the additional problem that on an insert, no records will be inserted due to the inner...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 14, 2004 at 11:29 pm
Select @var1=col1, @var2=col2 from table where....
HTH
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 14, 2004 at 4:15 am
The integer portion of a datetime is the date and the fractional is the time. I don't know the details of how it's stored though.
What are you trying to do...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 14, 2004 at 4:12 am
For some reason I couldn't reply to your other post...
I've found that inserting a date into SQL in the format yyyy/mm/dd is often best. It's unambiguous.
Maybe you can switch the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 13, 2004 at 11:45 pm
By default, a primary key is supported by a unique clustered index, so by dropping the key and creating the index you won't be gaining anything.
You will gain if...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 7, 2004 at 11:47 pm
Alternatively if you want to avoid the conversion to char
select count(*) from WHERE
cast(floor(cast([datetime] as float)) as datetime) = cast(floor(cast(getdate() as float)) as datetime)
The above is faster than a...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 4, 2004 at 1:13 am
Viewing 6 posts - 49,546 through 49,552 (of 49,552 total)