Crystalguru
Technical User
Not sure if this is the correct forum to post this but am trying.
Have a union statment that the first query holds the a varchar2 field (amenity_code) the second query does not request for that field. I am getting a expression must be of same datatype as corresponding expression.
For example:
1st query:
SELECT
1 AS SOLVE_ORDER
,UNITS.UNIT_BUILDING_NUM AS BUILD_NUM
, UNITS.UNIT_NUM AS UNIT_NUM
, UNITS.UNIT_ID AS UNIT_ID
, UNITS.UNIT_MARKET_RENT AS MARKET_RENT
, UNIT_TYPES.UNIT_TYPE_CODE AS UNIT_TYPE_CODE
, AMENITIES.AMENITY_CODE as Amenity_code
2nd query:
SELECT
4 AS SOLVE_ORDER
, UNITS.UNIT_BUILDING_NUM AS BUILD_NUM
, UNITS.UNIT_NUM AS UNIT_NUM
, UNITS.UNIT_ID AS UNIT_ID
, UNITS.UNIT_MARKET_RENT AS MARKET_RENT
, UNIT_TYPES.UNIT_TYPE_CODE AS UNIT_TYPE_CODE
, 'z' as Amenity_code
thanks
Have a union statment that the first query holds the a varchar2 field (amenity_code) the second query does not request for that field. I am getting a expression must be of same datatype as corresponding expression.
For example:
1st query:
SELECT
1 AS SOLVE_ORDER
,UNITS.UNIT_BUILDING_NUM AS BUILD_NUM
, UNITS.UNIT_NUM AS UNIT_NUM
, UNITS.UNIT_ID AS UNIT_ID
, UNITS.UNIT_MARKET_RENT AS MARKET_RENT
, UNIT_TYPES.UNIT_TYPE_CODE AS UNIT_TYPE_CODE
, AMENITIES.AMENITY_CODE as Amenity_code
2nd query:
SELECT
4 AS SOLVE_ORDER
, UNITS.UNIT_BUILDING_NUM AS BUILD_NUM
, UNITS.UNIT_NUM AS UNIT_NUM
, UNITS.UNIT_ID AS UNIT_ID
, UNITS.UNIT_MARKET_RENT AS MARKET_RENT
, UNIT_TYPES.UNIT_TYPE_CODE AS UNIT_TYPE_CODE
, 'z' as Amenity_code
thanks