"INSERT INTO mylib.myPF ( flddec ) SELECT digits(fldChar) as numberbat FROM mylib.myPF2 "
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
SQL - Insert into with cast
Collapse
X
-
SQL - Insert into with cast
Group, I'm testing a simple sql statement that needs to insert character data into a numeric field. Fields are defined as "fldChar - 3" & "flddec - 3,0". The sql statement reads "INSERT INTO mylib.myPF ( flddec ) SELECT cast(fldChar as decimal(3,0))) as numberbat FROM mylib.myPF2 " This returns the error SQL0420 - Character in Cast argument not valid. Can I "insert into" a file using the operation "cast"? If I test a simple select statement using the cast statement above, all works fine. Diane
Comment
Comment