Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Location
    Bridgeport, CT
    Posts
    1

    Unanswered: Using inline views in an update statement

    Is it possible to use an inline view in an update statement?

    I am trying to run the following SQL in Sybase ASE 12.5

    update cims_ds_address_key_map
    set a.addr_open_acct_cnt = (a.addr_open_acct_cnt + b.addr_open_acct_cnt)
    from cims_ds_address_key_map a,
    (select cims_new_hh_addr_id as cims_address_id,
    count(*) as addr_open_acct_cnt
    from cims_ds_shaw_addr_chng
    where addr_new_existing_cd = 'E'
    group by cims_new_hh_addr_id) as b
    where a.cims_address_id = b.cims_address_id

    I am getting an error saying "incorrect syntax near the keyword 'select'".

  2. #2
    Join Date
    Mar 2001
    Location
    Lexington, KY
    Posts
    606
    I don't believe that is in any version of ASE now. I do know it is slated to be in one of the subsequent releases (not sure if it is an ASE12.5.x release or an ASE15 one).
    Thanks,

    Matt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •