|
|
#83497 |
|
ProCrastinationConsultant
Join Date: Sep 2013
Drives: '14 Ranger, '18 Tacoma 4Dr LB
Location: chicago-ish
Posts: 11,330
Thanks: 35,240
Thanked 13,675 Times in 6,782 Posts
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
|
got my puzzles.
first one took about 3 hours. and apparently according to 'real' puzzle people, i cheated by looking at the picture spent the entire time convinced that i was missing a piece. ended up with 1 repeat piece. biggest confusion was the picture was to a larger scale, screwed with my perception of location...
__________________
"The time you enjoy wasting is not wasted time"
|
|
|
| The Following 3 Users Say Thank You to soundman98 For This Useful Post: |
|
|
#83498 |
|
ProCrastinationConsultant
Join Date: Sep 2013
Drives: '14 Ranger, '18 Tacoma 4Dr LB
Location: chicago-ish
Posts: 11,330
Thanks: 35,240
Thanked 13,675 Times in 6,782 Posts
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
|
talking to customers has it's advantages.
yesterday was chatting up the customer, and he says "hey, do you want this generator? the people we bought the house from left it here, and my kids already screwed up the other stuff we gave them"... so now i have an $800 generator... ![]() and today, the customer had a 3 pairs of old speakers he was looking to get rid of. now i have more speakers!
__________________
"The time you enjoy wasting is not wasted time"
|
|
|
| The Following 6 Users Say Thank You to soundman98 For This Useful Post: | Dadhawk (02-12-2022), Kiske (02-12-2022), NoHaveMSG (02-12-2022), Sapphireho (02-12-2022), Spuds (02-12-2022), Ultramaroon (02-12-2022) |
|
|
#83499 |
|
not playing cards
Join Date: Sep 2014
Drives: a 13 e8h frs
Location: vantucky, wa
Posts: 32,395
Thanks: 53,053
Thanked 37,228 Times in 19,308 Posts
Mentioned: 1118 Post(s)
Tagged: 9 Thread(s)
|
Belgian waffle fries!
__________________
|
|
|
| The Following 2 Users Say Thank You to Ultramaroon For This Useful Post: | NoHaveMSG (02-12-2022), soundman98 (02-12-2022) |
|
|
#83500 |
|
not playing cards
Join Date: Sep 2014
Drives: a 13 e8h frs
Location: vantucky, wa
Posts: 32,395
Thanks: 53,053
Thanked 37,228 Times in 19,308 Posts
Mentioned: 1118 Post(s)
Tagged: 9 Thread(s)
|
Was some idiotic thing because the French had the courage to oppose the US invasion of Iraq.
__________________
|
|
|
| The Following User Says Thank You to Ultramaroon For This Useful Post: | soundman98 (02-12-2022) |
|
|
#83501 |
|
Senior Member
Join Date: Jan 2020
Drives: '20 BRZ tS (15/300) / '09 Scion tC
Location: PA
Posts: 689
Thanks: 432
Thanked 831 Times in 396 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
|
Can someone explain to me how this works? I had a team member write this exact code to remove duplicates and thought - this will never work but she said she tested it and it worked. Six months later she found it didn't work. Turns out this exact code is in an MSDN article touting the improvements in SQL 2005. I usually think if I don't understand something someone smarter than me wrote it... but for the life of me I can't figure out how deleting from T will effectively remove records from a persisted table.
Code:
DELETE T FROM ( SELECT * , DupRank = ROW_NUMBER() OVER ( PARTITION BY key_value ORDER BY (SELECT NULL) ) FROM original_table ) AS T WHERE DupRank > 1; |
|
|
|
|
#83502 |
|
Famous Potatoes
Join Date: Mar 2016
Drives: '15 ultramarine
Location: Idaho
Posts: 14,043
Thanks: 5,808
Thanked 19,640 Times in 9,241 Posts
Mentioned: 162 Post(s)
Tagged: 0 Thread(s)
|
|
|
|
| The Following 3 Users Say Thank You to Sapphireho For This Useful Post: |
|
|
#83503 | |
|
ProCrastinationConsultant
Join Date: Sep 2013
Drives: '14 Ranger, '18 Tacoma 4Dr LB
Location: chicago-ish
Posts: 11,330
Thanks: 35,240
Thanked 13,675 Times in 6,782 Posts
Mentioned: 98 Post(s)
Tagged: 0 Thread(s)
|
Quote:
wouldn't T need to be previously defined to allow it to do anything? but i really shouldn't get involved. this is all i know about coding.
__________________
"The time you enjoy wasting is not wasted time"
|
|
|
|
|
|
#83504 | |
|
The Dictater
Join Date: Apr 2017
Drives: '13 Red Scion FRS
Location: MD, USA
Posts: 9,656
Thanks: 26,702
Thanked 12,709 Times in 6,296 Posts
Mentioned: 88 Post(s)
Tagged: 0 Thread(s)
|
Quote:
I moved the code into a better format to understand it better. I would just remove the first "T" and the "AS T". Looks like they tried aliasing the table query which seems unnecessary. If you still wanted to alias it, I would alias the query first, then just DELETE FROM T WHERE DupRank >1. |
|
|
|
| The Following User Says Thank You to Spuds For This Useful Post: | Ultramaroon (02-12-2022) |
|
|
#83505 |
|
The Dictater
Join Date: Apr 2017
Drives: '13 Red Scion FRS
Location: MD, USA
Posts: 9,656
Thanks: 26,702
Thanked 12,709 Times in 6,296 Posts
Mentioned: 88 Post(s)
Tagged: 0 Thread(s)
|
|
|
|
| The Following User Says Thank You to Spuds For This Useful Post: | Ultramaroon (02-12-2022) |
|
|
#83506 | |
|
Senior Member
Join Date: Jan 2020
Drives: '20 BRZ tS (15/300) / '09 Scion tC
Location: PA
Posts: 689
Thanks: 432
Thanked 831 Times in 396 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
|
Quote:
I can't wrap my head around it. It's not like it's a LINQ query. |
|
|
|
|
|
#83507 | |
|
The Dictater
Join Date: Apr 2017
Drives: '13 Red Scion FRS
Location: MD, USA
Posts: 9,656
Thanks: 26,702
Thanked 12,709 Times in 6,296 Posts
Mentioned: 88 Post(s)
Tagged: 0 Thread(s)
|
Quote:
|
|
|
|
| The Following User Says Thank You to Spuds For This Useful Post: | soundman98 (02-12-2022) |
|
|
#83508 |
|
Senior Member
Join Date: Jan 2020
Drives: '20 BRZ tS (15/300) / '09 Scion tC
Location: PA
Posts: 689
Thanks: 432
Thanked 831 Times in 396 Posts
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
|
It compiles. and it will do something. The FROM is there so people don't get paranoid that it will drop the table but it is optional.
Last edited by 2020BRZtS; 02-12-2022 at 12:19 PM. Reason: long winded |
|
|
| The Following 4 Users Say Thank You to 2020BRZtS For This Useful Post: |
|
|
#83509 |
|
The Dictater
Join Date: Apr 2017
Drives: '13 Red Scion FRS
Location: MD, USA
Posts: 9,656
Thanks: 26,702
Thanked 12,709 Times in 6,296 Posts
Mentioned: 88 Post(s)
Tagged: 0 Thread(s)
|
Good luck then. It looks like it should at least identify all entries with duplicate key_values from original_table for removal. I still think just removing the T and AS T will solve the problem.
|
|
|
|
|
#83510 |
|
Senior Member
Join Date: Jun 2013
Drives: RX-7 / BRZ
Location: USA
Posts: 2,349
Thanks: 1,031
Thanked 2,501 Times in 1,081 Posts
Mentioned: 27 Post(s)
Tagged: 0 Thread(s)
|
Weekend goals.
>>Do not buy car parts >>Do not buy car parts >>Do not buy car parts -Buys car parts >>Do not buy more car parts >>Do not buy more car parts >>Do not buy more car parts...
__________________
//2013 World Rally Blue BRZ Limited FBM Turbo--gone
//2018 Crystal White Pearl BRZ Ts 2.2l Harrop Supercharged |
|
|
| The Following 3 Users Say Thank You to Kiske For This Useful Post: |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Language Rant Part Deux | MuseChaser | Off-Topic Lounge [WARNING: NO POLITICS] | 43 | 04-23-2017 08:55 PM |
| Random thoughts thread | MrVito | Off-Topic Lounge [WARNING: NO POLITICS] | 37188 | 02-25-2016 11:00 AM |
| Random Rubber Part | OoLong | BRZ First-Gen (2012+) — General Topics | 8 | 01-28-2014 11:31 AM |
| Crew Carshow : Part Deux 9/7/13 | saiyajinimports | Great Lakes | 0 | 08-17-2013 06:18 AM |