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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding zero before the value

Status
Not open for further replies.

nitara

Technical User
Oct 1, 2015
2
US
I have to update the values of a table where if the year is 1-9 then add zero before the number and if its >= 10 then don't add zero .
so what query be written for this in pervasive

select ( dateC + (select case when len(datey) = 1 then

'0' else '' end + datey as datey1 ) + '/' + dateM + '/' + dateD ) from Tablename



I tried to do this way but its showing an error

Thanks in advance
 
What version of Pervasive are you using?
What error are you getting?
How is 'datey' defined in the database?


Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top