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 |
Pace
Constraint Violating Yak Guru
264 Posts |
Posted - 2008-01-07 : 05:25:05
|
Hi all, I am getting the following error, however I dont understand the error so don't know where to start fixing this. Any ideas? "Impossible is Nothing"  |
|
Pace
Constraint Violating Yak Guru
264 Posts |
Posted - 2008-01-07 : 05:41:00
|
if the text is a little hard to read here it is. DECLARE @strProduct CHAR(50)SET @strProduct = 'STD/15K/MG/TH/ZN/V1'SELECT Product.[Product Code], [ProductText_1].[English] + ' ' + [ProductDescriptions].[Long] + ' ' + [ProductDescriptions_1].[Long] + ' ' + [ProductDescriptions_2].[Long] + ' ' + [ProductDescriptions_3].[Long] + CHAR(13) + CHAR(10) + [ProductText].[English] AS QuoteGeneratedFROM ProductText AS ProductText_1 INNER JOIN ( ProductText INNER JOIN ( ( ( ( Product LEFT JOIN ProductDescriptions ON Product.Material=ProductDescriptions.Code ) LEFT JOIN ProductDescriptions AS ProductDescriptions_1 ON Product.HeatingType=ProductDescriptions_1.Code ) LEFT JOIN ProductDescriptions AS ProductDescriptions_2 ON Product.Zone=ProductDescriptions_2.Code ) LEFT JOIN ProductDescriptions AS ProductDescriptions_3 ON Product.Voltage=ProductDescriptions_3.Code ) ON ProductText.ProductCode=Product.ProductFamily ) ON ProductText_1.ProductCode=Product.ProductFamilyWHERE Product.[Product Code]=@strProduct AND ((ProductText_1.Code)='MAIN') AND ((ProductText.Code)='QUOTE') AND ((ProductDescriptions.Feature)='MATERIALS') AND ((ProductDescriptions_1.Feature)='HEATING') AND ((ProductDescriptions_2.Feature)='ZONE') AND ((ProductDescriptions_3.Feature)='VOLTAGE'); GO ERROR: Msg 403, Level 16, State 1, Line 3Invalid operator for data type. Operator equals add, type equals ntext."Impossible is Nothing" |
 |
|
pootle_flump
1064 Posts |
Posted - 2008-01-07 : 05:41:38
|
You can't concatenate ntext data. |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-01-07 : 07:18:48
|
and in case you need thatsubstring(ntextcol,1,datalength(ntextcol))+...........MadhivananFailing to plan is Planning to fail |
 |
|
Pace
Constraint Violating Yak Guru
264 Posts |
Posted - 2008-01-07 : 10:29:45
|
quote: Originally posted by madhivanan and in case you need thatsubstring(ntextcol,1,datalength(ntextcol))+...........MadhivananFailing to plan is Planning to fail
EXACTLY what I needed, thanks :)"Impossible is Nothing" |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-01-07 : 11:25:09
|
Realize that you will get the first 8000 characters only from the ntext column. E 12°55'05.25"N 56°04'39.16" |
 |
|
Pace
Constraint Violating Yak Guru
264 Posts |
Posted - 2008-01-08 : 06:15:38
|
Hi Peso, Thanks for the notes. Does that mean I would get 1600 from a text col as apposed to 8000 from ntext? Basically my sys said 1600 detected so the code I used was; SUBSTRING([ProductText_1].[English],1,1600) "Impossible is Nothing" |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-01-08 : 09:48:13
|
Then it is ok. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|
|