Error running SQL update query

Results 1 to 2 of 2

Thread: Error running SQL update query

  1. #1
    Join Date
    Dec 1969

    Default Error running SQL update query

    I have a simple update I want to perform on 1 table and am receiving the error:<BR>Subquery returned more than 1 value...<BR><BR>The SQL syntax:<BR>UPDATE DETAILS<BR>SET HCStatus = &#039;A&#039;<BR>WHERE (HCEffdate &#060; { fn NOW() })<BR><BR>I want the status field to have an A in it when the HCEffdate field is less than or equal to the current date.<BR>Does someone know how to rewrite the query to run properly?<BR><BR>Thanks.

  2. #2
    Join Date
    Dec 1969

    Default It means...

    the database has no way of telling which record you want when you&#039;re updating it. (there may be 2 that are exactly the same -- typically without a primary key)<BR><BR>Unless you&#039;re using ASP, there is no Now() in SQL... you would use getDate().

Posting Permissions

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