Viewing 15 posts - 6,646 through 6,660 (of 7,597 total)
Poor HAVING, nobody likes him 🙂
SELECT
ProductID, BaseSupplierID,
MIN(CASE WHEN SupplierID <> BaseSupplierID THEN Price END) AS LowestPrice,
MIN(CASE WHEN SupplierID...
March 14, 2013 at 3:34 pm
You could also make the "real" column name a computed column that the developers use, and based off a "dummy name" column so they don't have to deal with NULLs....
March 14, 2013 at 2:17 pm
Can you just add the column with no default value, for now, and handle the NULLs in the code temporarily?
It's almost certainly applying the default value that is taking the...
March 14, 2013 at 1:54 pm
March 11, 2013 at 11:19 pm
David Mando (3/11/2013)
Thanks so much for your quick response.How would I write this query if it is just (- 4 weeks and 3 days)?
select dateadd(day, -3, dateadd(week,-4,getdate()));
March 11, 2013 at 5:09 pm
Sqlism (3/11/2013)
Is this is the Best Practice to select E: for the SQL Server root directory? Please let me know the Pros/cons and the practices to be followed.
Thanks a...
March 11, 2013 at 5:07 pm
Maybe code below will do what you need.
I haven't tried for efficiency, just to get the result you want.
select
a.a, a.b, a.c
from @a a
left outer join (
...
March 11, 2013 at 4:48 pm
opc.three (3/8/2013)
btio_3000 (3/8/2013)
But wouldn't it create a recursive call on that trigger? Updating the same table that the UPDATE trigger is defined on?Thank you
No, not unless RECURSIVE_TRIGGERS is ON. It...
March 9, 2013 at 7:42 am
Hmm, seems to me that in this case the query is the same either way, with exactly the same WHERE clause structure.
The only difference is that the WHERE comparison value,...
March 8, 2013 at 5:19 pm
Sure, that's easy, as long as you have unique column(s), such as an IDENTITY column, you can use to identify a specific row in the table. SQL provides a...
March 8, 2013 at 5:14 pm
Lynn Pettis (3/7/2013)
ScottPletcher (3/7/2013)
Getting the job is good, but it's just the start. ...
March 7, 2013 at 12:50 pm
Sorry, not to rain on the parade, but to me now is not the time to celebrate.
Getting the job is good, but it's just the start.
Dedicate yourself to...
March 7, 2013 at 9:05 am
Gazareth (3/7/2013)
ScottPletcher (3/6/2013)
March 7, 2013 at 8:57 am
SAinCA (3/6/2013)
Not sure if what you are saying is that "it didn't happen the way I said it did..."
READ_COMMITTED_SNAPSHOT isolation is set ON for the database in question.
In order to...
March 6, 2013 at 2:06 pm
SAinCA (3/6/2013)
When a row is deleted, it is stored in TEMPDB as,...
March 6, 2013 at 1:23 pm
Viewing 15 posts - 6,646 through 6,660 (of 7,597 total)