Marcus, Scott (GEAE, RHI Consulting)
scott.marcus at ae.ge.com
Wed Feb 26 11:30:00 CST 2003
Here is an untested method to do it in Access with one query.... (Watch for line wrap) UPDATE tblParts_Chain SET tblParts_Chain.CurrentUserLogin = IIF(tblParts_Chain.CurrentUserLogin = "A","1", IIF(tblParts_Chain.CurrentUserLogin = "N","2", IIF(tblParts_Chain.CurrentUserLogin = "S","3", IIF(tblParts_Chain.CurrentUserLogin = "H","4","NA")))); Scott Marcus -----Original Message----- From: paul.hartland at fsmail.net [mailto:paul.hartland at fsmail.net] Sent: Wednesday, February 26, 2003 11:47 AM To: dba-SQLServer at databaseadvisors.com; accessd at databaseadvisors.com; dba-vb at databaseadvisors.com Subject: [AccessD] More SQL Server 7 Stored Procedure help if possible To all, If you read my first email regarding Stored Procedure's you will know that I am quite a novice at the moment. I have a table called tblAvailabilityAll which contains fields PayrollNo and an AvailabilityCode. The Availability codes are A,N,S,H and when an employee leaves, in the first instance we need to update A,N,S,H to 1,2,3,4 accordingly. Anyone have any idea how to do this within one Stored Procedure (or is it possible in a single Stored Procedure.....??? I would be grateful fr any sample code etc... Thanks in advance Paul Hartland __________________________________________________________________________ Freeserve AnyTime - Go online whenever you want for just £6.99 a month for your first 3 months, that's HALF PRICE! And then it's just £13.99 a month after that. For more information visit http://www.freeserve.com/time/ or call free on 0800 970 8890 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com