ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narasimha Prasad" <pras...@dbo2.com>
Subject RE: How to escape special characters (specifically '#')
Date Thu, 10 Mar 2005 21:06:38 GMT
That did the trick ! 

Thanks,
Prasad
-----Original Message-----
From: Ron Grabowski [mailto:rongrabowski@yahoo.com] 
Sent: Thursday, March 10, 2005 12:57 PM
To: ibatis-user-java@incubator.apache.org
Subject: Re: How to escape special characters (specifically '#')

Have you tried using two pound signs?

 INSERT INTO ##tempCount
 
--- Narasimha Prasad <prasadn@dbo2.com> wrote:
> Hi 
> 
>  
> 
> Is there a way to escape the ‘#’ characters used in iBATIS SQL maps ?
> The
> reason is ask this is that we are running into a situation where we
> need to
> create
> 
> Temporary tables to read from, and they use the # character.  I tried
> enclosing the statement with <![CDATA[ …. ]]>, but this works only to
> escape
> special
> 
> XML characters.
> 
>  
> 
>  
> 
> Example:
> 
>
----------------------------------------------------------------------------
> ------
> 
> BEGIN 
> 
>   CREATE TABLE #tempCount (id INT NOT NULL, count INT)
> 
>   
> 
>   INSERT INTO #tempCount
> 
>   (id, count)
> 
>   VALUES
> 
>   (1,2)
> 
>   SELECT * FROM #tempCount
> 
>   DROP TABLE #tempCount
> 
> END
> 
>  
> 
>  
> 
> Any suggestions welcome.
> 
>  
> 
> Thanks,
> 
> Prasad

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.1 - Release Date: 3/9/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.1 - Release Date: 3/9/2005
 


Mime
View raw message