CREATE VIEW "SBODEMODE"."SBO_VENDOR_TEXT" ( "CARDCODE", "CARDNAME", "UPDATEDATE", "CREATEDATE" ) AS SELECT  TO_CHAR("CardCode") AS "CARDCODE", "CardName" AS "CARDNAME",
      TO_CHAR(YEAR("UpdateDate"))
       || case LENGTH(MONTH("UpdateDate"))
          when 1 then '0' || TO_CHAR(MONTH("UpdateDate"))
          else TO_CHAR(MONTH("UpdateDate"))
         end
      || case LENGTH(EXTRACT(DAY FROM "UpdateDate"))
          when 1 then '0' || TO_CHAR(EXTRACT(DAY FROM "UpdateDate"))
          else TO_CHAR(EXTRACT(DAY FROM "UpdateDate"))
        end  AS "UPDATEDATE", 
     TO_CHAR(YEAR("CreateDate"))
       || case LENGTH(MONTH("CreateDate"))
          when 1 then '0' || TO_CHAR(MONTH("CreateDate"))
          else TO_CHAR(MONTH("CreateDate"))
         end
      || case LENGTH(EXTRACT(DAY FROM "CreateDate"))
          when 1 then '0' || TO_CHAR(EXTRACT(DAY FROM "CreateDate"))
          else TO_CHAR(EXTRACT(DAY FROM "CreateDate"))
        end  AS "CREATEDATE"
FROM OCRD
WHERE "CardType" = 'S'