Re: Problem substituting inline parameter value in alter table statement

2009-08-25 Thread Nathan Maves
you need to use the string substitution option. $value$ nathan On Tue, Aug 25, 2009 at 4:15 PM, Evan McQuinn wrote: > Hello - > > I'm trying to run an alter table command to swap partitions in a large > Oracle table. I haven't found any documentation regarding alter table in > iBatis specifical

Re: Problem substituting inline parameter value in alter table statement

2009-08-25 Thread Evan McQuinn
Answered my own question: I just discovered that I'd missed the subtle syntax difference between dynamically provided parameters and actual chunks of sql; I need to use $value$ instead of #value#. Sorry 'bout that. - Evan Evan McQuinn wrote: Hello - I'm trying to run an alter table comma

Problem substituting inline parameter value in alter table statement

2009-08-25 Thread Evan McQuinn
Hello - I'm trying to run an alter table command to swap partitions in a large Oracle table. I haven't found any documentation regarding alter table in iBatis specifically, so I'm using the update mapping. Seems straightforward enough, but for some reason my inline #value# parameter is not be

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Yes - true, but in this case I would have had to use something like p6spy. Also I am integrating iBatis with a COTS application that does not use log4j or something similar. I could not find much searching for an alternative configuration (without log4j) to log ibatis sql statements etc.. Thanks,

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Rick
Definitely do what Nathan said and output the generated sql. That will let you catch these issues much sooner. On Tue, Aug 25, 2009 at 3:25 PM, Anoop kumar V wrote: > Yes - that was it. It is all working great now. not a single issue with > this.. > > thank you so much for all your help and I kn

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Yes - that was it. It is all working great now. not a single issue with this.. thank you so much for all your help and I know I just needed to be more careful with my typos... Thanks, Anoop On Tue, Aug 25, 2009 at 3:18 PM, Anoop kumar V wrote: > Oops - that is a big typo. I really need to be m

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Oops - that is a big typo. I really need to be more careful. Let me set that right and test again. Thanks, Anoop On Tue, Aug 25, 2009 at 3:02 PM, Rick wrote: > no clue what your table looks like but this doesn't seem right: iamsId for > both? > > where > iams_id = #old.iamsId:VARCH

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Rick
no clue what your table looks like but this doesn't seem right: iamsId for both? where iams_id = #old.iamsId:VARCHAR# // and isactive=#old.iamsId:VARCHAR# On Tue, Aug 25, 2009 at 2:29 PM, Anoop kumar V wrote: > Hi Rick, > > yes that was one of the typos

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Nathan Maves
Now is the time to turn on logging and see just what sql is being produced. set java.sql=DEBUG in your logging configuration. On Tue, Aug 25, 2009 at 12:29 PM, Anoop kumar V wrote: > Hi Rick, > > yes that was one of the typos in my earlier email, but I have corrected > that among other stuff (

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Hi Rick, yes that was one of the typos in my earlier email, but I have corrected that among other stuff (embarassing)!! My last email was also copy paste from my sqlmap and does not have that issue... My question is about the syntax to access a an attribute of an object that is passed as a value o

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Rick
Was that copy and paste? I think you want "new.divisionName" now "newdivisionName" (assuming "new" is the key) On Tue, Aug 25, 2009 at 11:40 AM, Anoop kumar V wrote: > Hi Larry, > > Was wondering if you could help me clarify one thing more... > > I have my sqlmap as below: > > > update user_

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Ok - now I do not get any errors in any logs, but the update does not seem to be trigerring. Can someone please confirm that the syntax in my sqlmap is correct? update user_approvers set iams_id = #new.iamsId:VARCHAR#, region_name = #new.regionName:VARCHAR#,

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Yes - thank you Nathan. I realize I have quite a few typos in my sql... Let me get all those cleared before reaching out again for help. Appreciate your help. Thanks, Anoop On Tue, Aug 25, 2009 at 11:48 AM, Nathan Maves wrote: > Anoop, > > What you are getting is a SQL exception. This means th

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Nathan Maves
Anoop, What you are getting is a SQL exception. This means that ibatis has already done its job. I would guess that your issue is with the reuse of the word "set" before the region_name column. nathan On Tue, Aug 25, 2009 at 9:40 AM, Anoop kumar V wrote: > Hi Larry, > > Was wondering if you c

Re: Newbie question: Update table that has no key / id

2009-08-25 Thread Anoop kumar V
Hi Larry, Was wondering if you could help me clarify one thing more... I have my sqlmap as below: update user_approvers set iams_id = #new.iamsId:VARCHAR#, set region_name = #new.regionName:VARCHAR#, division_name = #newdivisionName:VARCHAR#,