Error - SQL state: 22P02
Results 1 to 2 of 2

Thread: Error - SQL state: 22P02

  1. #1
    Join Date
    Dec 2008
    Posts
    1

    Error - SQL state: 22P02

    I am executing
    select * from "Booking" where 'Booking_Id' = 10;
    -- where column 'Booking_Id' is type numeric

    I get a error
    ERROR: invalid input syntax for integer: "Booking_Id"

    ********** Error **********

    ERROR: invalid input syntax for integer: "Booking_Id"
    SQL state: 22P02

    What could be the reason?

  2. #2
    Join Date
    Dec 2011
    Posts
    1
    You wrote :
    select * from "Booking" where 'Booking_Id' = 10;

    you should have wroten:

    select * from "Booking" where Booking_Id = 10;

    or as well

    select * from "Booking" where "Booking_Id" = 10;

    hope it helps.

Posting Permissions

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