Internal SQL Server error. [SQLSTATE 42000] (Error 8624). The step failed.
We have an SQL procedure that fails with the above error running on W2K SP4,
SQL 2000 SP2. I have restored our database to another test server with the
same OS, SQL and SP's but the error does not occur.
Can anyone give me ideas on what may cause this. I looked in TechNet and
found a few articles but none of them seemd to be relevent.
Thanks
Devron
You should give more info what's going on.
--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Devron Blatchford" <dev...@auspine.com.au> wrote in message
news:#wThv1qc...@tk2msftngp13.phx.gbl...
Server: Msg 8624, Level 16, State 1, Line 376
Internal SQL Server error.
Notice the state is one.
This is the SQL Statement it is failing on: I can't see anything here that
relates to the articles you posted.
Does this help?
Thanks
Devron
INSERT INTO dbo.tStockHistory
(
StockID,
StockCode,
ProductID,
TransactionID,
OwnerLocationID,
StockLocationID,
DestinationLocationID,
SourceDocumentID,
AllocatedToID,
DateIn,
DateOut,
FinishedGoods,
Damaged,
StockStatusID,
ReservedPartnerID,
ReservedOrderItemID,
ShippingUnitID,
BaseQuantityPieces,
BaseQuantityLength,
BaseQuantityArea,
BaseQuantityVolume,
QuantityStockUomID,
QuantityStock,
Price,
ExclusiveAmount,
ShiftID,
CrewID,
JobID,
PreviousStockHistoryID,
QuantityPricingUomID,
QuantityPricing,
RecordStatus,
RecordLastModified,
RecordUserID
)
SELECT
InvoiceSH.StockID,
InvoiceSH.StockCode,
ReturnSH.ProductID,
CreditTran.TransactionID AS TransactionID,
ReturnSH.OwnerLocationID,
ReturnSH.StockLocationID,
ReturnSH.DestinationLocationID,
ReturnSH.SourceDocumentID,
ReturnSH.AllocatedToID,
ReturnSH.DateIn,
ReturnSH.DateOut,
ReturnSH.FinishedGoods,
ReturnSH.Damaged,
InvoiceSH.StockStatusID,
ReturnSH.ReservedPartnerID,
ReturnSH.ReservedOrderItemID,
ReturnSH.ShippingUnitID,
ReturnSH.BaseQuantityPieces,
ReturnSH.BaseQuantityLength,
ReturnSH.BaseQuantityArea,
ReturnSH.BaseQuantityVolume,
ReturnSH.QuantityStockUomID,
ReturnSH.QuantityStock,
ReturnSH.Price,
ReturnSH.ExclusiveAmount,
ReturnSH.ShiftID,
ReturnSH.CrewID,
@CreditJobID AS JobID,
InvoiceSH.StockHistoryID, -- was ReturnSH.StockHistoryID
ReturnSH.QuantityPricingUomID,
ReturnSH.QuantityPricing,
ReturnSH.RecordStatus,
ReturnSH.RecordLastModified,
ReturnSH.RecordUserID
FROM
dbo.tTransaction ReturnTran INNER JOIN
dbo.tStockHistory ReturnSH ON ReturnTran.TransactionID =
ReturnSH.TransactionID INNER JOIN
dbo.tStockHistory InvoiceSH INNER JOIN
dbo.tTransaction InvoiceTran ON InvoiceSH.TransactionID =
InvoiceTran.TransactionID ON
ReturnSH.PreviousStockHistoryID = InvoiceSH.StockHistoryID INNER JOIN
dbo.tTransaction CreditTran
ON ReturnTran.TransactionID = CreditTran.ParentTransactionID
AND
InvoiceTran.AccountID = CreditTran.AccountID
WHERE
(InvoiceTran.TransactionProfileID = @TransactionProfileInvoiceID) AND
(ReturnTran.TransactionProfileID = @TransactionProfileReturnID) AND
(CreditTran.TransactionProfileID = @TransactionProfileCreditID) AND
(ReturnSH.TransactionID = @TransactionID)
"Dejan Sarka" <dejan_please_reply_...@avtenta.si> wrote in
message news:eRMv09qc...@TK2MSFTNGP12.phx.gbl...
--
Dejan Sarka, SQL Server MVP
FAQ from Neil & others at: http://www.sqlserverfaq.com
Please reply only to the newsgroups.
PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Devron Blatchford" <dev...@auspine.com.au> wrote in message
news:eia5DKrc...@TK2MSFTNGP11.phx.gbl...
e.g.
create table t1 (i int)
insert t1 select 1 union all select 2 union all select 3
create table t2(i int)
insert t2 select 1 union all select 3
select *
from t1 inner join t2 on t1.i=t2.i
select *
from t1 left join t2 on t1.i=t2.i
drop table t1,t2
--
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"Devron Blatchford" <dev...@auspine.com.au> wrote in message
news:uE$7B0zcD...@TK2MSFTNGP09.phx.gbl...
Thanks
Devron
"oj" <nospam...@home.com> wrote in message
news:uLELZ6zc...@TK2MSFTNGP09.phx.gbl...
Although, it works for you this time due to your current data. Leaving left
join in your production code would eventually give you bad result as data
would change. It's your data so you do whatever you want. However, I think
you're taking a great risk.
--
-oj
RAC v2.2 & QALite!
http://www.rac4sql.net
"Devron Blatchford" <dev...@auspine.com.au> wrote in message
news:eNU1fL0c...@TK2MSFTNGP10.phx.gbl...