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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 function that return a string

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2006-09-25 : 08:10:44
how do i wriet function that retuns a string of data type nvarchar(4000)?
thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

chiragkhabaria
Master Smack Fu Yak Hacker

1907 Posts

Posted - 2006-09-25 : 08:18:51
Create FUNCTION Test ()
RETURNS nvarchar(4000) AS
BEGIN
Declare @i nvarchar(4000)
set @i = 'hi how are you '
return @i
End
GO
Select dbo.test()
GO
drop function test

Chirag
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-25 : 09:19:33
Read about Functions in sql server help file for more informations

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -