Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Question Unanswered: Invalid operator for data type

    I am getting the following error message when I try to put the datetime between strings

    Invalid operator for data type. Operator equals boolean AND, type equals datetime.

    The code is:

    INSERT INTO AdminAlerts values (CURRENT_USER, 'INSERT', getDate(), @biui, 'Booked room number ' & @rn & ' on ' & @gd & ', Customer ID: ' & @ci & ' and Booking ID: ' & @biui)

    @gd is where the error is, it is a datetime.
    Anyone knows whats wrong?

  2. #2
    Join Date
    Mar 2004
    The word INSERT is a reserved word, yet you are using it within your insert statement itself, likely this is causing the error.

  3. #3
    Join Date
    Feb 2004
    In front of the computer
    Provided Answers: 54
    Assuming that your INSERT is intended to run in MySQL instead of another tool such as MS-Access, I think you want to use the Concat() function instead of the & operator.


Posting Permissions

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