Viewing 15 posts - 57,271 through 57,285 (of 59,066 total)
It's important that it print right on the screen? Ok.. I have to ask... what are you actually doing with this? Hopefully you're not doing a cut and paste from...
November 6, 2006 at 8:49 pm
Ok... One picture is worth a thousand words...
--===== Conditionally drop the temp table
IF OBJECT_ID('TEMPDB..#Test') IS NOT NULL
DROP TABLE #Test
DECLARE @Rows INT
CREATE TABLE...
November 5, 2006 at 8:53 am
Use a word processor like MS-Word to do a search and replace... the symbol for a hard return in MS-Word is "^p" without the quotes.
November 5, 2006 at 8:40 am
Sure... I'll take your survey... make it so that cookies aren't required...
November 3, 2006 at 7:24 pm
THAT, Ladies and Gentlemen, is why doing it this way is so important...
DECLARE @ANull VARCHAR(8000)
SET @ANull = NULL --was already null, just doing it here for effect...
November 3, 2006 at 5:04 pm
For query 1... it seems a view of the tables would be appropriate (do be warned that there is a limit to the number of unions you can do... I...
November 3, 2006 at 7:46 am
Wouldn't that be what the invoice number is for?
November 3, 2006 at 6:56 am
Perhaps if you told us the rest of the story as to why you are trying to do a DIR, we might even be able to come up with a...
November 2, 2006 at 8:25 pm
Yep... you're right... forgot about all that punctuation stuff. Thanks, Serqiy.
November 2, 2006 at 6:09 am
Don't know of any coherent place dedicated to just doing crosstabs or just to dynamic SQL... there's a lot of really bad examples that use cursors, as well. But, if...
November 2, 2006 at 6:06 am
Don't think you need a cursor... see the oversimplified example at the following...
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=319791
November 1, 2006 at 7:25 pm
I strongly suspect that your example data is missing something, but the following will do for what you have... lemme guess... spreadsheet output?
--=======================================================
-- This is just setting up...
November 1, 2006 at 7:22 pm
Since none of the methods are likely to use an available index when used in a WHERE clause, try this one...
--=============================================================
-- This section of code is just setup...
November 1, 2006 at 6:53 pm
Viewing 15 posts - 57,271 through 57,285 (of 59,066 total)