Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jmodiba
Starting Member
7 Posts |
Posted - 2008-11-25 : 07:07:05
|
| Hi Can any one please help this cript is beign runnig on production environment for the past 2years without any errors but since yesterday i got this error Error converting data type varchar to bigint.please script belowSELECTct.ID,convert(smalldatetime, substring(ct.Reference10,0,11), 120) as Reference10,ltrim(rtrim(ct.Details)) as Details,ct.Amount,cb.AccountIDFROMCashBookTransaction ctinner joinCashBookBatch cb on ct.CashBookBatchID = cb.IDinner joinAccount a on cb.AccountID = a.IDWHEREa.DomainID = 2andct.CashbookTransactionTypeID = 1andconvert(bigint,ct.Reference6) = 1andisnumeric(ct.reference6) = 1and Reference5 = '-1'andct.ReconID is nullORDER BY 2,3,4,5 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
jmodiba
Starting Member
7 Posts |
Posted - 2008-11-25 : 07:43:42
|
| The reference6 returns null values not varch |
 |
|
|
jmodiba
Starting Member
7 Posts |
Posted - 2008-11-25 : 07:44:14
|
| The reference6 returns null values not varch |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-25 : 07:49:08
|
NULL is not a datatype. It is a special state or non-value for any datatype. E 12°55'05.63"N 56°04'39.26" |
 |
|
|
jmodiba
Starting Member
7 Posts |
Posted - 2008-11-25 : 08:06:35
|
| sorry about my second respond i meant to say the srcipt returns no values in the database that means there are no values to convert. |
 |
|
|
|
|
|