Viewing 15 posts - 31 through 45 (of 135 total)
Hi,
Please see attached as an example.
Many Thanks,
Oliver
CREATE TABLE [dbo].[A_TABLE](
[ID] [int] NOT NULL,
[column1] [nvarchar](max) NULL,
CONSTRAINT [PK_A_TABLE] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF,...
March 20, 2014 at 6:49 am
Thanks Dwain,
Will give this a try and try the unpivot alternative, looks good.
Is performance better than unpivot?
Cheers
Oliver
January 29, 2014 at 1:11 am
Many Thanks Nevyn and Luis I get the concept now, I really appreciate your help.
Thank You,
Oliver
January 28, 2014 at 8:41 am
Hi,
Thanks for the help, however this isnt what I am after, I essentially want the group by field (column 2) to be on top (as a title grouping) of column...
January 28, 2014 at 8:27 am
Hi,
Yes unfortunately it needs to be pure T-SQL. Sorry I know it's very easy in SSRS but for the task I need it for this isnt appropriate.
Thanks,
Oliver
January 28, 2014 at 7:46 am
Think we were writing at the same time!
Thanks for the help
December 17, 2013 at 8:09 am
Think I have it, create an empty table first, then with the EXEC use insert into.
This works, if it is poor SQL please let me know,
Many Thanks,
Oliver
December 17, 2013 at 8:07 am
Thank you for the reply, I am incorporating this into my larger script.
Thanks again
December 3, 2013 at 4:55 am
Hi,
in your script you added
WHERE object_id = OBJECT_ID('tempdb..#TABLE')
How do I find the temporary table name through object id of the temporary table I just created?
select TOP(650) * INTO #table FROM...
December 2, 2013 at 10:33 am
Hi,
I have got this working now, as I understand it does it prevent scanning because it is all being run under the one select statement with case as opposed to...
December 2, 2013 at 9:18 am
Thanks, I know absolutely that at the moment it is designed badly.
I will try to break down your query and have more of a play, I dont think the first...
December 2, 2013 at 7:58 am
Hi,
Thanks for this, the query provided is in essence what my current query does except my current one stipulates each column, where as yours creates the sql dynamically. The problem...
December 2, 2013 at 7:29 am
I simply want to create a subset of the data as requested by the user and return them a table of the data which only contains columns that contain data....
December 2, 2013 at 6:51 am
sorry firefox crashed when I added the post, sorry for double posting.
PLEASE Remove this post.
Very sorry
December 2, 2013 at 5:23 am
Thanks so much Sean, really appreciate the help it's working like a gem now.
Thanks again,
Oliver
October 28, 2013 at 2:22 pm
Viewing 15 posts - 31 through 45 (of 135 total)