0

This is my problem "There can be errors preventing data to be properly inserted into the database. This will require you to go into tables individually to add, delete, or modify data. You see none of the fees charged in the FEE table were associated. You will need to do a manual update to associate them." "Use SQL Developer and go to the FEE data entry screen to add the relationship associations between fees, guests, and fee types. Use the FeeDescription to determine the guest name and fee type. GuestID in the FEE table is determined by looking up GuestID for the guest name found in the the FeeDescription. FeeTypeID in the FEE table is determined by looking up FeeTypeID for the fee type name in the FeeDescription. Add a new row in FEE and put your first and last name in the FeeDescription. Provide a screenshot of all data stored in FEE via the FEE data entry screen."

i a new to SQL, i was used to mySQL

these are the tables:

  • FEE: FEEID, FEENAME, FEEDESCRIPTION, DATECHARGED, FEECHARGED, GUESTID, FEETYPEID

  • FEETYPE: FEETYPEID, FEETYPENAME, DEFAULTAMOUNT

  • GUEST: GUESTID, FIRSTNAME, LASTNAME, CITY, PROVINCE

I have tried, using a inner join like this: (says syntax error).

    update fee as f
    inner join guest g
    on f.guestid = g.guestid
    set f.feedescription = g.firstname ||
        g.lastname ||
    inner join feetype ft
    on f.feetypeid = ft.feetypeid
    set f.feedescription = ft.feetypename;

two separate updates: (went through but nothing)

     update fee
     set guestid = (select guestid
                   from guest
                   where firstname || ' ' || lastname = fee.feedescription);
               
    update fee
    set feetypeid = (select feetypeid
                     from fee_type
                     where feetypename = fee.feedescription);

i have tried using a right join, left join:

i must have deleted those ones, but they went through fine but the data didnt show up in the expected columns. GUESTID and FEETYPEID are still null. i want the correct data to be in there.

its empty like this:

FEEID   FEENAME FEEDESCRIPTION                  DATECHARGED   FEECHARGED  GUESTID  FEETYPEID   
1       Deposit Kristoff Kurn charged deposit   23-02-03      40          (NULL)   (NULL)   

0