Copy-DbaDbTableData, Unable to copy data using a sql query but working when copying data from table to table, attaching debug level logs #8967
Unanswered
shsharmaivp
asked this question in
General
Replies: 1 comment
-
copy-DbaDbTableData -SqlInstance "192.168.0.102" -Database "testdb" -SqlCredential $Cred -DestinationTable "[dbo].[copytable3]" -View "[dbo].[customViewCheck]" -Query "select * from dbo.customViewCheck where average_cost_base_eod < 3" -AutoCreateTable
When the Source Table or View parameter is provided, it is working correctly (copying data from the query). However, I would like to omit the Table or View parameter and want to pass only the query parameter to copy data to the destination table. how can i achieve this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm using Copy-DbaDbTableData function to move data between tables, there is also a query option that will enable us to move data returned from the query to the destination table. But in my case, it is not working.
When I use the source and destination table options (not query) then it is working fine.
Attaching the debug level logs for both scenarios.
Moving Data from Table to Table
Moving data using SQL Query
This it, logs stoped here for query option.
Beta Was this translation helpful? Give feedback.
All reactions