|
PeterG
Posting Yak Master
156 Posts |
Posted - 2003-01-28 : 14:33:34
|
| Server: Msg 8152, Level 16, State 6, Line 46String or binary data would be truncated.The statement has been terminated.This is my SP. The error is in the insert statement line. I get the error when I execute this on Sql Query analyzer.CREATE PROCEDURE dbo.SelectStatementCycleDataPGG@txtAccountNumber as nvarchar(16), @dteStartDate as datetime, @Fixed as datetime,@profID varchar(10)ASCreate table #tempTransactions(lngIndex int IDENTITY,txtAccountNum varchar(16),txtCompanyNum varchar(10),dtePostDate datetime,dteCycleDate datetime,dteTransacDate datetime,txtMerchantName varchar(25),txtSourceCurr varchar(2),txtBillingCurr varchar(4), curForeignAmnt money, txtSic varchar(6), curTransacAmnt money, txtTransacCode varchar(2), txtMerchantCity varchar(30), txtMerchantProv varchar(30), txtMemoFlag varchar(3), lngParent int, txtCostCenter varchar(80),curOrigAmnt money, curGst money, lngSourceId int, curPst money, blnForeignEx bit, curNetAmnt money, blnSent bit, blnMatched bit, txtComments varchar(255),txtDescription varchar(25),lngLength int,lngStartPos int)Insert Into #tempTransactions (txtAccountNum, txtCompanyNum, dtePostDate, dteCycleDate, dteTransacDate, txtMerchantName, txtSourceCurr, txtBillingCurr, curForeignAmnt, txtSic, curTransacAmnt, txtTransacCode, txtMerchantCity, txtMerchantProv, txtMemoFlag, lngParent, txtCostCenter, curOrigAmnt, curGst, lngSourceId, curPst, blnForeignEx, curNetAmnt, blnSent, blnMatched, txtComments)SELECT Transactions.txtAccountNum, Transactions.txtCompanyNum, Transactions.dtePostDate, Transactions.dteCycleDate, Transactions.dteTransacDate, Transactions.txtMerchantName, Transactions.txtSourceCurr, Transactions.txtBillingCurr, Transactions.curForeignAmnt, Transactions.txtSic, Transactions.curTransacAmnt, Transactions.txtTransacCode, Transactions.txtMerchantCity, Transactions.txtMerchantProv, Transactions.txtMemoFlag, Transactions.lngParent, Transactions.txtCostCenter, Transactions.curOrigAmnt, Transactions.curGst, Transactions.lngSourceId, Transactions.curPst, Transactions.blnForeignEx, Transactions.curNetAmnt, Transactions.blnSent, Transactions.blnMatched, Transactions.txtComments FROM Transactions WHERE (Transactions.txtAccountNum = @txtAccountNumber) AND ((dteCycleDate = @dteStartDate) or (dteCycleDate = @Fixed) or (dteCycleDate is NULL)) order by dteTransacDate,lngParent, lngIndex Select * from #tempTransactionsDrop table #tempTransactionsGO |
|