I am writing a stored proc to Select information, I would like it to only select between dates?
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 I have column name EffectiveFrom and EffectiveTo in PRODUCT_SCENARIO table. I need to select the Id value between this two dates.
Is it possible to use as WHERE Supplier_Fk = @Supplier and betweenEffectiveFrom andEffectiveTo
Does anyone know how to do this?
Thanks






