[dba-VB] [AccessD] [dba-SQLServer] Sent Wrong Info Regarding Stored Procedure help URGENT.

paul.hartland at fsmail.net paul.hartland at fsmail.net
Mon Jun 30 04:27:35 CDT 2003


To all,

I have two tables tblAvailabilityAll and tblAvailabilityCodes, in tblAvailabilityAll I have a payroll number, availability code (A, N, S or H) and a jobdate, in tblAvailabilityCodes I have an availability code and a corresponding number i.e

Code     Number
A          1
N          2
S          3
H          4

I have a VB6 form with an employees details on, and when a finish date is entered I need to convert the availability code in tblAvailabilityAll to the corresponding number in tblAvailabilityCodes.  I have the following stored procedure (this is the one thats timing out, not the on in the previous email).

CREATE PROCEDURE [genesis_update_AvailabilityCode] 
	( @Payroll_1		[nvarchar] (25),
	  @MyDate_2		[datetime] )
AS UPDATE [Genesis].[dbo].[tblAvailabilityAll]
SET AvailabilityCode = tblAvailabilityCodes.CancelledAvailabilityCode
FROM  tblAvailabilityAll INNER JOIN tblAvailabilityCodes
ON AvailabilityCode = tblAvailabilityCodes.LiveAvailabilityCode
WHERE (tblAvailabilityAll.PayrollNo = @Payroll_1 AND
	 tblAvailabilityAll.JobDate >= @MyDate_2)

can anyone see where the stored procedure may be going wrong......I could really do with some urgent help on this...

Paul

__________________________________________________________________________
Join Freeserve http://www.freeserve.com/time/

Winner of the 2003 Internet Service Providers' Association awards for Best Unmetered ISP and Best Consumer Application.


_______________________________________________
dba-SQLServer mailing list
dba-SQLServer at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
http://www.databaseadvisors.com

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the dba-VB mailing list