CREATE VIEW "SBODEMODE"."SBO_CUSTOMER_ATTR" ( "CARDCODE", "CITY", "COUNTRY", "FAX", "CARDNAME", "PHONE1", "ZIPCODE", "ADDRESS", "CREATEDATE", "UPDATEDATE" ) AS SELECT TO_CHAR("CardCode") AS "CARDCODE", "City" AS "CITY", "Country" AS "COUNTRY", "Fax" AS "FAX", 
      			"CardName" AS "CARDNAME", "Phone1" AS "PHONE1", "ZipCode" AS "ZIPCODE", 
      			"Address" AS "ADDRESS",
      			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",
      			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"
				FROM OCRD
				WHERE "CardType" = 'C'