Viewing 15 posts - 301 through 315 (of 475 total)
I think this will do what you require, but you'll need to check it as I have made a number of assumptions on you requirements.
Please note that there are 13000...
August 7, 2013 at 9:55 pm
Hi
Would something like this do the trick?
update ut
set to_date = a.min_source_date
from target_table ut
cross apply (
select s.uarn, dateadd(d,-1,min(from_date)) min_source_date
from source_table s
where ut.uarn = s.uarn
and s.from_date > ut.from_date -- may...
August 7, 2013 at 9:04 pm
This is one ugly looking query:w00t:, but it should perform OK.
I've created node ids using dense rank across each of the levels and adding the max rank of the previous...
August 6, 2013 at 2:28 pm
tigars39 (8/1/2013)
Thanks for the hints Lowell!
Chris, i think thats what i needed my friend!....
August 1, 2013 at 1:01 pm
Based on the function that you posted the following should convert your ticks.
You may want to case statement to make sure the timestamp_id is at least 624511296000000000 to match the...
July 31, 2013 at 1:57 pm
Ahh ... one of the tricky ones 🙂
Assuming that we also want to include the weeks were there is no attendance, I have put in a small tally table to...
July 29, 2013 at 10:04 pm
Thanks ... as I said, I'm not an expert on dates, but you probably want to use the dateadd function, something like ...
... dateadd(dd,-181,getdate()) ...
July 29, 2013 at 8:35 pm
matt.j.garretson (7/29/2013)
July 29, 2013 at 8:17 pm
Hi
I hope I have understood your requirements for this. Thanks for posting some sample data, however it wasn't really enough to test this properly. Also the statements needed...
July 29, 2013 at 6:03 pm
Hi Tim
I think this is what you are after. I have grouped together the sequential brands and use the brand groups rather than the brandflag
--select * from testtable3 ...
July 22, 2013 at 1:51 pm
Interesting question thanks:-)
I think it also provides a good argument for the use of statement terminators or formatting scripts in a clear manor (with comments:-D).
Batch one...
July 17, 2013 at 2:18 pm
Khalid Hanif-458693 (7/16/2013)
If i upgrade to SQL Server 2012, Can I use the new analytical Functions?
You could use the new functions in 2012 to do this, but I'm not sure...
July 16, 2013 at 4:41 pm
You're welcome and I'm glad to be of assistance.
July 16, 2013 at 2:41 pm
Hi
To assist people in helping you, you will need to post more information on your table structures and give some sample data. This article http://www.sqlservercentral.com/articles/Best+Practices/61537/ describes best practice.
I would...
July 16, 2013 at 1:50 pm
Viewing 15 posts - 301 through 315 (of 475 total)