Viewing 15 posts - 151 through 165 (of 4,080 total)
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 27, 2016 at 4:23 pm
Understood. Thanks for the reply.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 27, 2016 at 4:16 pm
Why can't you create triggers on the tables?
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 27, 2016 at 3:43 pm
Why on earth are you duplicating rows in that table instead of just adding a separate column for LBS??
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 27, 2016 at 3:29 pm
Agreed. You have to substitute the table name into your string and then execute it.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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]...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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)....
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
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...
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 26, 2016 at 12:55 pm
For what it's worth, we haven't gone back and rewritten everything as merges, either 😉
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
September 26, 2016 at 12:30 pm
Viewing 15 posts - 151 through 165 (of 4,080 total)