473,406 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Only printing 8000 characters after using varchar(max) instead of max(8000)

Hi,I am creating my SP as dynamic,
On that i am defining varchar(max) to need to get more than 8000 characters.

But my SP is taken only 8000 characters when i am doing Print to my SP.

Please help how to got All

SP for Reference -

ALTER PROC [dbo].[spEditorReport_Test]
( @PJID VARCHAR(20),
@Pstartdate VARCHAR(50),
@Penddate VARCHAR(50),
@PEditorId VARCHAR(100),
@IsDateAssigned BIT

)
AS
BEGIN
SET nocount ON
DECLARE @jid VARCHAR(20),
@StartDate VARCHAR(50),
@endDate VARCHAR(50),
@DBName VARCHAR(20),
@Query VARCHAR(MAX)

SET @DBName = 'nature'
SET @Query = 'DECLARE @jid AS VARCHAR(20),
@StartDate AS VARCHAR(50),
@endDate AS VARCHAR(50),
@DBName As NVARCHAR(50),

......................................
......................................
(Having Big Length)
......................................
......................................

print (@Query)
exec (@Query)
END


Output: Only printing 8000 characters like -

DECLARE @jid AS VARCHAR(20),
@StartDate AS VARCHAR(50),
@endDate AS VARCHAR(50),
@DBName As NVARCHAR(50),

@PEditorId AS NVARCHAR(2000),
@IsDateAssigned BIT

................ (Till 8000 char, rest it leaves)


Please tell me how can i print all characters.
Mar 31 '11 #1
0 1108

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: J Belly | last post by:
Hi, all: I have a form which lets users choose more than one value for each question. But how do I insert each value as a separate row in my table (instead of having the values submitted as a...
2
by: Jaidev Paruchuri | last post by:
I have two tables 1)Rollout_detail start_date Datetime, contract_date Datetime, budget_amt Money store_id int(foriegn key referring store.store_id) pan_number varchar(20) roll_id...
7
by: Rick Caborn | last post by:
Does anyone know of a way to execute sql code from a dynamically built text field? Before beginning, let me state that I know this db architecture is built solely for frustration and I hope to...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
2
by: John | last post by:
Hi Everyone, I have a question about dynamically changing the length of a varchar(n) field, in case the value I'm trying to insert is too big and will give a "truncated" error, but before the...
1
by: Chris Moore | last post by:
Hello, I am attempting to write a stored procedure that builds and executes a dynamic SQL statement which can be up to 8000 characters long. Therefore, I have declared a variable of type...
6
by: mike | last post by:
so I keep optimizing my fields down to the minimum character length necessary i.e., varchar(15), then I find out a month later its gotta get bigger, then a few months later, bigger again, etc. ...
5
by: Jay | last post by:
My understanding is that char stores a fixed number of characters even if the string stored in the char has fewer characters, whereas varchar stores the string with the number of characters that...
4
by: Gangreen | last post by:
I work in visual basic,and have 2 forms programs. One acts as a client, the other as a server. I send two things from client to server; 1: a string describing which service of the server is...
2
by: shijukumar | last post by:
If you use VarChar can you not set the max field length to 8000 characters?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.