I have a really simple question, I am sure, but I am drawing a huge blank.
All I want to do is go into my table called STATUS_AND_DATES and change the
field called JOB_STATUS. I want to change all the records in that field
that say 'For Sale/Lease' to 'For Sale'. How do i do an update like that.
Lost in Arkansas. ThanksUPDATE STATUS_AND_DATES
SET JOB_STATUS = 'For Sale'
WHERE JOB_STATUS = 'For Sale/Lease'
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
news:%23YafKIZtGHA.4748@.TK2MSFTNGP03.phx.gbl...
>I have a really simple question, I am sure, but I am drawing a huge blank.
> All I want to do is go into my table called STATUS_AND_DATES and change th
e
> field called JOB_STATUS. I want to change all the records in that field
> that say 'For Sale/Lease' to 'For Sale'. How do i do an update like that.
> Lost in Arkansas. Thanks
>|||I thought that was it too but I get this error
Msg 512, Level 16, State 1, Procedure EmailOnUpdateSTATUS_AND_DATES, Line 8
Subquery returned more than 1 value. This is not permitted when the subquery
follows =, !=, <, <= , >, >= or when the subquery is used as an expression.
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:ezOkkNZtGHA.3240@.TK2MSFTNGP03.phx.gbl...
> UPDATE STATUS_AND_DATES
> SET JOB_STATUS = 'For Sale'
> WHERE JOB_STATUS = 'For Sale/Lease'
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
> news:%23YafKIZtGHA.4748@.TK2MSFTNGP03.phx.gbl...
>|||You have a trigger on the table, and the trigger doesn't handle multi-row up
dates correctly (you
have a bug in the trigger).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
news:%23qKEzRZtGHA.3552@.TK2MSFTNGP03.phx.gbl...
>I thought that was it too but I get this error
> Msg 512, Level 16, State 1, Procedure EmailOnUpdateSTATUS_AND_DATES, Line
8
> Subquery returned more than 1 value. This is not permitted when the subque
ry follows =, !=, <, <=
> , >, >= or when the subquery is used as an expression.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote i
n message
> news:ezOkkNZtGHA.3240@.TK2MSFTNGP03.phx.gbl...
>|||If appropriate, you can disable the Trigger to make the update -and
re-enable when finished.
But as Tibor indicated, there is a problem with the Trigger that 'should' be
corrected.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
news:%23qKEzRZtGHA.3552@.TK2MSFTNGP03.phx.gbl...
>I thought that was it too but I get this error
> Msg 512, Level 16, State 1, Procedure EmailOnUpdateSTATUS_AND_DATES, Line
> 8
> Subquery returned more than 1 value. This is not permitted when the
> subquery follows =, !=, <, <= , >, >= or when the subquery is used as an
> expression.
> "Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote
> in message news:ezOkkNZtGHA.3240@.TK2MSFTNGP03.phx.gbl...
>|||Yes, that was exactly it, I think I know whats wrong with the trigger but I
am going to do some more research on it. But I disabled it and the update
ran fine. Thank you both!!!!
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:%23lMwsmZtGHA.1504@.TK2MSFTNGP03.phx.gbl...
> If appropriate, you can disable the Trigger to make the update -and
> re-enable when finished.
> But as Tibor indicated, there is a problem with the Trigger that 'should'
> be corrected.
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
>
> "Ben Watts" <ben.watts@.aaronnickellhomes.com> wrote in message
> news:%23qKEzRZtGHA.3552@.TK2MSFTNGP03.phx.gbl...
>
No comments:
Post a Comment