Viewing 15 posts - 6,121 through 6,135 (of 8,731 total)
The following article explains a way of doing this. Read it carefully and ask any questions that you have.
http://www.sqlservercentral.com/articles/T-SQL/68467/
For better answers, read the article linked in my signature.
July 17, 2014 at 3:49 pm
sgross 10581 (7/17/2014)
Is it possible to make this dynamic to discover the needed columns without Dynamic SQL?
No, you need to use dynamic sql to have a dynamic number of columns.
July 17, 2014 at 2:36 pm
Robert.Sterbal (7/17/2014)
I'll have to figure out how to do this in excel (with the...
July 17, 2014 at 12:43 pm
I once had a similar requirement and the best option was to generate the columns in the reporting tool. That was on VFP and I'm not sure if it's possible...
July 17, 2014 at 9:32 am
Sean Lange (7/16/2014)
Evil Kraig F (7/16/2014)
Sean Lange (7/16/2014)
Lynn Pettis (7/16/2014)
patrickmcginnis59 10839 (7/16/2014)
Jack Corbett (7/16/2014)
Eirikur Eiriksson (7/16/2014)
July 16, 2014 at 3:45 pm
Another option is to use bcp to create the csv file or SSIS for any of the file options and possibly sending it via email.
SSRS seems overkill for this task,...
July 16, 2014 at 3:43 pm
T-SQL beginnger (7/16/2014)
Luis, your solution is also working fine. Just had few typos in which I've fixed and its giving the right results.Thanks
It's good to know that my blind-coding abilities...
July 16, 2014 at 2:18 pm
I made a few changes to give you an idea. They might be wrong, but hopefully you can modify them accordingly.
WITH PStatus AS(
SELECT t.acct_no
...
July 16, 2014 at 1:21 pm
I'm not sure on why you included the "create" word. It shouldn't be part of the table hint, that might be the error and should occur as well on 2000.
You...
July 16, 2014 at 1:07 pm
Stefan Krzywicki (7/16/2014)
Luis Cazares (7/16/2014)
Jack Corbett (7/16/2014)
Stefan Krzywicki (7/16/2014)
July 16, 2014 at 12:33 pm
Jack Corbett (7/16/2014)
Stefan Krzywicki (7/16/2014)
July 16, 2014 at 12:17 pm
vecerda (7/16/2014)
Msg 4104, Level 16, State 1, Line 20
The multi-part identifier "b.recID" could not be bound.
not sure what I am doing wrong as the alias is clearly...
July 16, 2014 at 11:27 am
ChrisM@Work (7/16/2014)
The ISDATE is for NULL checking...
You're right, I didn't see the DDL before I posted.
However, this puzzles me:
[Store_Opens_Baseline] [nvarchar](255) NULL,
July 16, 2014 at 9:49 am
This is an idea on what you could do. You might want to create a computed column to remove the case from the join clause.
DECLARE @FileId int
SET @FileId=345;
WITH Brands AS(
...
July 16, 2014 at 9:25 am
Additional to that, you should really change your text columns into varchar(max) or even a normal varchar. The text datatype has been deprecated and will be removed in a future...
July 16, 2014 at 8:47 am
Viewing 15 posts - 6,121 through 6,135 (of 8,731 total)