String INSERT INTO Error with Quotes

Asked

Viewed 46 times

0

I have the INSERT INTO below that shows error in the field where the value is
'[/\d/, /\d/, /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/]'

INSERT INTO ADVDEV."Mascara"("Guid", "MascaraId", "EmpresaId", 
"GrupoEmpresaId", "TarefaId", "Codigo", "Sigla", "Descricao", "Prefixo", 
"Sufixo", "SeparadorNiveis", "QuantidadeNiveis", "SiglaAdicionaGrava", 
"Sequencial", "MascaraFormatada", "MascaraExpression", "DataCadastro", 
"DataAlteracao", "DataInativacao", "UsuarioCadastroId", 
"UsuarioAlteracaoId", "UsuarioInativacaoId", "Excluido") VALUES(1, 1410, 333, 348, 75, '3', 'PES', 'Pessoa', NULL, NULL, '.', 1, 'GRAVA', 'S', '9999/9999', 
'[/\d/, /\d/, /\d/, /\d/, '/', /\d/, /\d/, /\d/, /\d/]', NULL, NULL, NULL, NULL, NULL, NULL, 'N');

Can anyone help me insert this mask field? I believe the error may be in using quotation marks inside quotation marks:

  • 2

    Yes the error is in this '/' in the middle of what would be a string: '[/ d/, / d/, / d/, / d/, /', / d/, / d/, / d/]', but it is not interpreting as a single string since the ' character closes the string and / is not a field separator.

  • I was able to solve using 2 single quotes '[/\d/, /\d/, /\d/, /\d/, ''/'', /\d/, /\d/, /\d/, /\d/]'

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.