SQuirreL somehow interpreting vertical bar in varchar value?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SQuirreL somehow interpreting vertical bar in varchar value?

KARR, DAVID (ATTSI)
Now that I've turned off variable interpolation in my big sql import script, when I run it, it gets an odd error on a particular insert line.  It looks somewhat like this (mostly elided, except for the start of the values list):

    insert into blah (colname1,colname2,colname3,...) values (371,null,'433449 | 274027 - ...

In the error message, it says the syntax error is near "433449", and when it shows the entire query, the end of the line is the "9" at the end of that number.  It seems like that vertical bar character is doing something.

I don't know whether this is a mysql/mariadb issue, or SQuirreL.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: SQuirreL somehow interpreting vertical bar in varchar value?

John Hardin
On Tue, 25 Apr 2017, KARR, DAVID wrote:

> Now that I've turned off variable interpolation in my big sql import script, when I run it, it gets an odd error on a particular insert line.  It looks somewhat like this (mostly elided, except for the start of the values list):
>
>    insert into blah (colname1,colname2,colname3,...) values (371,null,'433449 | 274027 - ...
>
> In the error message, it says the syntax error is near "433449", and
> when it shows the entire query, the end of the line is the "9" at the
> end of that number.  It seems like that vertical bar character is doing
> something.
>
> I don't know whether this is a mysql/mariadb issue, or SQuirreL.

Take a look at Session -> Session Properties -> SQL tab -> Statement
Separator, is that perhaps set to vertical bar?

It doesn't make any sense for that to be the case, but that is one thing
that can cause Squirrel to break the parsing of SQL midway through.


--
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  [hidden email]    FALaholic #11174     pgpk -a [hidden email]
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   We should endeavour to teach our children to be gun-proof
   rather than trying to design our guns to be child-proof
-----------------------------------------------------------------------
  26 days since the first commercial re-flight of an orbital booster (SpaceX)

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: SQuirreL somehow interpreting vertical bar in varchar value?

KARR, DAVID (ATTSI)
> -----Original Message-----
> From: John Hardin [mailto:[hidden email]]
> Sent: Tuesday, April 25, 2017 2:57 PM
> To: KARR, DAVID <[hidden email]>
> Cc: [hidden email]
> Subject: Re: [Squirrel-sql-users] SQuirreL somehow interpreting vertical
> bar in varchar value?
>
> On Tue, 25 Apr 2017, KARR, DAVID wrote:
>
> > Now that I've turned off variable interpolation in my big sql import
> script, when I run it, it gets an odd error on a particular insert line.
> It looks somewhat like this (mostly elided, except for the start of the
> values list):
> >
> >    insert into blah (colname1,colname2,colname3,...) values
> (371,null,'433449 | 274027 - ...
> >
> > In the error message, it says the syntax error is near "433449", and
> > when it shows the entire query, the end of the line is the "9" at the
> > end of that number.  It seems like that vertical bar character is
> > doing something.
> >
> > I don't know whether this is a mysql/mariadb issue, or SQuirreL.
>
> Take a look at Session -> Session Properties -> SQL tab -> Statement
> Separator, is that perhaps set to vertical bar?
>
> It doesn't make any sense for that to be the case, but that is one thing
> that can cause Squirrel to break the parsing of SQL midway through.

It turns out the problem was in the "MySQL Script Settings", in the "Procedure/Function Separator" field.  It was "|", and I changed it to "|||" to fix this problem.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users
Reply | Threaded
Open this post in threaded view
|

Re: SQuirreL somehow interpreting vertical bar in varchar value?

Gerd Wagner-3
In reply to this post by KARR, DAVID (ATTSI)
Sorry my last redundant answer that John had already given.


Am 25.04.2017 um 21:34 schrieb KARR, DAVID:

> Now that I've turned off variable interpolation in my big sql import
> script, when I run it, it gets an odd error on a particular insert
> line.  It looks somewhat like this (mostly elided, except for the
> start of the values list):
>
> insert into blah (colname1,colname2,colname3,...) values
> (371,null,'433449 | 274027 - ...
>
> In the error message, it says the syntax error is near "433449", and
> when it shows the entire query, the end of the line is the "9" at the
> end of that number.  It seems like that vertical bar character is
> doing something.
>
> I don't know whether this is a mysql/mariadb issue, or SQuirreL.
This should be due to our MYSQL Plugin (MariaDB is based on MYSQL). See
menu File -> Global preferences -> Tab MySQL -> The procedure separator
is by default set to '|'. Change it for example to ';' and the problem
should be gone.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Squirrel-sql-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/squirrel-sql-users