Suppose I have the following statement
Invoke-Sqlcmd -Query "UPDATE [$Table]
SET [size] = '$newSize.Size $newSize.Unit'
WHERE [cname] = '$cube'" -ConnectionString $CS
This doesn't work and throws the following error:
Invoke-Sqlcmd : String or binary data would be truncated. The statement has been terminated.
In the table, I see this in the field:
@{Size=919.8; Unit=MB}.Size
This is because I'm setting two variables in one statement, but what is the proper syntax for that?
I am trying to store the following value: 919.8 MB
I tried this: '$estimatedSize.Size','$estimatedSize.Unit'
But it doesn't work either
More info related to this thread: https://stackoverflow.com/a/57531267/8397835