Hi There
Why the following one works in one server not other one, i had a error
message like this
Server: Msg 913, Level 16, State 8, Line 28
Could not find database ID 104. Database may not be activated yet or
may be in transition.
UPDATE
Holdings
SET
Holdings.ReconciliationReasonId = 2
WHERE
Holdings.UniquePlanId NOT IN (
SELECT
UniquePlanId
FROM
CashExtract
WHERE
(CashExtract.[Plan]
LIKE 'PPS1%')
UNION ALL
SELECT
UniquePlanId
FROM
StockExtract
WHERE
(StockExtract.[Plan]
LIKE 'PPS1%')
)
This one works
UPDATE
Holdings
SET
Holdings.ReconciliationReasonId = 2
WHERE
Holdings.UniquePlanId NOT IN ('sdfaasdf')
Thanks
Ganesh
On Jun 5, 2:29 pm, ganesh <gsgan
@gmail.com> wrote:
> Hi There
> Why the following one works in one server not other one, i had a error
> message like this
> Server: Msg 913, Level 16, State 8, Line 28
> Could not find database ID 104. Database may not be activated yet or
> may be in transition.
> UPDATE
> Holdings
> SET
> Holdings.ReconciliationReasonId = 2
> WHERE
> Holdings.UniquePlanId NOT IN (
> SELECT
> UniquePlanId
> FROM
> CashExtract
> WHERE
> (CashExtract.[Plan]
> LIKE 'PPS1%')
> UNION ALL
> SELECT
> UniquePlanId
> FROM
> StockExtract
> WHERE
> (StockExtract.[Plan]
> LIKE 'PPS1%')
> )
> This one works
> UPDATE
> Holdings
> SET
> Holdings.ReconciliationReasonId = 2
> WHERE
> Holdings.UniquePlanId NOT IN ('sdfaasdf')
> Thanks
> Ganesh
Is the databse offline or is being restored ? Check in SSMS . Hope it
is not corrupted
-----------------------------------------------Reply-----------------------------------------------
ganesh,
You did not mention your server version and level, but you may be running
into a bug, as these KBs mention:
http://support.microsoft.com/kb/819264
http://support.microsoft.com/kb/316541
http://support.microsoft.com/kb/834688/
Although these KBs are see to refer to User-Defined Functions triggering the
bug, when I hit it a couple of years ago I believe it not with a UDF.
However, the third article mentions derived tables as well which sounds
similar to the problem I ran into.
RLF
"ganesh" <gsgan
@gmail.com> wrote in message
news:1181035781.285780.5310@n4g2000hsb.googlegroups.com...
> Hi There
> Why the following one works in one server not other one, i had a error
> message like this
> Server: Msg 913, Level 16, State 8, Line 28
> Could not find database ID 104. Database may not be activated yet or
> may be in transition.
> UPDATE
> Holdings
> SET
> Holdings.ReconciliationReasonId = 2
> WHERE
> Holdings.UniquePlanId NOT IN (
> SELECT
> UniquePlanId
> FROM
> CashExtract
> WHERE
> (CashExtract.[Plan]
> LIKE 'PPS1%')
> UNION ALL
> SELECT
> UniquePlanId
> FROM
> StockExtract
> WHERE
> (StockExtract.[Plan]
> LIKE 'PPS1%')
> )
> This one works
> UPDATE
> Holdings
> SET
> Holdings.ReconciliationReasonId = 2
> WHERE
> Holdings.UniquePlanId NOT IN ('sdfaasdf')
> Thanks
> Ganesh