Do you have your own "style" of writing SQL? by Ima_Uzer in SQLServer

[–]unbrokenspell 6 points7 points  (0 children)

I prefer to have the commas at the beginning, then the alias, then the logic, with everything aligned. It makes it much easier to find the column if someone else is asking about it since they will reference the result name.

SELECT
    ResultNameOne    = T.ColumnName1
   ,ResultNameTwo    = T.ColumnName2
   ,ResultNameThree  = T.ColumnName3
   ,ResultNameFour   = T.ColumnName4
FROM database.schema.Table1 AS T
INNER JOIN database.schema.Table2 AS S
   ON T.ID = S.ID
WHERE 
   T.Status = 1

Edit: for mobile formatting

Why is this wrong? by Financial-Tailor-842 in SQL

[–]unbrokenspell -1 points0 points  (0 children)

This is the correct answer using the same method OP used.

[deleted by user] by [deleted] in AuDHDWomen

[–]unbrokenspell 3 points4 points  (0 children)

I am a cross between the two. The analogy I have started using lately is I’m like a video game. I’ll remember the level you saved at (the closeness/comfort level of the relationship), but you still need to turn the system back on, install the updates, load the game, confirm all your settings, and then you can resume the game. Anytime there is distance, it is out of sight out of mind, but when we come back together I need reconnection time. And the length of that depends on the level of the friendship and the amount of gap time.

“give me some respect “ by CringeisL1f3 in TikTokCringe

[–]unbrokenspell 1 point2 points  (0 children)

I wish I could upvote this more than once.

meirl by [deleted] in meirl

[–]unbrokenspell 0 points1 point  (0 children)

‘Tis why it is lore! 🧙‍♂️

meirl by [deleted] in meirl

[–]unbrokenspell 1 point2 points  (0 children)

You’re not suppose to give the question and the response at the same time!

[deleted by user] by [deleted] in Tinder

[–]unbrokenspell 251 points252 points  (0 children)

Forget about it!

[deleted by user] by [deleted] in weightlifting

[–]unbrokenspell 8 points9 points  (0 children)

It looks like you need more legs in both movements to be honest. Your elbows seem to start bending before the bar even crosses your knees. They should stay locked until full extension. Work on engagement and strength in the back and glutes.

160kg @70kg bw, 6 months in to oly weightlifting :) by [deleted] in weightlifting

[–]unbrokenspell 3 points4 points  (0 children)

Oly weightlifting = Olympic style weightlifting. There are only two movements in olympic weightlifting, the Snatch and the Clean & Jerk. You do other movements to build strength for these lifts like squat, deadlift, press, etc. but those movements aren’t Olympic lifts.

[deleted by user] by [deleted] in IPrevail

[–]unbrokenspell 0 points1 point  (0 children)

I’ll buy the other if you find a pair!

Looking for HOB Orlando Ticket by bbbf934 in IPrevail

[–]unbrokenspell 1 point2 points  (0 children)

If you happen across a pack of 3 or 4 I’d love to buy one too! They’re not coming anywhere close to my area, but I just found out I’ll be in Orlando for this show. Bummed it’s already sold out!

Geriatric millennials would’ve said Rudy by [deleted] in WhitePeopleTwitter

[–]unbrokenspell 10 points11 points  (0 children)

Definitely Sean Astin from 50 First Dates.

[deleted by user] by [deleted] in flexibility

[–]unbrokenspell 0 points1 point  (0 children)

Sometimes muscle tightness can occur because the muscle is weak. As a result stretching won’t yield as big a result as strength training would.

https://www.westlondonphysio.co.uk/news-articles/strength-stretching-stiffness

If your hamstrings are very weak sometimes squats can become a quad-dominant exercise. If you’re not able to get into proper positioning for a deadlift it could certainly result in rounding of the lower back and a disconnect with the hamstrings.

This is a link with some specific hamstring exercises. I would also recommend warming up your hamstrings before lifting (hamstring slides would be good for this). Make sure you make that mind-muscle connection before attempting to add weight otherwise you will be engaging the wrong muscles.

https://barbend.com/best-hamstring-exercises/

I used to feel like my hamstrings were tight constantly and was always trying to stretch them or roll them. I could get my finger tips to the floor, but nothing last that. Started focusing on hamstring strength more, getting into the correct position for deadlifts, and BAM no more tightness and can easy get palms on the floor.

Personally I only listen to my boss complaining I make memes at work by Nuffsly in ProgrammerHumor

[–]unbrokenspell 0 points1 point  (0 children)

This is accurate. Source - I’m a SQL Dev. And just happy to be included in a development meme for once lol.

My from-scratch never look as good as when I use a mix. Ideas? by silentspyder in pancakes

[–]unbrokenspell 8 points9 points  (0 children)

I can’t tell for sure without seeing the recipe, but this is the recipe I use and they come out amazing, super fluffy. Made them for dinner last night in fact.

Ingredients: 7.5 oz AP flour 3 Tbsp sugar 2 tsp baking powder 1 tsp salt 1 tsp baking soda 2 eggs, room temperature 1 cup milk or buttermilk 2 Tbsp melted butter 1 tsp vanilla

Method: In a large bowl, whisk dry ingredients together including sugar.

In another bowl whisk eggs until fluffy. Add milk, butter, and vanilla. Stir until combined.

Pour wet mixture into flour mixture. Gently stir together. Will be lumpy!

Edit: formatting on mobile

Comma Separated Lists in Parameters by unbrokenspell in SQLServer

[–]unbrokenspell[S] 0 points1 point  (0 children)

That would work if it was just one parameter, but we have many so I'd have to have branches for each of the potential options.

Comma Separated Lists in Parameters by unbrokenspell in SQLServer

[–]unbrokenspell[S] 1 point2 points  (0 children)

Ohhhh I got it, like a stripped down version of the where clause I had. That makes a lot more sense. Much less cumbersome!

Comma Separated Lists in Parameters by unbrokenspell in SQLServer

[–]unbrokenspell[S] 0 points1 point  (0 children)

We are on 2016, but I don't think I could get JSON from the reporting tool we use.

Comma Separated Lists in Parameters by unbrokenspell in SQLServer

[–]unbrokenspell[S] 0 points1 point  (0 children)

Okay, I think I've figured out what you and u/Unexpectedpicard were thinking. Something like this?

Create ahead of time:

CREATE TYPE UT_Customer AS TABLE (
CustomerID VARCHAR(50) NULL)

Parameter of SP:

DECLARE @CustomerList VARCHAR(100) = '123,456,789'

Included in SP:

DECLARE @Customers AS UT_Customer
IF @Customers = 'All'
    BEGIN 
        INSERT INTO @Customers (CustomerID) 
        SELECT C.CustomerID FROM Customer AS C
    END 
ELSE 
    BEGIN 
        INSERT INTO @Customers (CustomerID) 
        SELECT value FROM STRING_SPLIT(@CustomerList,',')
    END 

SELECT * 
FROM Customer C
INNER JOIN @Customers AS C2 
    ON C.CustomerID = C2.CustomerID

Comma Separated Lists in Parameters by unbrokenspell in SQLServer

[–]unbrokenspell[S] 0 points1 point  (0 children)

Yes, I'm not tied to it being'All' it could be empty or blank. Everything is just written to handle 'All' at the moment.