Viewing 15 posts - 331 through 345 (of 670 total)
This looks right based on the data provided. To check, uncomment the code around select * from @Cols.
Drop Table #t
Create TABLE #t
([3Marketplace Order ID] [nvarchar](138)...
May 24, 2011 at 7:29 am
It really doesn't matter the order of how you put them into the @Cols table. You just need to be able to order them when populating the @ColsList variable....
May 24, 2011 at 6:05 am
Nice, I wasn't even thinking about CTEs. I was conerned with showing stats without thinking of trying to keep it simple
May 20, 2011 at 12:25 pm
is it possible that an order can have more than one record with the same StatusDate? Based on the limited data and the fact that we don't know what...
May 20, 2011 at 12:19 pm
Have you read any of the comments that have been posted to this thread?:ermm:
May 20, 2011 at 7:36 am
I think Chris is right. You could output the fields you need into a temp table and use that to perform the update. Can you provide some table...
May 20, 2011 at 6:54 am
Then you can
select GroupID, max(DateStamp)
from table
group by GroupID
May 19, 2011 at 7:52 am
There are so many things wrong with this procedure.
First the name of the proc should not start with SP_. Sql Server interprets this as a system stored...
May 19, 2011 at 7:49 am
Can you explain on what you mean by getting the lastest row? Are records updated in this table too or are they strictly insert only records? If/When records...
May 19, 2011 at 7:34 am
If you have a table that identifies the ranges that each age are in, then it's pretty easy
declare @t table (age tinyint, sex char(1))
declare @grouping table (age tinyint, groupid tinyint)
insert...
May 19, 2011 at 7:29 am
declare @t table (id int identity(1,1), attachment varchar(500))
declare @NewPath varchar(20)
declare @OldPath varchar(20)
insert into @t
select 'C:\test\file1.htm'
union all
select 'c:\test\directory1\LongFileName.xml'
-- To Find the...
May 18, 2011 at 8:45 am
I amde the assumption that all your attachments have the full path in the name. Also, this type of update will assume that all the files will be in...
May 18, 2011 at 8:27 am
What is the TVF doing? Can you provide some DDL and sample data so we can see what you are talking about? Also, can you tell show uswhat...
May 18, 2011 at 7:58 am
This sounds like homework. You will need a parse the names in table 2 to get all the appropriate names, then join it to table 1 to get what...
May 18, 2011 at 7:54 am
Sounds like homework. What have you tried so far? You expected results don't match the input. Can you provide both input tables and then your attempts at...
May 17, 2011 at 9:32 am
Viewing 15 posts - 331 through 345 (of 670 total)