RE: simple quotes in dbproc

"Dittmar, Daniel" <[email protected]> Fri, 12 Sep 2003 18:45:01 +0200
Newsgroups gmane.comp.db.sapdb.general
Message-ID <[email protected]>
> 	WHEN param = 'val1' THEN whereclause = 'columname1 LIKE ' || '''' || /
> 	value || '''';
[...]
> which works ok.
> It seems to me that this sequence of simple quotes is a little bit
> ugly...but necessary to surround the string 'value' with 
> simple quotes.
> Is there a neater way to do this whith this kind of procedure ?
> I know I could have use a value string like "''value''" but....

No general solution, but
- ... LIKE ''' || value || '''' gets read of at least one term
- SET quote = '''' makes the code somewhat more readable
- SET quotedValue = '''' || value || '''' restricts the uglyness to one place

Daniel Dittmar

-- 
Daniel Dittmar
SAP DB, SAP Labs Berlin
[email protected]
http://www.sapdb.org/