Viewing 15 posts - 8,326 through 8,340 (of 8,416 total)
GilaMonster (4/12/2009)
How would you do that?
I wouldn't 😉
But if I did (excuse the rushed code, it's 3am):
create table jan (a int)
create table feb (b int)
insert jan values (1)
insert feb values...
April 12, 2009 at 9:00 am
See http://www.sqlservercentral.com/articles/T-SQL/63681/ for an excellent alternative to the confusing PIVOT command.
/Paul
April 12, 2009 at 8:54 am
Hey there Abhi,
There are lots of ways to achieve this, but could you tell us a bit more about what it is you are doing, perhaps with some example table...
April 12, 2009 at 8:52 am
This is not a serious post - don't do this!
Yet another option (though not a good one!) would be to construct a table valued function to return the correct data...
April 12, 2009 at 8:42 am
Jeffrey Williams (4/12/2009)
Be careful with the synonym approach - it can only work if all queries using the procedure will use the current month table.
Hey Jeffrey,
The last time I used...
April 12, 2009 at 8:36 am
Hey guys,
Once or twice a year, someone from some SAN vendor or other pops in to claim that SQL Server backups can now be done automatically by their SAN solution,...
April 12, 2009 at 8:28 am
Jeff Moden (4/12/2009)
Outstanding... thanks for the post and the code, Paul... I'll check it out. That's what I love about forums. Lots of folks with lots of ideas.
Just...
April 12, 2009 at 8:14 am
Jeff Moden (4/12/2009)
Thanks, Paul. I'll check it out. I'm always open for improvements to the code.
:w00t: OMG no. Please no-one look upon this as an 'imnprovement'!!! :w00t:
It's...
April 12, 2009 at 7:59 am
Jeff,
You are so right to point out the data-consistency advantage of the computed column. I guess I could add a constraint or something to simulate that benefit, but it...
April 12, 2009 at 7:56 am
peleg k (4/12/2009)
Select * from Messag2008+@MonthName
but withought using a dynamic query which will be activated...
April 12, 2009 at 7:50 am
Hey,
You might also want to take a look at Change Data Capture in SQL 2K8 - in case it's an appropriate tool for the job you need to do.
/Paul
April 12, 2009 at 7:23 am
You could use a DDL trigger (DDL_SERVER_LEVEL_EVENTS) to identify which process and command is changing the recovery model.
Something that logs to a table based on the following might work:
CREATE TRIGGER...
April 12, 2009 at 7:19 am
Jeff Moden (4/11/2009)
You may want to reconsider ever using a Pivot operator... a properly formed crosstab can be nearly twice as fast...http://www.sqlservercentral.com/articles/T-SQL/63681/
Performance meaurements are at the bottom of the article.
Hey...
April 12, 2009 at 6:54 am
Hey Jeff!
Well presented and thought-provoking article, as millions of others have already said 😉
I do love a performance challenge though, and the figures showing that PIVOT was slower than the...
April 12, 2009 at 6:45 am
Hey Flo,
Yeah - it's one of those articles I keep going back to: for some reason I can never quite remember all the details verbatim 😉 😀
/Paul
April 12, 2009 at 3:42 am
Viewing 15 posts - 8,326 through 8,340 (of 8,416 total)