question

jacob_g avatar image
jacob_g asked

Split a column based on timerange

I have two tables:


Table 1

Datefrom Dateto DIM_code

20160101 20161231 dim_1

20170101 20191231 dim_2

Table 2

Date DIM_code

20160215 20

20170724 37

I need a table like this:

Date dim_1 dim_2

20160215 20

20170724 37

t-sqlsql server 2017
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.