Name Value
---- -----
PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\1.0.67\dbatools.psd1
Version : 1.0.67
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.834\dbatools.psd1
Version : 0.9.834
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.419\dbatools.psd1
Version : 0.9.419
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.373\dbatools.psd1
Version : 0.9.373
Microsoft SQL Server 2016 (SP2-CU8) (KB4505830) - 13.0.5426.0 (X64) Jul 21 2019 21:16:47
Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 <X64> (Build 18362: ) (Hypervisor)
When using Copy-DbaDbTableData and the source table has a leading numeric as the table name eg 4Badges, the the following line:
Copy-DbaDbTableData -SqlInstance mySQL2016 -Destination mySQL2016-Database StackOverflow2013 -DestinationDatabase DBATools -Table 4Badges -AutoCreateTable
Will error with:
**WARNING: [12:14:39][Copy-DbaDbTableData] Unable to determine destination table: [dbo].[4Badges] | Incorrect syntax near '$14'.**
If I alter the table name to remove the leading numeric, or add letter before it, the code runs without issue.
If anything other than powershell.exe was used, please confirm that you can duplicate the issue with powershell.exe
no output from that line.
Copy-DbaDbTableData -SqlInstance mySQL2016 -Destination mySQL2016-Database StackOverflow2013 -DestinationDatabase DBATools -Table 4Badges -AutoCreateTable
WARNING: [12:14:39][Copy-DbaDbTableData] Unable to determine destination table: [dbo].[4Badges] | Incorrect syntax near '$14'.
This issue has been automatically marked as stale because it has not had recent activity. If you would like this issue to remain open:
I am unable to reproduce this in the current version.

yesss thank you so much @jaxnoth !
If you could not replicate it on latest version then all good. I think I was on 0.9 something.