Skip to content
Advertisement

Tag: tsql

SQL Server : sum and multiplies on 2 tables

I need help to SUM and MULTIPLIES on join 2 tables: tb1 tb2 In tb1, I need to sum QTY and multiples SKU with PRICE without repeating same SKU (21135208, 21035621): Current query: My result is: Expected result is: Answer I believe that you could filter out duplicates by using a subquery like SELECT DISTINCT … FROM tb1, while leaving

Extract a specific value from a string in a column

Need help with a situation, I need to extract a specific value from a column containing string. The string varies over different records, but the value I need to extract is always preceded by the word “VERSION” I tried to user REVERSE & SUBSTRING but not able to get exact results. Any help will be greatly appreciated the table looks

Advertisement