Menu

#12 Failed parsing Oracle package function in select

open
None
5
2003-07-28
2003-07-09
Anonymous
No

Failed to parse the following select statement, appears
to have died while parsing the oracle package function

SELECT
GB.GROUP_ID,GB.COMMENTS,GB.AGENCY_ID,GB.AGENT_I
D,GB.GROUP_NAME,GB.GROUP_TYPE,

GB.N_OF_GUESTS,GB.REL_DAY_FROM,GB.REL_DAY_TO,GB
.SAIL_DATE_FROM,GB.SAIL_DATE_TO,

GB.SHIP_CODE,GB.IS_ACTIVE,GB.IS_VALID,GB.PROBABILI
TY,GB.GROUP_STATUS,GB.ALLOW_DIFF_AGENCY,

GB.EXPIRATION_EXTENSION,GB.GROUP_INIT_DATE,GB.WD
W_GROUP_ID,GB.PRIORITY,GB.TERMINATION_COMPLETED
,

GB.GROUP_SIZE_OVERRIDE,GB.PROBABILITY_ALLOCATED,
GB.IS_CONTRACT_RATE,GB.CAN_PROCESS_GTB,

GB.GRP_COORD_NAME,GB.USE_TC_FULLPAY,GB.CURRENC
Y_CODE,
SUBSTR(sw_confcommon.GetGroupPackageType
(:group_id),1,15) as package_type,
GRP_LAND.land_days,
GRP_SEASON.season_code,
GRP_CNT.guest_count,
GRP_CNT.stateroom_count,
GRP_AM.amenity_name
FROM group_booking GB,

-- Land Days
( SELECT :group_id as group_id, pt.land_days
FROM package_type pt
WHERE pt.package_type =
SW_CONFCOMMON.GetGroupPackageType(:group_id) )
GRP_LAND,

-- Season Code
( SELECT gb.group_id, pc.season_code
FROM group_booking gb, package_code pc,
package_type pt
WHERE pt.land_days = 0
AND pt.package_type = pc.package_type
AND pc.vacation_date = gb.sail_date_from
AND pc.ship_code = gb.ship_code
AND gb.group_id = :group_id ) GRP_SEASON,

-- Count of Group Guests and Staterooms
(SELECT gih.group_id, SUM(occupancy *
quantity) as guest_count, sum(quantity) as
stateroom_count
FROM group_increase_history gih,
group_ship_request gsr
WHERE gih.group_update_id =
gsr.group_update_id (+)
AND gih.group_id = :group_id
GROUP BY gih.group_id) GRP_CNT,

-- The free amenity
(SELECT aoh.group_id, ac.amenity_name
FROM am_order_header aoh, am_order_item
aoi, am_code ac
WHERE aoi.amenity_code = ac.amenity_code
and (ac.amenity_type = 'GROUP_FREE' or
ac.amenity_code in ('G-1 WINE','G-2
CHAMPAGNE','G-3 GIFT BASKET','G-4 RECEPTION'))
AND aoh.am_order_id = aoi.am_order_id
AND aoh.am_booking_type = 'GROUP'
AND aoh.group_id = :group_id) GRP_AM

WHERE gb.group_id = GRP_LAND.group_id (+)
AND gb.group_id = GRP_SEASON.group_id (+)
AND gb.group_id = GRP_CNT.group_id (+)
AND gb.group_id = GRP_AM.group_id (+)
AND gb.group_id = :group_id

Discussion

  • Gert Kello

    Gert Kello - 2003-07-28
    • assigned_to: nobody --> gkello
     
  • Gert Kello

    Gert Kello - 2003-08-11

    Logged In: YES
    user_id=103371

    The parsing does not die anymore...
    But this where clause is not supported:
    "WHERE gih.group_update_id = gsr.group_update_id (+)"

    Not sure what to do with that... Seems like we need SQL
    dialect support to be built in (s.t. to be able to define
    different scan rules for different dialects)...

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.