parallel-data-warehouse

Export All Views to Text Files

时光总嘲笑我的痴心妄想 提交于 2020-01-25 09:27:05
问题 There are a number of views in a database on one of our servers. I need to save all the view definitions as text files in the following format: IF OBJECT_ID('<[Schema_Name].[VIEW_NAME]>') IS NOT NULL DROP VIEW <[Schema_Name].[VIEW_NAME]> GO <<View Definition Here>> GO GRANT SELECT ON <[Schema_Name].[VIEW_NAME]> TO [PUBLIC] GO The text file should be named as Schema_Name.VIEW_NAME.txt I don't want to do this manually as this would take up all my time. Any idea if this can be automated? Maybe

How to insert multiple rows into SQL Server Parallel Data Warehouse table

浪子不回头ぞ 提交于 2019-12-19 10:28:36
问题 I am on PDW AU5 with SQL Server 2012 servers. I have an empty replicated table that I'm trying to load data into. I'm only loading 2 records. So, I'm doing: INSERT INTO dbo.some_table (Col1, Col2, Col3) VALUES (1, 'x', 'a'), (2, 'y', 'b') From the books online, this should work. (It works on SMP.) However, PDW throws an error stating: Parse error at line: 4, column: x: Incorrect syntax near ','. The comma that this error is referring to is the one after the first tuple. What am I doing wrong?

How to insert multiple rows into SQL Server Parallel Data Warehouse table

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 04:32:55
I am on PDW AU5 with SQL Server 2012 servers. I have an empty replicated table that I'm trying to load data into. I'm only loading 2 records. So, I'm doing: INSERT INTO dbo.some_table (Col1, Col2, Col3) VALUES (1, 'x', 'a'), (2, 'y', 'b') From the books online, this should work. (It works on SMP.) However, PDW throws an error stating: Parse error at line: 4, column: x: Incorrect syntax near ','. The comma that this error is referring to is the one after the first tuple. What am I doing wrong? Is inserting multiple rows via INSERT INTO not allowed on AU5? The documentation on MSDN for INSERT