Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. cannot find column

cannot find column

Scheduled Pinned Locked Moved Database
databasehelpquestionannouncementcareer
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sindhuan
    wrote on last edited by
    #1

    Hi I am trying to execute this query but its giving me an error "Cannot find either column "D" or the user-defined function or aggregate "D.bonus", or the name is ambiguous. " Query: MERGE INTO bonuses D USING bonuses1 E ON D.employee_id = S.employee_id) WHEN MATCHED THEN UPDATE SET D.bonus = E.bonus WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus) VALUES ES.employee_id, E.salary*0.1) WHERE (E.salary <= 8000); UPDATE bonuses Set bonus=10000 FROM bonuses D JOIN cbonuses1 E ON D.employee_id = S.employee_id) Any idea??

    L 1 Reply Last reply
    0
    • S sindhuan

      Hi I am trying to execute this query but its giving me an error "Cannot find either column "D" or the user-defined function or aggregate "D.bonus", or the name is ambiguous. " Query: MERGE INTO bonuses D USING bonuses1 E ON D.employee_id = S.employee_id) WHEN MATCHED THEN UPDATE SET D.bonus = E.bonus WHEN NOT MATCHED THEN INSERT (D.employee_id, D.bonus) VALUES ES.employee_id, E.salary*0.1) WHERE (E.salary <= 8000); UPDATE bonuses Set bonus=10000 FROM bonuses D JOIN cbonuses1 E ON D.employee_id = S.employee_id) Any idea??

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      UPDATE bonuses
      Set bonus=10000
      FROM bonuses D
      JOIN cbonuses1 E
      ON D.employee_id = S.employee_id)

      Bastard Programmer from Hell :suss: if you can't read my code, try converting it here[^]

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups