Viewing 15 posts - 2,986 through 3,000 (of 14,953 total)
ChrisM, that's a pretty standard way to get the last day of the previous month, formatted as YYYYMMDD. It doesn't have any columns in it, so you can just...
November 2, 2011 at 8:50 am
I do a common-sense check on the data before I send it, but it's just an eyeball-it-quick thing.
Most of the time, I can safely assume the person consuming the data...
November 2, 2011 at 8:46 am
Don't pad with a case statement.
Do it like this:
select right('0000' + @MyStringVariable, 4);
November 2, 2011 at 8:36 am
The simple "sum" function won't work here because you have to group by unique values in order to get the rest of the query to work.
If you can post the...
November 2, 2011 at 8:34 am
I uses server-side traces for this.
Either use Profiler to script the trace, like K. Brian Kelley suggested, or use sp_trace_create and sp_trace_setevent (which is what I do).
Here's a sample trace...
November 2, 2011 at 8:31 am
Something like this?
IF OBJECT_ID(N'tempdb..#T') IS NOT NULL
DROP TABLE #T ;
CREATE TABLE #T
(StartDate DATE,
ID INT,
...
November 2, 2011 at 8:28 am
All other ways of doing this that I know of are either much slower, or require using CLR objects in the database (which would also require the DBA allowing that).
You...
November 2, 2011 at 7:13 am
jared-709193 (11/1/2011)
GSquared (11/1/2011)
SQLRNNR (11/1/2011)
Gus - try this onehttp://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/08/17/948.aspx
That's good. I was hoping for something on MSDN, but at least that allows testing of the concept.
Found it! http://msdn.microsoft.com/en-us/library/ms187087.aspx
Thanks,
Jared
Thanks. Knew...
November 2, 2011 at 6:33 am
Yeah, dynamic column-headers is a pain.
November 2, 2011 at 6:31 am
There are other ways to write it in T-SQL. "Better" is situational on all of the variations.
You'll want to take a look at Gail Shaw's blog entry on the...
November 2, 2011 at 6:27 am
SQLRNNR (11/1/2011)
Gus - try this onehttp://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/08/17/948.aspx
That's good. I was hoping for something on MSDN, but at least that allows testing of the concept.
November 1, 2011 at 2:31 pm
jared-709193 (11/1/2011)
GSquared (11/1/2011)
November 1, 2011 at 2:31 pm
It's called "server" because that's what it does.
There's a good definition at: http://en.wikipedia.org/wiki/Server_(computing)
It's not limited to OS-ware.
As for the first question, sorry, no clue. Never used it. What's...
November 1, 2011 at 2:12 pm
Gail: I was trying to find a reference I could quote for that same answer. I know the data, but I can't remember where I read it. Any...
November 1, 2011 at 2:09 pm
I use the version of BIDS that came with SQL 2008 R2 Dev Edition to build and edit SSIS packages that get deployed to SQL 2005 Standard Edition servers. ...
November 1, 2011 at 1:55 pm
Viewing 15 posts - 2,986 through 3,000 (of 14,953 total)