Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 04 Mar 2011 @ 14:23:33 GMT


     
  <Prev Next>  
<<First
<Prev
Next> Last>>  


Subj:   Apostrophe(') as parameter value in a Macro
 
From:   SUMAN M

Hi,

I have a macro with following data types for the parameters

     REPLACE macro Part_Lookup (part_id INTEGER, description VARCHAR(120)) AS
     (........................)

I want to pass a value for second field with apostrophe(') as a character in the description as below

Example: Exec macro Part_Lookup (2345,"motor's");

Here when, I am passing the value "motor's" as search string in description, it is giving following error

[Teradata Database] [3707] Syntax error, expected something like ')' or ',' between a string or a Unicode character literal and the word 's'.


I want the character (') also to be considered in the search string and get result containing the word motor's in the description.

How can I achieve this result and have escape character for (') apostrophe?


Please help.. Thanks!

Suman



     
  <Prev Next>  
<<First
<Prev
Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023