Viewing 15 posts - 466 through 480 (of 1,473 total)
Words cannot express how glad I am I don't have to deal with names like that! =) How about something like this?
SELECT INID, SUM(SumaAkcjiDeponowanych * CASE WHEN TransakcjePapieryWartoscioweTypTransakcji IN...
October 22, 2009 at 8:06 pm
You basically need to use dynamic SQL to generate the columns for the pivot. Jeff wrote an article on it here:
October 22, 2009 at 7:38 pm
You are much more likely to get an answer to this if you provide sample data and expected results. The article in my signature explains how to do this...
October 22, 2009 at 7:35 pm
Thanks for providing your code. However, if you could provide sample data and the results you would like to get (see the link in my signature on how to...
October 22, 2009 at 7:29 pm
Different databases isn't really an obstacle, you just need to provide the database name as part of the object name. For example, say you have DatabaseA and DatabaseB.
All you...
October 22, 2009 at 7:24 pm
It looked to me like it would have to rescan the table for each row in the table for that WHERE clause. I may have misread the execution plan,...
October 21, 2009 at 2:11 pm
Are the number of '\'s always the same either to the right or the left of the data you need?
October 21, 2009 at 7:55 am
(NOLOCK) allows dirty reads. Basically, there is a chance that if you are reading data out of the table while it is in the process of being updated, you...
October 21, 2009 at 7:28 am
It depends. Can you post some more examples? Also, why did you get rid of the \837\? How did you know to do that? Basically it...
October 21, 2009 at 7:25 am
My pleasure. Let us know if you need any help adapting to the new requirements.
October 21, 2009 at 7:20 am
Jeff Moden (10/20/2009)
Heh... gettin' old... Seth beat me. Same idea though...
SELECT DATEADD(ss,1,DATEADD(mm,DATEDIFF(mm,-16,GETDATE())-1,-16))
That's OK, yours was better. I was just in the car thinking about all the extra ADD's...
October 20, 2009 at 6:00 pm
Did you get this all figured out Tacy?
October 20, 2009 at 5:39 pm
How's this coming John? Get it all figured out?
October 20, 2009 at 5:38 pm
So the 16th of the previous month + 1s?
SELECT DATEADD(s,1,DATEADD(d,15,DATEADD(m,-1,(DATEADD(mm, DATEDIFF(mm,0,GETDATE()), 0)))))
Not a whole lot prettier, but no varchar conversions and it won't get screwed up in January like yours...
October 20, 2009 at 5:33 pm
Depending on how many different entities / how long each takes / what kind of downtime you have in the evenings / etc, it might be worth looking into making...
October 20, 2009 at 5:23 pm
Viewing 15 posts - 466 through 480 (of 1,473 total)