我正在为选择信息编写存储过程,我希望它只能在日期之间进行选择?
ALTER PROCEDURE [dbo].[spname]
@Supplier int
AS
BEGIN
SELECT
ProductScenario_PK, Supplier_FK,ProductID_FK,
ChannelProductVariation_FK, WorkflowID_FK,
FROM
PRODUCT_SCENARIO
LEFT OUTER JOIN
PRODUCT_SCENARIO_SWIMLANE ON PRODUCT_SCENARIO.ProductScenario_PK = PRODUCT_SCENARIO_SWIMLANE.ProductScenario_FK
WHERE
Supplier_Fk = @Supplier
我有列名FromDate
和ToDate
。我需要在这两个日期之间选择Id值。
有谁知道怎么做?