Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have Zipcode field as follows: 123456789. I want to divide the zip into two as follows:
Zip_5 = 12345
Zip_4 = 6789
while loading.
Thanks,
H
Thanks for your feedback.
here is what i am doing:
left(num(ZIPCODE,'000000000'),5) as ZIP_5,
right(num(ZIPCODE,'000000000'),4) as ZIP_4
Thanks,
H
Hi,
Load data some thing like
Load
Left(Zipcode,5) as Zip_5,
Right(Zipcode,4) as Zip_4
From your source;
Ex:-
Left(123456789, 5) as Zip_5,
Right(123456789, 4) as Zip_4
Regards,
Anand
HI
Try like this
Load left(123456789,5) as Zip_5 , right(123456789,4) as Zip_6 from tablename;
Hope it helps
Thanks for your feedback.
here is what i am doing:
left(num(ZIPCODE,'000000000'),5) as ZIP_5,
right(num(ZIPCODE,'000000000'),4) as ZIP_4
Thanks,
H
Hi,
From Mid( ), Left( ), Right( )
function you are able to do that like
With Mid( )
Mid(Zipcode,1,5) as Zip_5
Mid(Zipcode,6,4) as Zip_4
With Left( ) and Right( )
Left(Zipcode,5) as Zip_5,
Right(Zipcode,4) as Zip_4
HTH
Regards,
Anand