paul.hartland at fsmail.net
paul.hartland at fsmail.net
Thu Jan 13 03:45:23 CST 2005
To all, I have the following code in an Access database: SELECT tblAvailabilityAll.JobNo, tblAvailabilityAll.lblStaffingCode, IIf([lblStaffingCode]="Manager" Or [lblStaffingCode]="Supervisor",Count([PayrollNo]),0) AS StaffMan, IIf([lblStaffingCode]<>"Manager" And [lblStaffingCode]<>"Supervisor",Count([PayrollNo]),0) AS StaffOther FROM tblAvailabilityAll WHERE (((tblAvailabilityAll.JobDate)>=Date()-30)) GROUP BY tblAvailabilityAll.JobNo, tblAvailabilityAll.lblStaffingCode HAVING (((tblAvailabilityAll.JobNo) Is Not Null)) How can I put this into a view in SQL Server 7.0, The only thing I'm sure of is changing the Date()-30 to GETDATE()-30 and changing the " (double quotes) to ' (single quotes) Thanks for any help in advance Paul Hartland -- Whatever you Wanadoo: http://www.wanadoo.co.uk/time/ This email has been checked for most known viruses - find out more at: http://www.wanadoo.co.uk/help/id/7098.htm