Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sql output print statement

Status
Not open for further replies.

Sniipe

Programmer
Oct 9, 2006
115
IE
I'm pretty new to SQL. But I have this problem with a stored procedure and I would like to view it. The sql statement is appended to if certain values are null. Then at the end its executed. It works fine for for some appended statments but others it bombs out with. I'd like to look at this varchar(1000) statement.

I've tried to do --> print thissql; <-- but I get the following error:
Code:
PLS-00103: Encountered the symbol "THISSQL" when expecting one of the following:

   := . ( @ % ;
The symbol ":=" was substituted for "THISSQL" to continue.

2) the second way I've tried is putting an extra OUT in the statement, like following
Code:
 PROCEDURE sp_Search_Quote (p_cursorPromo IN OUT cursorPromo, p_UserID IN number, p_QuoteID IN varchar, p_StartDate IN date, p_EndDate IN date,
	  							   p_Description IN varchar, p_returnsql OUT Varchar);
Where p_returnsql OUT Varchar is the same as thissql. But I only get the first 50 characters.

Any help would be appreciated. I hope I didn't go overboard on the info and hopefully I gave you enough information. I'm using c# to implement the statement.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top