D
doodle
happy thursday. SQL 2k5, access 97
I am in the process of migrating my db to SQL. FE is currently in A97.
I created a stored procedure identical to my query, except the query
has a parameter of report month as mmm-yy. Now what is the easiest way
to do the parameter? in this example,
WHERE (((ord.ReportMonth)='Mar-07') should be: WHERE
(((ord.ReportMonth)=parameter from user)
thanks for your help
-doodle
USE [spindle]
GO
/****** Object: StoredProcedure [dbo].[upOrders_ISP] Script Date:
03/22/2007 14:18:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[upOrders_ISP] AS
SELECT ord.ReportMonth, ord.OrderNum, ord.OrderDate,
jn.JobNum, ord.Customer, ord.Machine, ord.MachineSN,
ord.UnitType, ssn.SpindleSN, ord.OrderType,
ord.ServiceType, isp.ISPComments, isp.ISPType
FROM ((tblOrders ord LEFT JOIN tblOrders_JobNum jn
ON ord.OrderID = jn.OrderID) LEFT JOIN
tblOrders_SpindleSN ssn ON ord.OrderID = ssn.OrderID)
LEFT JOIN tblOrders_ISP isp ON ord.OrderID = isp.OrderID
WHERE (((ord.ReportMonth)='Mar-07')
AND ((ord.OrderDate)>'12/31/2005') AND ((ord.OrderType)='ISP'))
I am in the process of migrating my db to SQL. FE is currently in A97.
I created a stored procedure identical to my query, except the query
has a parameter of report month as mmm-yy. Now what is the easiest way
to do the parameter? in this example,
WHERE (((ord.ReportMonth)='Mar-07') should be: WHERE
(((ord.ReportMonth)=parameter from user)
thanks for your help
-doodle
USE [spindle]
GO
/****** Object: StoredProcedure [dbo].[upOrders_ISP] Script Date:
03/22/2007 14:18:36 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[upOrders_ISP] AS
SELECT ord.ReportMonth, ord.OrderNum, ord.OrderDate,
jn.JobNum, ord.Customer, ord.Machine, ord.MachineSN,
ord.UnitType, ssn.SpindleSN, ord.OrderType,
ord.ServiceType, isp.ISPComments, isp.ISPType
FROM ((tblOrders ord LEFT JOIN tblOrders_JobNum jn
ON ord.OrderID = jn.OrderID) LEFT JOIN
tblOrders_SpindleSN ssn ON ord.OrderID = ssn.OrderID)
LEFT JOIN tblOrders_ISP isp ON ord.OrderID = isp.OrderID
WHERE (((ord.ReportMonth)='Mar-07')
AND ((ord.OrderDate)>'12/31/2005') AND ((ord.OrderType)='ISP'))