Simple question on assignment

nate100

Member
Say if I have a field called ps_ps_code.

I like to assign that to a value.

ex:
x = ps_ps_code.

even if ps_ps_code is blank I like to assign x one char.
so x would equal " ".

another example would be
say if ps_ps_code = "12345".
I like x gain to be the first character
x = "1".

Thanks
 
if ps_ps_code is blank, your x will be blank. If you assign it a " " or " ", its the same as blank.

if ps_ps_code <> "" then
x = substring(ps_ps_code,1,1)
else
x = "" .
 
Back
Top