I work on SQL server 2012 I face issue on #finaltable temp I have value field
when check the value I found it 32-Bit when select and display data from #ff I found it
132-BIT . the idea that it add 1 to text of value
so are there are any thing on statement below affect on Value and change it
on finaltable value is 32-bit
on #ff value is 132-bit
I dont know why this happen
so can any one help me how to solve it and why this happen
why add 1 to text
- select * INTO #FF from (
- SELECT DISTINCT
- [InputID],PART_ID,[Vendor ID],Manufacturer,[Digi-Key Part No.] ,[Mfr Part No.],[Description],Category,Family ,Obsolete ,[Non-Stock]
- , [Part_Status],partNumber,CompanyName,DKFeatureName2,[Variant Number],IsUnit,
- SUBSTRING((
-
- SELECT isnull(StarFormat,'') + Value+ isnull(endFormat,'')
- FROM #FinalTable
- WHERE ([InputID] = Results.[InputID] and DkFeatureId = Results.DkFeatureId)
-
- FOR XML PATH(''),TYPE).value('.', 'NVARCHAR(MAX)')
-
- ,1,5000) AS Value
- FROM #FinalTable Results
- where StatusId=3
-
- union
- SELECT
- [InputID],PART_ID,[Vendor ID],Manufacturer,[Digi-Key Part No.] ,[Mfr Part No.],[Description],Category,Family ,Obsolete ,[Non-Stock] ,
- [Part_Status],partNumber,CompanyName,DKFeatureName2,[Variant Number],IsUnit,Value/*,accepted_value_value Value*/ from #FinalTable where StatusId<>3
- )T