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
 Transact-SQL (2000)
 Oracle's LONG data type in t-sql

Author  Topic 

dataforums
Starting Member

14 Posts

Posted - 2005-05-03 : 17:19:55
Hi,

I need to declare a varible in dynamic t-sql to hold a large string which is more than 8000 characters. In oracle LONG can hold this but Can anyone tell me what datatype can be used to represent a LONG data type in T-sql?

Thanks in advance.

kendo666
Starting Member

12 Posts

Posted - 2005-05-03 : 17:23:28
use text (or ntext for unicode)
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-05-04 : 09:42:03
A variable can only be defined as text as an input ot output vatibale in a sproc


DECLARE @x text
GO

CREATE PROC mySproc99(@x text)
AS
--DECLARE @y text
SELECT @x
GO




Brett

8-)
Go to Top of Page

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2005-05-04 : 10:43:54
Brett, does that mean you can't define a local variable with text or ntext within a stored procedure but you can pass it as input or ourput parameters..?
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2005-05-04 : 11:11:40
Yes...

That's what the example is meant to show.



Brett

8-)
Go to Top of Page

dataforums
Starting Member

14 Posts

Posted - 2005-05-04 : 15:26:52
Thanks, Brett!!
Go to Top of Page
   

- Advertisement -