Question

Error: Insufficient result space to convert uniqueidentifier value to char.

I have a temp table

SELECT
  urlid, -- This coulmn does not exist in Phrase table I would like to declare it uniqueidentifier
  P.subDomainId,
  P.RegionID            
  INTO #tempcom     
FROM
    Phrase P

When i Update #tempcom table with this query

   Declare @urlid as uniqueidentifier
   Set @urlid = '4c595d6c-1e8a-45cf-aaf2-fe5a45b881b9'
   UPDATE T SET T.urlid = @urlid From #tempcom T Where T.subdomain = 'www.borasloppis.se'

It throw error:Insufficient result space to convert uniqueidentifier value to char. What do you think how could i fix error in this situation?

Was it helpful?

Solution

Try this one -

SELECT  
      NEWID() AS urlid --<-- column with GUID datatype
    , P.subDomainId
    , P.RegionID
INTO #tempcom
FROM dbo.Phrase P

Update -

DECLARE @urlid AS UNIQUEIDENTIFIER
SET @urlid = '4c595d6c-1e8a-45cf-aaf2-fe5a45b881b9'

UPDATE #tempcom
SET urlid = @urlid
WHERE subdomain = 'wwww.borasloppis.se'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top