Viewing 15 posts - 151 through 165 (of 4,080 total)
Oh that's a BIG help.
I guess it will tell me when I've gone too far.
Thanks anyway, Drew.
September 30, 2016 at 1:53 pm
What would the expected results your sample data look like from your example above? Please don't describe it. Just draw us a picture. 🙂
You cannot choose columns...
September 28, 2016 at 9:21 pm
To be clear, part of the purpose of the Holiday table is to serve as a join when creating the calendar table. In the previous calendar...
September 27, 2016 at 4:23 pm
Understood. Thanks for the reply.
September 27, 2016 at 4:16 pm
Why on earth are you duplicating rows in that table instead of just adding a separate column for LBS??
September 27, 2016 at 3:33 pm
I just sent you an update query. It's not going to solve your problem of duplicate data in the table.
September 27, 2016 at 3:29 pm
Agreed. You have to substitute the table name into your string and then execute it.
September 27, 2016 at 3:18 pm
Without seeing the layout of your numbers_table table (which is redundundant by the way) and some sample data, we have no way of telling why you're seeing duplicates in...
September 27, 2016 at 3:15 pm
declare @mytable table (FC int, OrigNum varchar(50))
insert into @mytable (OrigNum)
values
('7 1601081408920063')
,('7 1601081408920063')
,('7 1507210892006300')
,('7 1507210892006300')
update @mytable
set FC = left(OrigNum,1)
,Orignum = right(OrigNum, len(OrigNum)-2)
select * from @mytable
September 27, 2016 at 3:08 pm
To close to bedtime to code and test, but you should just be able to use the LAG and LEAD operations in a cte to look at the previous [price]...
September 26, 2016 at 9:31 pm
you should specify the window frame (generally ROWS UNBOUNDED PRECEDING), because the default is RANGE UNBOUNDED PRECEDING, and which is much slower than specifying the range using the ROWS...
September 26, 2016 at 8:21 pm
You will find some good example code as well as some other considerations in the discussion HERE.
Do NOT follow my example of a loop with DELETE TOP(5000)....
September 26, 2016 at 4:40 pm
I'll bet you do. Sounds like a dream job.
Thanks for answering, promptly. I was having trouble ceasing to imagine a tiny little couch for bytes.
September 26, 2016 at 1:04 pm
How can I argue with that? 😀
Some people have yet to implement a calendar table though. Even those who have might get asked for a period which...
September 26, 2016 at 12:55 pm
Viewing 15 posts - 151 through 165 (of 4,080 total)