On Wed, 18 Jan 2012, Paulus Gunawan wrote:
> Hi Gerd,
>
> Thanks for your advice.
> It seemed this can prevent the typo error to happen again.
No, it won't prevent the typo, it will just prevent the typo causing you
to do unintended things from Squirrel.
If you regularly make that particular typo when coding SQL then you have
problems that changing the delimiter in Squirrel will not cure...
> ----- Original Message -----
> From: Gerd Wagner <ger...@t-...>
> To: Paulus Gunawan <pau...@ya...>
> Cc: "squ...@li..." <squ...@li...>
> Sent: Friday, January 13, 2012 1:38 AM
> Subject: Re: [Squirrel-sql-users] A wrong SQL Update statement and Squirrel detect it, but still the first part of SQL statement is being executed
>
> On 12.01.2012 15:02, Paulus Gunawan wrote:
>>
>> Recently I got a very bad accident because I wrongly wrote the SQL
>> statement as follows:
>> UPDATE TABLE_A WHERE STATUS = 'X' ; AND KEY='Y';
>
> Please go to menu File --> New Session Properties --> Tab SQL and see if the statement separator is set to ";". This will probably be the reason for your troubles:
> SQuirreL interpreted "UPDATE TABLE_A WHERE STATUS = 'X' ; AND KEY='Y'" as two statements. The first "UPDATE TABLE_A WHERE STATUS = 'X'" was executed correctly and the second "AND KEY='Y'" was erroneous.
>
> To prevent this problem you may change the separator to a different character or string.
--
John Hardin KA7OHZ http://www.impsec.org/~jhardin/
jh...@im... FALaholic #11174 pgpk -a jh...@im...
key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
Maxim XXXVII: There is no 'overkill.' There is only 'open fire' and
'time to reload.'
-----------------------------------------------------------------------
4 days until John Moses Browning's 157th Birthday
|