2 Replies Latest reply on Dec 5, 2019 8:37 AM by 3505905

    POST(insert sql) returns 200 response but all values in DB appears to be null

    3505905

      Hi expert,

       

      I am working on ORDS with Autonomous Data Warehouse and GET,DELETE methods are working as expected.

      POST(Insert sql) with JSON body also went through successfully with 200 response as follows:

      POST.PNG

      However, all values in DB appears to be null.

      GET.PNG

       

      The following is my sql as ORDS handler.

      insert into ADB_DEMO.LOANS values ( :Loan_ID,

        :State_Code,

        :Loan_Amount,

        :Term,

        :Interest_Rate,

        :Grade,

        :Sub_Grade,

        :Score_FICO,

        :Employment_Length,

        :Home_Ownership,

        :Annual_Income,

        :Is_Income_Verified,

        :Issue_Date,

        :Loan_Status,

        :Purpose,

        :Product,

        :Debt_To_Income,

        :Last_24_months,

        :Inquiries_6_months,

        :Current_Credit_Lines,

        :Total_Credit_Lines,

        :Total_Payments,

        :Total_Principal,

        :Last_Payment_Date,

        :Last_Payment_Amount)

       

      The following JSON is my body:

      {

            "loan_id": "123456",

            "state_code": "AZ",

            "loan_amount": "1234",

            "term": "36",

            "interest_rate": "0.11",

            "grade": "C",

            "sub_grade": "B0",

            "score_fico": "123",

            "employment_length": "10+ years",

            "home_ownership": "Rent",

            "annual_income": "24000",

            "is_income_verified": "Verified",

            "issue_date": "2011-12-16T00:00:00Z",

            "loan_status": "Current",

            "purpose": "Credit Card",

            "product": "Credit card",

            "debt_to_income": "0.28",

            "last_24_months": "0",

            "inquiries_6_months": "1",

            "current_credit_lines": "3",

            "total_credit_lines": "9",

            "total_payments": "1234.71",

            "total_principal": "1234.18",

            "last_payment_date": "2014-10-01T00:00:00Z",

            "last_payment_amount": "123.87"

      }

       

      desc my tale looks like this.

       

      Name                 Null? Type        

      -------------------- ----- ------------

      LOAN_ID                    NUMBER(10)  

      STATE_CODE                 VARCHAR2(8) 

      LOAN_AMOUNT                NUMBER(10)  

      TERM                       NUMBER(4)   

      INTEREST_RATE              NUMBER(4,2) 

      GRADE                      VARCHAR2(4) 

      SUB_GRADE                  VARCHAR2(4) 

      SCORE_FICO                 NUMBER(4)   

      EMPLOYMENT_LENGTH          VARCHAR2(10)

      HOME_OWNERSHIP             VARCHAR2(10)

      ANNUAL_INCOME              NUMBER(10)  

      IS_INCOME_VERIFIED         VARCHAR2(20)

      ISSUE_DATE                 DATE        

      LOAN_STATUS                VARCHAR2(20)

      PURPOSE                    VARCHAR2(40)

      PRODUCT                    VARCHAR2(20)

      DEBT_TO_INCOME             NUMBER(4,2) 

      LAST_24_MONTHS             NUMBER(4)   

      INQUIRIES_6_MONTHS         NUMBER(4)   

      CURRENT_CREDIT_LINES       NUMBER(4)   

      TOTAL_CREDIT_LINES         NUMBER(10,2)

      TOTAL_PAYMENTS             NUMBER(10,2)

      TOTAL_PRINCIPAL            NUMBER(10,2)

      LAST_PAYMENT_DATE          DATE        

      LAST_PAYMENT_AMOUNT        NUMBER(10,2)

       

      Can you please shed a light on what was missing?

       

      Thanks for your time in advance.

       

      Best Regards,

      Jhan