Link to home
Start Free TrialLog in
Avatar of garyjgs
garyjgsFlag for United States of America

asked on

How do I create a 'from' 'to' in the Command parameter?

sample of queryin command:
,D.Dia
,D._Session_
,D._Modified_
,D._Status_
,D._Created_

FROM dbo."Ventas en Pesos" A
INNER JOIN dbo.Dim_Categoria B
ON A.Dim_Category_dKey = B.Dim_Category_dKey  
INNER JOIN Dim_Geografica C
ON A.Dim_Geografica_dKey = C.Dim_Geografica_dKey
INNER JOIN Dim_Tiempo D
ON A.Dim_Tiempo_dKey = D.Dim_Tiempo_dKey

WHERE C.Compania ={?Compania}
AND C.Region ={?Region}
AND C.Tienda = {?Tienda}
AND B.Area = {?Area}
AND B."Nivel Proceso" = {?Nivel Proceso}
AND B.Categoria = {?Categoria}
AND FROM D.Semana={?Semana}
TO D.Semana={?Semana}

What is the proper syntax and how do I setup the command prompt parameter for

AND FROM D.Semana={?Semana}
TO D.Semana={?Semana}

Avatar of Mike McCracken
Mike McCracken


Is that a rnge parameter?
D.Semana IN {?Semana}

Otherwise use a start and end parameters

AND D.Semana >={ ?Start}
AND D.Semana< ={?End}

mlmcc

Avatar of garyjgs

ASKER

That did not want to work.  When I create the parameter on the command prompt, what Name is it looking for?
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial