Table function arguments containing single quotes

Connectivity
Enthusiast

Table function arguments containing single quotes

I'm trying to send an argument to a table function, with single quotes in the argument string, e.g.:

select x from table (y('I need single 'quotes' in here') as z;

I guess it just needs a better understanding of Teradata SQL, but that's not my forte. It should be the same solution as containing single quotes in any string in SQL.

Thanks,

David
2 REPLIES
Enthusiast

Re: Table function arguments containing single quotes

The example should have read

select x from table (y('I need single 'quotes' in here')) as z;

of course
Teradata Employee

Re: Table function arguments containing single quotes

Escape the single quote with another single quote.

select x from table (y('I need single ''quotes'' in here')) as z;