ibm midrange - Create SQL view against AS/400 data -
how create view against table? want select according todays date. field in as400 defined numeric 8 0.
what don't understand is, have recreate table in iseries navigator, order header , detail. exists on as/400 never used in iseries navigator. once view created, should able access via crystal reports.
use create view
sql statement create view , convert numeric date sql date.
note if there invalid dates in table cause error when try select data. may have include validation logic in conversion.
for example:
create view myview select date(substr(digits(yyyymmdd),1,4) ||'-'|| substr(digits(yyyymmdd),4,2) ||'-'|| substr(digits(yyyymmdd),6,2)) mydate mytable
Comments
Post a Comment