|
|
#83497 |
|
ProCrastinationConsultant
Join Date: Sep 2013
Drives: '14 Ranger, '18 Tacoma 4Dr LB
Location: chicago-ish
Posts: 11,315
Thanks: 35,124
Thanked 13,637 Times in 6,772 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,315
Thanks: 35,124
Thanked 13,637 Times in 6,772 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 |
|
fabulous
Join Date: Sep 2014
Drives: a 13 e8h frs
Location: vantucky, wa
Posts: 31,757
Thanks: 51,916
Thanked 36,357 Times in 18,841 Posts
Mentioned: 1104 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 |
|
fabulous
Join Date: Sep 2014
Drives: a 13 e8h frs
Location: vantucky, wa
Posts: 31,757
Thanks: 51,916
Thanked 36,357 Times in 18,841 Posts
Mentioned: 1104 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: 685
Thanks: 430
Thanked 826 Times in 393 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 |
|
Connection issues
Join Date: Mar 2016
Drives: '15 ultramarine
Location: Idaho
Posts: 13,094
Thanks: 5,414
Thanked 18,063 Times in 8,534 Posts
Mentioned: 154 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,315
Thanks: 35,124
Thanked 13,637 Times in 6,772 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,335
Thanks: 25,880
Thanked 12,335 Times in 6,087 Posts
Mentioned: 85 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,335
Thanks: 25,880
Thanked 12,335 Times in 6,087 Posts
Mentioned: 85 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: 685
Thanks: 430
Thanked 826 Times in 393 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,335
Thanks: 25,880
Thanked 12,335 Times in 6,087 Posts
Mentioned: 85 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: 685
Thanks: 430
Thanked 826 Times in 393 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,335
Thanks: 25,880
Thanked 12,335 Times in 6,087 Posts
Mentioned: 85 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,338
Thanks: 1,023
Thanked 2,499 Times in 1,079 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: |
![]() |
| Thread Tools | Search this Thread |
|
|
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 |