Viewing 15 posts - 6,736 through 6,750 (of 7,600 total)
SELECT
CASE WHEN GETDATE() >= DATEADD(DAY, 1, [current_month_3rd_friday]) THEN
--current day of month is past 3rd Fri, so calc next...
February 22, 2013 at 1:43 pm
Select
A, B, C,
sum(case when A between 1 and 100 and B between 1 and 100 and C...
February 22, 2013 at 1:27 pm
Holy cripe! A single, stand-alone INSERT and UPDATE are deadlocking? That table has serious performance issues and should be reviewed immediately. In the meantime, if at all...
February 22, 2013 at 12:02 pm
the other is doing Update on TableA by PK
I'm guessing there are joins involved to help determine which row(s) to update.
Try using just SELECT instead of UPDATE to get the...
February 22, 2013 at 11:48 am
In SQL Server this is really only one transaction. You can issue multiple BEGIN TRANSACTIONS, but the outer transaction is the only one that really counts. You can...
February 22, 2013 at 11:39 am
Specifically, something like this:
SELECT sum([Fatigue/Weakness]), sum([Loss of Appetite]), sum([Rash(Macular-Papular)]), sum([Headache]), sum([Retro-Orbital Pain]), sum([Cough]), sum([Cold]), sum([Sore Throat]),sum([Dyspnea]), sum([Nausea]), sum([Vomitng]), sum([Diarrhea]),sum([Constipation]),
sum([Petechiae]), sum([Subcutaneous Hemorrhage]), sum([Gum Bleeding]), sum([Gum Bleeding(Days)]), sum([Epistaxis]), sum([Hematemesis]), sum([Melaena]), sum([Bleeding...
February 22, 2013 at 11:36 am
is there something in the join that could be counting these records out?
Maybe in some cases "s.[to Date of service]" is NULL to indicate "no end date"?
February 22, 2013 at 11:33 am
You need to do mirroring at the disk level, not the database level. The number of databases is then irrelevent, it's only the total volume of changes that is...
February 22, 2013 at 11:28 am
If you can accept the total stand-alone in a different result set, you can add this:
COMPUTE SUM(acres) --but will NOT work in SQL 2012!
to your query.
February 22, 2013 at 11:21 am
Alexander Suprun (2/21/2013)
ScottPletcher (2/21/2013)
February 21, 2013 at 3:12 pm
Did you try just putting the Status column only in the index? SQL can still use that index to do a key lookup back to the main table. ...
February 21, 2013 at 1:22 pm
Is CASTing cost an additional overhead to the query?
In this case, no. In fact, here it might actually help ever so slightly.
SQL has to determine a datatype for...
February 21, 2013 at 10:08 am
Are Transaction_Numbers -- i.e. clustered key values -- added in ascending sequence?
If so, make sure SQL is sorting the rows before doing the INSERTs.
If not, and you're sure you have...
February 21, 2013 at 10:05 am
bangsql (2/21/2013)
1. any query uses group by , order by etc.. uses tempdb.so if view contains that tempdb will use
2. no of physical cpu = no of tempdb files.
RAM...
February 21, 2013 at 10:02 am
1) I know temporary tables and table variables occupy space in TempDB, but what happens when I invoke a view; do views also make demands on TempDB?
2) What is the...
February 21, 2013 at 9:59 am
Viewing 15 posts - 6,736 through 6,750 (of 7,600 total)