Skip to main content
formatting, added tag and removed thanks
Source Link
Shanky
  • 19.1k
  • 4
  • 36
  • 58

I would like to combine these queries:

UPDATE T1
SET Opening_date = T2.Opening_date
FROM FactTransaction T1
INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey
 

and

UPDATE FactTransaction
SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field "Opening_date"Opening_date in my fact table. I don't know how to do it just with a query.

Thank you

I would like to combine these queries:

UPDATE T1
SET Opening_date = T2.Opening_date
FROM FactTransaction T1
INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey
 
UPDATE FactTransaction
SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field "Opening_date" in my fact table. I don't know how to do it just with a query.

Thank you

I would like to combine these queries:

UPDATE T1
SET Opening_date = T2.Opening_date
FROM FactTransaction T1
INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey

and

UPDATE FactTransaction
SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field Opening_date in my fact table. I don't know how to do it just with a query.

I would like to combine these queries:

UPDATE T1 SET Opening_date = T2.Opening_date FROM FactTransaction T1 INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey

UPDATE FactTransaction SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

UPDATE T1
SET Opening_date = T2.Opening_date
FROM FactTransaction T1
INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey

UPDATE FactTransaction
SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field "Opening_date" in my fact table. I don't know how to do it just with a query.

Thank you

I would like to combine these queries:

UPDATE T1 SET Opening_date = T2.Opening_date FROM FactTransaction T1 INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey

UPDATE FactTransaction SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field "Opening_date" in my fact table. I don't know how to do it just with a query.

Thank you

I would like to combine these queries:

UPDATE T1
SET Opening_date = T2.Opening_date
FROM FactTransaction T1
INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey

UPDATE FactTransaction
SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field "Opening_date" in my fact table. I don't know how to do it just with a query.

Thank you

Source Link
Miguel
  • 365
  • 2
  • 5
  • 14

How can I combine two queries

I would like to combine these queries:

UPDATE T1 SET Opening_date = T2.Opening_date FROM FactTransaction T1 INNER JOIN DimStore T2 ON T1.cod_Store = T2.Cod_StoreKey

UPDATE FactTransaction SET ORDINAL = DATEDIFF(DAY, Opening_Date, DATE)

In order to avoid insert the field "Opening_date" in my fact table. I don't know how to do it just with a query.

Thank you