Menu

#1231 Results of Multi operation are incorrect

SQuirreL
open
nobody
None
5
2016-01-30
2016-01-19
No

Hi,

In squirrel 3.7, if I run a couple of pieces of SQL together, the report output states each operation and rowcount in order of processing, however it retains the type of operation through its entire report.

For instance:

**delete** from log.lastrun where PackageName in ('Chicken', 'Turkey');
**insert** into log.lastrun (PackageName, TaskName, ExpectedDaysBehind)
values ('Chicken', 'DFP:Merge User IDs Step 01', 2)
 ,('Chicken', 'DCM:Merge User IDs Step 02', 2);
**insert** into log.lastrun (PackageName, TaskName, ExpectedDaysBehind)
values ('Turkey', 'Merge User IDs Step 01', 2)
 ,('Turkey', 'Merge User IDs Step 02', 2)

Results:
4 Row(s) Deleted
2 Row(s) Deleted
2 Row(s) Deleted

Discussion

  • Joseph Ercole

    Joseph Ercole - 2016-01-19

    Whoops: Forgot to take my "bolds" off when I put it in a code block.

     
  • Neville Rowe

    Neville Rowe - 2016-01-30

    hi - which database was this with and can you check in the session properties that there isn't a custom statement separator set to something other than semi-colon (given your example above uses a semi-colon separator)? I just tried a quick test against hsqldb using the latest git version which did the right thing.

    4 Row(s) Deleted
    Query 1 of 3, Rows read: 0, Elapsed time (seconds) - Total: 0.015, SQL query: 0.015, Reading results: 0
    2 Row(s) Inserted
    Query 2 of 3, Rows read: 0, Elapsed time (seconds) - Total: 0, SQL query: 0, Reading results: 0
    2 Row(s) Inserted
    Query 3 of 3, Rows read: 0, Elapsed time (seconds) - Total: 0, SQL query: 0, Reading results: 0
    
     
  • Joseph Ercole

    Joseph Ercole - 2016-01-30

    Hi Neville,

    Ya know, if I wasn't on the run that day, I'd have dug a little more to provide more detail. Sorry about that.

    I just checked and

    • The separator, by default (potentially due to the driver), is just GO. That's more for batch separation so that's not great.
    • Under these circumstances, if I use GO, the result output is correct (differentiating the types of statements
    • If I change the separator to semicolon in the settings, and I use semicolon, it also works correctly.

    So that does get around the issue.

    Thanks for the suggestion.Have a great day!

    Joe

     
  • Neville Rowe

    Neville Rowe - 2016-01-30

    I think you must be using Sybase or MS SQL Server - for both of them the db-specific plugin in SquirrelSQL sets the statement separator to GO. That is so that SquirrelSQL emulates the native clients for those databases. If you switch db server types regularly then it's perhaps not the behaviour you want. Easy to rectify through the properties as you've noticed. The reason I use SquirrelSQL is so that I can use the same client on multiple DB servers, so I tend to reset the properties to be common.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.