Re: Text datatype
From: Wayne Snyder (wayne.nospam.snyder_at_mariner-usa.com)
Date: 08/18/04
- Next message: Jacco Schalkwijk: "Re: Text datatype"
- Previous message: Tibor Karaszi: "Re: installing an SQL server [database !!]"
- In reply to: Stevo: "Text datatype"
- Next in thread: Stevo: "Re: Text datatype"
- Reply: Stevo: "Re: Text datatype"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 18 Aug 2004 06:58:45 -0400
What most people do as a work around is either use multiple varchar columns
as parameters OR create and use a temporary table with a varchar column...
The stored procedure inserts data into the text column in the temp table,
then either selects the data out ( returning a result set with the text
column) , or allowing someone else to select against the table..
-- Wayne Snyder, MCDBA, SQL Server MVP Mariner, Charlotte, NC www.mariner-usa.com (Please respond only to the newsgroups.) I support the Professional Association of SQL Server (PASS) and it's community of SQL Server professionals. www.sqlpass.org "Stevo" <Stevo@discussions.microsoft.com> wrote in message news:1C2F23B5-D9C0-42A2-A62C-6768D188102B@microsoft.com... > I have a stored procedure that as one of its arguments takes a text datatype. > I need to call this stored procedure from inside a second stored procedure. > > The problem I have is that the value of the text argument in the first > stored procedure need to be constructed in the calling stored procedure. The > example below is not my actual stored procedure, but it illustrate the > problem I have. > > CREATE PROCEDURE First > @blah text > AS > --Do something > GO > > CREATE PROCEDURE Calling > AS > DECLARE @thing text > SELECT @thing = '' > SELECT @thing = @thing + col_varchar FROM Some_Table > --col_varchar is a column in table Some_Table of datatype varchar(10) > EXEC First @thing > GO > > This however fails to work as you can not declare a local variable of type > text. I can not use varchar(8000) as Some_Table will have many more entries > than 8000. Is there some workaround whereby I can call 'First' from 'Calling' > and have the argument '@thing' as the concatenation of a column of a table > which will certainly exceed 8000 characters? > > Thanks in advance
- Next message: Jacco Schalkwijk: "Re: Text datatype"
- Previous message: Tibor Karaszi: "Re: installing an SQL server [database !!]"
- In reply to: Stevo: "Text datatype"
- Next in thread: Stevo: "Re: Text datatype"
- Reply: Stevo: "Re: Text datatype"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|