Viewing 15 posts - 121 through 135 (of 208 total)
GilaMonster (8/10/2009)
Also, try to avoid IN. While checking the existence of some values, then use EXISTS instead of...
August 10, 2009 at 6:30 am
You say that the following is about to be deprecated as it isn't SQL-92 compliant:
SELECT * FROM employee e1, employee_dtl e2
WHERE e1.id = e2.id
Where did you get this info from?...
August 10, 2009 at 3:13 am
Jeff Moden (8/7/2009)
... and thanks for making it easy with all the code in your original post. 🙂
Hey - thank you Jeff! Brilliant... now I'm all set to fix...
August 7, 2009 at 9:33 pm
Jeff Moden (8/7/2009)
Bob Hovious (8/7/2009)
(Walks in and hoses Jeff down with high pressure ice water hose, just prior to meltdown.)😉
BWAA-HAA!!! Man, I probably shouldn't be posting... let's see... I'm...
August 7, 2009 at 7:33 pm
I got this from http://www.sqlservercentral.com/Forums/FindPost764457.aspx
But indeed it isn't a recursive CTE! It's just two CTEs, but the second doesn't recurse on the first, it just uses it to derive...
August 7, 2009 at 6:18 pm
Oops... sorry, didn't read that carefully enough.
August 7, 2009 at 7:35 am
insert into table1
select * from table2
You need to be sure that the columns types match on both tables.
August 7, 2009 at 4:01 am
No need to.
Just run:
set @value = 3
exec dbo.dummystoredprocedure @value
print @value
where dummystoredprocedure has some sort of NOP (e.g. select 1).
You'll see that the value after the exec doesn't change....
August 6, 2009 at 8:23 am
It doesn't reset to 0 (I'm assuming you mean that you are calling another SP from the first SP, which is then reentering the first SP...).
If you are concerned...
August 6, 2009 at 8:11 am
Slick84 (8/6/2009)
Lynn Pettis (8/4/2009)
I may have missed it, but you will want to ensure that @RESULT is initialized to zero (0) before you start the update.
How would you initiliaze the...
August 6, 2009 at 7:24 am
I'm a bit curious... what was the issue? I know that you can't do a "top 100 per cent" ... "order by ..." statement in a view... is this the...
August 6, 2009 at 6:53 am
Ummm... good article, but surely as a matter of course you would be careful to check the version being run when using new SQL Server statements? For instance, if you...
August 6, 2009 at 4:47 am
Jeff Moden (8/4/2009)
ta.bu.shi.da.yu (8/3/2009)
I'm hoping Jeff Modem can help me on this one 🙂
Heh... thank you for the compliment but, as you can see, I'm not the only show in...
August 4, 2009 at 3:12 pm
andrewd.smith (8/3/2009)
WITH StartStop AS (
SELECT Ref, IsNull(StartStop, 'Start') AS StartStop, theDate
FROM #TempTable
)
SELECT a.Ref, a.theDate AS Start, Min(b.theDate) AS Stop, DateDiff(dd, a.theDate, Min(b.theDate))...
August 3, 2009 at 4:36 pm
drew.allen (8/3/2009)
ta.bu.shi.da.yu (8/3/2009)
August 3, 2009 at 4:01 pm
Viewing 15 posts - 121 through 135 (of 208 total)