Welcome to Sign in | Help
in Search

convert nvarchar to text

Last post 10-28-2007, 7:12 PM by crestinul. 2 replies.
Sort Posts: Previous Next
  •  10-24-2007, 11:46 AM 3076

    convert nvarchar to text

    vreau sa convertesc un nvarchar in tex

    select +i.text+' ,'+i.tel+' ,'+convert(nvarchar(11),i.data_anunt,104)
    from tbldiverse i
    where data_anunt+28>=getdate() order by i.text,i.tel,i.data_anunt

    i.text e de tip text

    i.tel e nvarchar

    am incercat select i.text+', '+ convert(text,i.tel) da nu merge

     

    Msg 402, Level 16, State 1, Line 1
    The data types text and varchar are incompatible in the add operator.

     

    cum concatenez un text cu un nvarchar sau varchar? 

  •  10-24-2007, 12:06 PM 3077 in reply to 3076

    Re: convert nvarchar to text

    Daca lucrezi pe SQL 2000 foloseste UPDATETEXT - ai un exemplu aici:

    http://michaelsync.net/2006/07/04/sql-2k-tips-updatetext

    Detaliile de sintaxa (destul de "dezagreabile" Smile) sunt in BOL

     Daca lucrezi pe SQL 2005  foloseste varchar(max).

  •  10-28-2007, 7:12 PM 3109 in reply to 3077

    Re: convert nvarchar to text

    mai vezi si operatorul cast as
    Secolul XXI ori va fi religios ori nu va fi deloc
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems