ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Meadors <larry.mead...@gmail.com>
Subject Re: How to get ## into a SQL statement
Date Tue, 12 Jul 2005 15:44:48 GMT
Sorry i di not chime in earlier, the # is reserved, so to get this"

select * from #myTable

You would use 

select * from ##myTable

...and for ##, you would use ####. That is on the wiki: http://tinyurl.com/9n4sc

Larry


On 7/12/05, Barnett, Brian W. <brian.barnett@pearson.com> wrote:
> I ended up doing this and it worked fine:
> 
> SELECT *
> FROM ####$paramTempTable$
> 
> If I included the ## as part of paramTempTable, I got an error. I can't
> remember what the error was. Seems like it was some obscure error. Something
> about "@P0" or something.
> 
> Thanks all for your suggestions.
> 
> -----Original Message-----
> From: Larry Meadors [mailto:larry.meadors@gmail.com]
> Sent: Tuesday, July 12, 2005 8:59 AM
> To: user-java@ibatis.apache.org; Brice Ruth
> Subject: Re: How to get ## into a SQL statement
> 
> 
> The remapResults attribute should not be required - the table name changes,
> but the column list does not.
> 
> Larry
> 
> On 7/12/05, Brice Ruth <bdruth@gmail.com> wrote:
> > I think your problem is that you need to use $paramTempTable$ to
> > parameterize your table. You'll probably also need to set
> > remapResults="true" in your mapped statement definition.
> 
> ****************************************************************************
> This email may contain confidential material.
> If you were not an intended recipient,
> Please notify the sender and delete all copies.
> We may monitor email to and from our network.
> ****************************************************************************
>

Mime
View raw message