Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

fix my sql PLEASE!!! 1

Status
Not open for further replies.

Howard2002

Programmer
Aug 2, 2002
12
US
replace hyr '93' with '1993' all

the field is defined as 4 char. i am trying to write a short program to change these 2 char input to a 4 char.

my program is
select table ...
replace hyr ...

can anyone help the newbie on the block?
 
assuming that you know that all dates are 20th century (19).
use mytable
replace hyr with '19'+alltrim(hyr) all

the alltrim is to remove the blank spaces in the 4 char field.
Attitude is Everything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top