I have a difficulty with TOracleScript and the character '&'
If I enter in the property edidor for lines:
UPDATE DASHBOARD SET
TYPE_GOV = (case when (offer = 'S&S only') then 'SUP'
else (case when ((type = 'Tiger') or (type = 'NH') or (type = 'FTH')) then 'GOV'
else 'COM' END) END);
the string 'S&S only' is nether recognized.
The same problem if I add the string by
OracleScript1.Lines.Add('UPDATE DASHBOARD SET ');
OracleScript1.Lines.Add('TYPE_GOV = (case when (offer = ''S&S only'') then ''SUP''');
OracleScript1.Lines.Add('else (case when ((type = ''Tiger'') or (type = ''NH'') or (type = ''FTH'')) then ''GOV''');
OracleScript1.Lines.Add('else ''COM'' END) END);');
OracleScript1.Lines.Add('COMMIT;');
But if I use for example a TOracleDataSet all is fine
OracleDataSet1.SQL.Text := 'UPDATE DASHBOARD a SET ' +
'TYPE_GOV = (case when (offer = ''S&S only'') then ''SUP'' ' +
'else (case when ((type = ''Tiger'') or (type = ''NH'') or (type = ''FTH'')) then ''GOV'' ' +
'else ''COM'' END) END)';
OracleDataSet1.ExecSQL;
the string 'S&S only' is recognized.
All tests are with the same OracleSession.
How can I use OracleScript with this character in string?
Thanks,
Pierre
If I enter in the property edidor for lines:
UPDATE DASHBOARD SET
TYPE_GOV = (case when (offer = 'S&S only') then 'SUP'
else (case when ((type = 'Tiger') or (type = 'NH') or (type = 'FTH')) then 'GOV'
else 'COM' END) END);
the string 'S&S only' is nether recognized.
The same problem if I add the string by
OracleScript1.Lines.Add('UPDATE DASHBOARD SET ');
OracleScript1.Lines.Add('TYPE_GOV = (case when (offer = ''S&S only'') then ''SUP''');
OracleScript1.Lines.Add('else (case when ((type = ''Tiger'') or (type = ''NH'') or (type = ''FTH'')) then ''GOV''');
OracleScript1.Lines.Add('else ''COM'' END) END);');
OracleScript1.Lines.Add('COMMIT;');
But if I use for example a TOracleDataSet all is fine
OracleDataSet1.SQL.Text := 'UPDATE DASHBOARD a SET ' +
'TYPE_GOV = (case when (offer = ''S&S only'') then ''SUP'' ' +
'else (case when ((type = ''Tiger'') or (type = ''NH'') or (type = ''FTH'')) then ''GOV'' ' +
'else ''COM'' END) END)';
OracleDataSet1.ExecSQL;
the string 'S&S only' is recognized.
All tests are with the same OracleSession.
How can I use OracleScript with this character in string?
Thanks,
Pierre