Viewing 9 posts - 16 through 24 (of 24 total)
Steve Jones - SSC Editor wrote:If I understand this, you are inserting data into a staging table in Azure SQL from an on-premises table. Then, you want to essentially upsert or merge this data...
November 27, 2020 at 8:18 am
Damn... I forgot the GROUP BY. Serves me right for posting so late without any test data to check with. That's no good excuse but those are the reasons.
Thank...
September 2, 2020 at 4:18 pm
If it works correctly, don't go away, there's still some to learn. We also need to know which version of SQL Server you're using. Hopefully, it's at least...
September 2, 2020 at 4:09 pm
Is there a quantity column in the table tblAssets?
No, quantity belongs to tblLocationAssets
September 2, 2020 at 11:37 am
Replace the code for @SQL2 and its related comment with this. You might also want to fix the location names in the future... a lot of them have trailing...
September 2, 2020 at 9:36 am
So print out the dynamic SQL and post it. It's likely going to be in line 9 of the Dynamic SQL.
WITH ctePreAgg AS
(
SELECT asset_id,...
September 2, 2020 at 6:28 am
--===== Local variables to hold the 3 different sections of Dynamic SQL.
DECLARE @SQL1 VARCHAR(MAX) -- First part, which is static
...
September 2, 2020 at 5:34 am
How many rows do you have in the tbl_Projects table?
Sir, there are 51 rows.
September 2, 2020 at 4:00 am
There are several reporting tools that support a dynamic pivot out of the box.
Sir, I just need it for presentation purposes only. Please suggest any tool which can run...
September 1, 2020 at 7:31 pm
Viewing 9 posts - 16 through 24 (of 24 total)