Skip to content

SQL Select between mixture of text and numeric

Not sure if it’s possible to do this in SQL but… I’m having difficulty selecting results between certain criteria. I have a column that is a mixture of text and numeric. For example: LOC:05-04-01. I’…

function that allows grouping of rows

I’m using SQL Server Management Studio 2012. I have a similar looking output from a query shown below. I want to eliminate someone from the query who has 2 contracts. Select Row_Number() over (…

Update values in column

I have following SQL-Table: A B C D “1” 2 3 “4” “2” 4 4 “5” “4” 1 6 “9” I would like to remove the “” So my result should look like this: A B C D 1 2 3 4 2 4 4 5 4 1 6 9

Dynamic horizontal aggregate (AVG)

I have a table which contains 3 float(nullable) columns: Value1 || Value2 || Value3 NULL NULL 100.00 10.00 20.00 NULL 10.00 10.00 100.00 I need to get the …

Grouping by column and rows

I have a table like this: +—-+————–+——–+———-+ | id | name | weight | some_key | +—-+————–+——–+———-+ | 1 | strawberries | 12 | 1 | | 2 |…