|
Is there any way to execute mySql functions within a statement? For
example, there is the mySql compress() function and the now() function that we want to use when executing a statement in the mapping file. As of now, using the verbiage directly is causing a "com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax" Exception. Any ideas? Thanks |
|
This should work. Can you give an example of what you're trying to do?
Jeff Butler On Thu, Apr 12, 2012 at 4:33 PM, javaDeveloper <[hidden email]> wrote: > Is there any way to execute mySql functions within a statement? For > example, there is the mySql compress() function and the now() > function that we want to use when executing a statement in the mapping > file. As of now, using the verbiage directly is causing a > "com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an > error in your SQL syntax" Exception. > > Any ideas? Thanks > > |
|
For trail purposes, let me reply to the posting the same thing I said
directly to Jeff: insert into <table> (CONO92,SKEY92,STATUS,TYPE,SEQ92,CUST92,DateStamp) VALUES (#{cono}, #{customerKey}, #{status}), #{type}, #{sequenceNum}, #{customer}, NOW()) Of course, <table> is the specific table I'm inserting into. Thanks On Apr 12, 3:45 pm, Jeff Butler <[hidden email]> wrote: > This should work. Can you give an example of what you're trying to do? > > Jeff Butler > > > > > > > > On Thu, Apr 12, 2012 at 4:33 PM, javaDeveloper <[hidden email]> wrote: > > Is there any way to execute mySql functions within a statement? For > > example, there is the mySql compress() function and the now() > > function that we want to use when executing a statement in the mapping > > file. As of now, using the verbiage directly is causing a > > "com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an > > error in your SQL syntax" Exception. > > > Any ideas? Thanks |
|
:)
I said this: You have a close parenthesis after #{status}. I think that's the problem. Jeff Butler On Thu, Apr 12, 2012 at 4:57 PM, javaDeveloper <[hidden email]> wrote: > For trail purposes, let me reply to the posting the same thing I said > directly to Jeff: > insert into <table> (CONO92,SKEY92,STATUS,TYPE,SEQ92,CUST92,DateStamp) > VALUES (#{cono}, > #{customerKey}, > #{status}), > #{type}, > #{sequenceNum}, > #{customer}, > NOW()) > > Of course, <table> is the specific table I'm inserting into. > > Thanks > On Apr 12, 3:45 pm, Jeff Butler <[hidden email]> wrote: >> This should work. Can you give an example of what you're trying to do? >> >> Jeff Butler >> >> >> >> >> >> >> >> On Thu, Apr 12, 2012 at 4:33 PM, javaDeveloper <[hidden email]> wrote: >> > Is there any way to execute mySql functions within a statement? For >> > example, there is the mySql compress() function and the now() >> > function that we want to use when executing a statement in the mapping >> > file. As of now, using the verbiage directly is causing a >> > "com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an >> > error in your SQL syntax" Exception. >> >> > Any ideas? Thanks |
|
duh!!!
Thanks Jeff... On Apr 12, 4:02 pm, Jeff Butler <[hidden email]> wrote: > :) > > I said this: > > You have a close parenthesis after #{status}. I think that's the problem. > > Jeff Butler > > > > > > > > On Thu, Apr 12, 2012 at 4:57 PM, javaDeveloper <[hidden email]> wrote: > > For trail purposes, let me reply to the posting the same thing I said > > directly to Jeff: > > insert into <table> (CONO92,SKEY92,STATUS,TYPE,SEQ92,CUST92,DateStamp) > > VALUES (#{cono}, > > #{customerKey}, > > #{status}), > > #{type}, > > #{sequenceNum}, > > #{customer}, > > NOW()) > > > Of course, <table> is the specific table I'm inserting into. > > > Thanks > > On Apr 12, 3:45 pm, Jeff Butler <[hidden email]> wrote: > >> This should work. Can you give an example of what you're trying to do? > > >> Jeff Butler > > >> On Thu, Apr 12, 2012 at 4:33 PM, javaDeveloper <[hidden email]> wrote: > >> > Is there any way to execute mySql functions within a statement? For > >> > example, there is the mySql compress() function and the now() > >> > function that we want to use when executing a statement in the mapping > >> > file. As of now, using the verbiage directly is causing a > >> > "com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an > >> > error in your SQL syntax" Exception. > > >> > Any ideas? Thanks |
| Powered by Nabble | Edit this page |
