Subject | Re: Is there a way of doubling internal quotes in a varchar without UDFs? |
---|---|
Author | robert_p_levy |
Post date | 2004-12-12T17:58:14Z |
Hi,
more info to make sure there's no other way. The procedure
GET_INSERT_STATEMENT is given 3 varchar parameters: the name of a
table, the name of a unique identifier column and the value
identifying a particular row. The procedure uses the system tables to
look up the list of columns in the table and uses EXECUTE STATEMENT to
get the list of values for these fields on the specified row. It
constructs an insert statement of the form INSERT (column names...)
values (values...). The insert statement not executred but returned
as a varchar value.
So the result is that I get something like: insert into FAVORITES
(TAVERN,BAR,HOSTELRY,INN) values ('O'Flaherty's','Moe's','Roggie's New
Age Grille','Bukowsky's')
So I would probably have to use a UDF?
Thanks,
Rob
> I could imagine some kind of parsing operation where you weredissecting
> varchars and reassembling them into a new string, where it might beseems
> necessary to trap the apostrophe character and give it some special
> treatment - is this what you need to do? That requirement, however,
> incompatible with your aversion to UDFs....Thanks for the reply. I think is the case, but just want to provide
more info to make sure there's no other way. The procedure
GET_INSERT_STATEMENT is given 3 varchar parameters: the name of a
table, the name of a unique identifier column and the value
identifying a particular row. The procedure uses the system tables to
look up the list of columns in the table and uses EXECUTE STATEMENT to
get the list of values for these fields on the specified row. It
constructs an insert statement of the form INSERT (column names...)
values (values...). The insert statement not executred but returned
as a varchar value.
So the result is that I get something like: insert into FAVORITES
(TAVERN,BAR,HOSTELRY,INN) values ('O'Flaherty's','Moe's','Roggie's New
Age Grille','Bukowsky's')
So I would probably have to use a UDF?
Thanks,
Rob