Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Mon, 02 Jun 2008 @ 20:06:43 GMT


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


Subj:   Name search in a macro
 
From:   Pete Jonas

Good day all, I am trying to do a name search in a macro. I would like to be able to search on the first five characters of a 30 character varchar field. I am having difficulty making the search work.

     replace macro WageDetail2 (LastName varchar(30)) as
     (select
     WD.EmployeeLastName,
     WD.EmployeeFirstName,
     WD.EmployeeMiddleInitial,
     WD.SSN,
     WD.Cyear,
     WD.Cquarter,
     WD.EAN,
     WD.UnitNumber,
     EN.EmployerName,
     WD.UsedInClaimFlag,
     WD.Wages,
     WD.Hours,
     WD.OfficerFlag
     from uitables.WageDetail as WD
     inner join uitables.Employer as EN
     on WD.EAN = EN.EAN
     where WD.EmployeeLastName like ':LastName%'
     order by WD.SSN,WD.EAN,WD.Cyear,WD.Cquarter;)

Any suggestions would be much appreciated.

Pete Jonas
Business and Information Technology Unit
MN Department of Employment and Economic Development



     
  <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: 27 Dec 2016