John
many thanks for your replies. I'm only in for the rest of this week for this morning as I have my graduation ceremony today and ball tomorrow so I may still have some queries next week!!!!
once again, many thanks
Manuela
fluteplr / john fill
many thanks for your responses. here's the code:
CREATE PROCEDURE stp_rptTCOTest
AS
SET NOCOUNT ON
-- Declare variables for values to be picked up from QuestionID 3
DECLARE @SurveyID VarChar(15)
DECLARE @GL1 VarChar(100)
DECLARE @GL2 VarChar(100)
DECLARE @UserName...
Have written a stored procedure to read table values differently, i.e. the table structure is as follows:
SurveyID QuesttionID Answer
1 3 Yes
1 4 Unsure
2 3 No
2 4 Yes
want to create a temp...
A stored procedure that was previously working under Win 95 / Crystal Reports 7 is now not working under Windows 2000 Professional with Crystal Reports 8.5!
The error message "ODBC SQL Server Driver - Invalid Cursor State" appears when I try to run the reports using this particular...
A stored procedure that was previously working under Win 95 / Crystal Reports 7 is now not working under Windows 2000 Professional with Crystal Reports 8.5!
The error message "ODBC SQL Server Driver - Invalid Cursor State" appears when I try to run the reports using this particular...
Rajeev
Thought I would just use CAST and CONVERT in the SELECT statement as the stored procedure just has a series of IF statements without any variables. The Crystal Report that uses the stored procedure comes back with error message "ODBC MS SQL SERVER ERROR: conversion of a char data...
Rajeev
hope you are well, many thanks for your help. we expect Case 1 to be the norm although we may find that the dd/mm/yyyy format will be most popular, will try it out shortly
Terry
many thanks for your reply. sorry, I don't think my explanation was clear. the field has a VarChar datatype...
We've had to specify a database date field as a VarChar as product will be used internationally with varying date formats. However, need to use this field with Date / Time functions. I'd like to be able to create another field in a stored procedure which changes this VarChar to a proper DateTime...
Rajeev thanks
meants to say have declared the two parameter variables before AS
and have declared other variables using DECLARE after AS
and then have created temp table
looks as if problem might be INSERT bit missing
will see how I go
Attn Rajeev
thanks very much
-- Populate temporary table with data where [datSurvey].[Status] <> 'D'
DECLARE curSurvey CURSOR FOR
SELECT [column names]
FROM [datSurvey] LEFT OUTER JOIN [datUser] ON [datSurvey].[Link] = [datUser].[Link]
WHERE [datSurvey].[Status] <> 'D'
ORDER BY...
I'm new to stored procedures. Am trying to create a procedure to
1) use a cursor to dump data into a temp table and
2) to then use IF statements with 2 different SELECT statements, based on the temp table, dependent upon user parameters.
Have only got to stage (1). Can see the stored procedure...
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.