Mike,
The worksheet names are currently, sheet1, sheet2 etc to a drive with appropriate permissions. (Proved that with the original bit of code)
Bob,
I can see where you are coming from - but doesn't it save the whole document as a .txt file rather than a worksheet - therefore deleting...
Am trying to save multiple worksheets within a workbook as a tab delimited file. However with the following code it saves multiple files with the correct sheet name, but only the data from Sheet1 (i.e. doesn't save the data from all the seperate worksheets)
Private Sub CommandButton2_Click()...
Apologies for my absolute stupidity - had used a cursor with the replace. However, forgot to write the cursor back to the table - hence no update. Thanks for your prompt response.
Am trying to clean up data. I am using LTRIM, RTRIM but also need to remove unnecessary spaces within the string.
e.g.
This is my string
should be
This is my string
Any solutions?
Thanks for help, after reading the link changed code to:
CREATE PROCEDURE Control AS
DECLARE @retStatus int
SET NOCOUNT ON
EXEC @retstatus = [Upload]
SELECT @retStatus = coalesce(NULLIF(@retStatus, 0), @@error)
IF @retstatus <> 0 begin
GOTO ErrorMsg RETURN @retStatus END
EXEC @retstatus =...
I have added End after the GOTO ErrorMsg lines.
However, if i change Tbl1, Col2 from a numeric to SmallDateTime and leave Tbl2, Col2 as an int.
I get:
Server: Msg 260, Level 16, State 1, Procedure Upload, Line 7
Disallowed implicit conversion from data type smalldatetime to data tye bit...
bborissov,
thanks for that, have copied your code - I get an "Incorrect syntax near 'success:'"
I am not sure if there is anymore code after it? or whether I need to add some "end" points?
I have a multiple store procs that are called from a 'controlling' store proc. This is working fine, however I am trying to introduce Error trapping. This is all fairly new to me and I need some advice as to what I should be looking for.
So far I have been using:
CREATE PROCEDURE Control AS...
I have the following code which returns "Incorrect syntax near the keyword 'THEN'." Please advise me on my errors!
declare @ImportTblAP nvarchar (2),
@ImportTblFY nvarchar (2),
@FYSTRING nvarchar (10),
@ModAPFY nvarchar (12)
select @ImportTblFY = rtrim(max(FY)),@ImportTblAP = rtrim(Max(AP))...
Alex,
The Master store proc looks like the following. I don't believe I have configured them to accept a parameter?
CREATE PROCEDURE [dbo].[usp_ControlPanel] AS
exec usp_InsertData
exec usp_UpdateData
exec usp_TransferData
GO
the code within usp_InsertData is
CREATE PROCEDURE...
I have a number of store procedures that run in sequence as part of data load process each month. Each one requires a common value to extracted from a table based on a criteria (e.g. Current Month). Can I create a variable in the first store proc and pass it to the remaining or do I have to...
I have been following the steps through as described. And still got the same error message as micanguk. However this morning after rebooting the server and then starting up the client I have connected successfully. Thanks. I created a SQL login on the server and then used that to connect...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.