Viewing 15 posts - 7,261 through 7,275 (of 8,731 total)
Sean Lange (1/7/2014)
This is where you...
January 7, 2014 at 10:48 am
It makes no sense that your udf needs to come before your table if it uses a column from your table.
This might help you:
SELECT *
FROM mytable a
OUTER APPLY dbo.udf_Myfunction(a.col1) udf
January 7, 2014 at 10:36 am
Here's another way to calculate it without the need of a triple conversion 🙂
UPDATE @TheOriginalDates SET DateWithNewTime =
DATEADD(SECOND, -1, DATEADD(DAY, DATEDIFF(DAY, 0, CurrentDate) + 1, 0))
January 7, 2014 at 9:19 am
It seems that you're facing the same problem as your previous post.
http://www.sqlservercentral.com/Forums/Topic1524935-392-1.aspx
And it was solved over there.
January 6, 2014 at 12:12 pm
sqlnaive (1/6/2014)
January 6, 2014 at 11:43 am
Why do you have all those nolock hints? Are your users aware that they might get incorrect data? Are they okay with that?
January 6, 2014 at 10:48 am
You really should post consumable DDL and sample data. I'm in a good mood so I did it this time, but you've been here long enough to know how to...
January 6, 2014 at 10:10 am
Lowell (1/3/2014)
no need to cross post to multiple forums it fractures the answers you get and makes posters duplicate others work.
the "Recent Posts" link shows us everything.
continue the thread...
January 3, 2014 at 1:10 pm
Generate_Series sounds like a great function, but it's not the same as Sequences in SQL Server (or Oracle FWIW).
Sequences are used to fetch values but they will keep track of...
January 3, 2014 at 8:36 am
I'm not sure that sequences work the same way as a Tally table. It seems that their purposes are different.
Could you explain how would you use a sequence instead of...
January 2, 2014 at 5:43 pm
Based on your sample data and explanation, it gets even simpler as you don't need any calculations.
SELECT sum(Amount)
FROM Coupon_Amount
WHERE IdCoupon IN (
SELECT IdCoupon
...
January 2, 2014 at 4:56 pm
Your code seems really unefficient and unconsistent. Here's a better option to do it.
SELECT client,
SUM( CASE WHEN year = 2003 THEN fees_billed ELSE 0 END) as fees_billed_2003,
SUM( CASE...
January 2, 2014 at 3:32 pm
I'm not sure that this will work fine because you didn't provide sample data.
The logic of your query is not clear as the first between seems enough. If you...
January 2, 2014 at 3:09 pm
This code is a modification from Dwain Camps' Pattern-based splitter.
I'm not sure if it's the best way to do it.:-P
DECLARE @List ...
January 2, 2014 at 11:50 am
Have you consider that you can't paste 2.2 million rows in a single spreadsheet?
Excel will limit the rows to 1,048,576.
You're going to be missing over 50% of your data in...
January 2, 2014 at 9:43 am
Viewing 15 posts - 7,261 through 7,275 (of 8,731 total)