October 12, 2011 at 3:37 am
Hi Guys,
I am working on two Server one is production and another is live server,
whenever i do changes on production server i have to upload or altered the script of Production server to Live server
i am facing certain problem if i have multiple procedures or functions
the below Script i have generated to get the procedures details, I used "Results in TEXT"(Reason for Tab Indent) format
then executing the below queries
"
EXEC sp_helptext SplitList
GO
PRINT 'GO'
EXEC sp_helptext GetDeviceLogData
GO
PRINT 'GO'
EXEC sp_helptext GetDeviceDetailsByGroupORCompany
GO
PRINT 'GO'
EXEC sp_helptext Proc_Procedure0
GO
PRINT 'GO'
EXEC sp_helptext Proc_Procedure1
GO
PRINT 'GO'
GO"
When i execute the above queries, the result i got is
Text
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CREATE FUNCTION dbo.SplitList(
@Parameter0 VARCHAR(20)
,@Parameter1 DATETIME)
RETURNS
@RtnValue table (Id int identity(1,1) ,Value nvarchar(100))
AS
BEGIN
...............
END
GO
Text
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CREATE FUNCTION dbo.GetDeviceLogData(
@Parameter0 VARCHAR(20)
,@Parameter1 DATETIME
)
RETURNS @TempDeviceRecords TABLE(
LoggedDateTime DATETIME)
AS
BEGIN
..................
RETURN
END
GO
Text
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
CREATE FUNCTION dbo.GetDeviceDetailsByGroupORCompany(
@Parameter0 VARCHAR(20)
,@Parameter1 DATETIME)
RETURNS @SelectedDevices TABLE (
sDeviceName VARCHAR(40))
AS
BEGIN
...................
RETURN
END
GO
Text
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Create PROC dbo.Proc_Procedure0
@Parameter0 VARCHAR(20)
,@Parameter1 DATETIME
AS
BEGIN
......
END
GO
Text
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Create PROC dbo.Proc_Procedure1
@Parameter0 VARCHAR(20)
,@Parameter1 DATETIME
AS
BEGIN
......
END
GO
My problem is the "TEXT " and "--------------------------------------------------------" i have to physically remove this two lines every time when i want to altered the procedure from production to Live server
Is it possible to avoid the "TEXT " and "-----" line in RESULT set?
Thanks
Patel Mohamad
October 12, 2011 at 3:49 am
Hi guys,
I found the solution
it's in Options "Results in TEXT" Just uncheck the "Include column headers in result set"
Thanks
Patel Mohamad
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply