Parameters question

G

Guest

Hi,
Can someone please explain the requirement/advantage of declaring parameters
in a query? For example, these two queries return the same results, so why
declare the parameters?

PARAMETERS [Enter Date] DateTime;
SELECT Orders.CustomerID, Orders.OrderDate, Orders.ShippedDate
FROM Orders
WHERE (((Orders.OrderDate)>[Enter Date]));


SELECT Orders.CustomerID, Orders.OrderDate, Orders.ShippedDate
FROM Orders
WHERE (((Orders.OrderDate)>[Enter Date]));

Thanks for any insight,
Dave
 
D

Duane Hookom

Parameters are generally required for dynamic criteria in crosstab queries
(not always). Otherwise, they are mostly ignored in other queries. They
might increase the performance a little but don't quote me on that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top