Viewing 15 posts - 8,626 through 8,640 (of 8,730 total)
John Mitchell-245523 (8/9/2012)
(Bob Brown) (8/9/2012)
STUPID QUESTION: Don't BEFORE triggers fire before AFTER triggers? Is number 2 totally wrong?
I think the point is that there's no such...
August 9, 2012 at 7:12 am
J Livingston SQL (8/8/2012)
Accountants on the other hand....love pivot tables.
I would say that Accountants love Excel. some might even ask you to put the whole database in Excel and they...
August 8, 2012 at 1:19 pm
You have sample data but there's no expected results. I'm not sure if I understood correctly, here's what I imagine you're trying to do (but it might be completely wrong).
Please...
August 8, 2012 at 1:01 pm
I used it on few projects, mostly for demos.
It's easy to learn and has a simple GUI.
Scripting is very similar to T-SQL and can be protected to prevent changes on...
August 8, 2012 at 12:09 pm
There's no offense, I hope you didn't take the comments on a bad way.
It's clear that you don't have much experience on SQL Server, but I hope you could learn...
August 8, 2012 at 11:26 am
Sean Lange (8/8/2012)
A couple other suggestions. You should not declare @Date as varchar and turn around and force implicit conversions to datetime.
I couldn't believe that @Date was declared as a...
August 8, 2012 at 9:35 am
I believe there's a problem with your sample data because there's not to much matches (only 19)
However, you might find useful to use a CTE with the ranking function ROW_NUMBER.
Here's...
August 8, 2012 at 9:13 am
My original reply for this post might count as a terrible answer. I saw it after I had posted and reread the OP. http://www.sqlservercentral.com/Forums/Topic1339745-391-1.aspx
However, I tend to see some awful...
August 8, 2012 at 8:30 am
This subquery might be returning more than one value.
(SELECT DATEDIFF(YEAR, EecDateOfOriginalHire, getdate()) from empcomp EC WHERE EC.EecEEID = E.EECEEID) as 'Yrs of Serv'
You can test it using this:
SELECT EC.EecEEID,...
August 8, 2012 at 7:52 am
I'm not sure if this would work correctly, because I have no DDL or sample data, but if it does, it should improve the performance and would make your query...
August 8, 2012 at 7:22 am
How about this?
WHERE V.Type_Fleet <> 'FS'
AND Sales_Date > @DATE
AND Sales_Date <= DATEADD(MONTH, - 1, @DATE)
I'm not sure, but I believe this code will perform poorly with all those subqueries in...
August 8, 2012 at 7:07 am
mtassin (8/7/2012)
Luis Cazares (8/7/2012)
But it does matter if we're talking about number of rows returned.
With select * you can get either 1 or 0 (in this particular case).
With select COUNT(*)...
August 7, 2012 at 1:34 pm
And I was focused on that part and neglected the scope. :hehe:
August 7, 2012 at 1:09 pm
mtassin (8/7/2012)
Luis Cazares (8/7/2012)
SQLRNNR (8/7/2012)
As far as I remember, the "Select count(*)" was changed by Steve after the discussion on the previous question and originally had a "Select *".
However, I...
August 7, 2012 at 12:52 pm
Viewing 15 posts - 8,626 through 8,640 (of 8,730 total)