Skip to content
Advertisement

Tag: sql-server-2019

Using Identity or sequence in data warehouse

I’m new to data warehouse, So I try to follow the best practice, mimicking some implementation details from the Microsoft Demo DB WideWorldImportersDW, One of the things that I have noticed is using Sequence as default value for PK over Identity. Could I ask, If it’s preferable to use Sequence over Identity in data warehouse in general and Which one

Extract number before and after character

I need to extract a certain number from my ‘TblA’ from column ‘Input’ in sql. I have the following example input and desired output 1 and 2. Input Desired Output 1 Desired Output 2 20 x 88 nc. 20 88 100 x 300 nc 100 300 200x 88 nc. 200 88 5x 300 nc 5 300 ol (200x 88nc.) 200

Split data in column based on value of in another column

I have a table full of Artist and Track Titles that is imported from two different places. Some are correct with Artist and Title in different columns but then there are other rows where everything is in the Title column separated with ‘-‘ and the Artist column is NULL. Changing it at the source is not an option because both

Advertisement