I am trying to alter credentials using this SQL query:
ALTER CREDENTIAL credential_name WITH IDENTITY = 'identity_name'
[ , SECRET = 'secret' ]
And the issue is that my credential_name has a space in it. So that would make my query look something like:
ALTER CREDENTIAL HCC SQL WITH IDENTITY = 'username', SECRET = 'password';
Running this, I get these errors:
Msg 102, Level 15, State 1, Line 4
Incorrect syntax near 'SQL'.Msg 319, Level 15, State 1, Line 4
Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
So I was wondering if there is a way to skip the space in this query?
Or would I have to change my credential_name to something with no spaces?