At 03:49 PM 6/7/2013, Dick Fey wrote:
Must be funky friday, can't seem to get it right.
I have a column with a check number in it. Could be 1 to six
digits, it is text
Want that to put that into a new column, using a column expression,
that gives me 6 digit checknum with leading 0's
Tried all suggestions, but using a column name either in place of
the variable or a fixed set of digits will not work.
Just for your learning sake, try the following simple exercise to
understand the function.
-- Start here ...
SET ERROR MESSAGE 2038 OFF
DROP TABLE FomatFunction
SET ERROR MESSAGE 2038 ON
CREATE TABLE `FomatFunction` +
(`ColumnWithTXTValue` TEXT (6), +
`ColumnWithFormat`=
(TRIM(FORMAT((INT(ColumnWithTXTValue)),'000000'))) TEXT (6))
COMMENT ON TABLE `FomatFunction` IS 'See How Format Function
Works in R:BASE'
RETURN
Once the sample table is created in your database, enter a new row
and watch the results!
Make sure to adjust the code CHARacter settings in compliance with
your database.
Have fun!
Razzak.
www.rbase.com
www.facebook.com/rbase
--
30+ years of continuous innovation!
15 Years of R:BASE Technologies, Inc. making R:BASE what it is today!
--