Calling a procedure from within Access SQL

  • Thread starter Thread starter Ed Cohen
  • Start date Start date
E

Ed Cohen

I have created a procedure in Access using the query tab, as follows:

PROCEDURE CasesToBottles [NumCases] IEEEDouble, [ItemNumber] Text ( 255 );
SELECT DISTINCT Round(([NumCases] * (Select BottlesPerCase FROM Items WHERE
ProdNumber = [ItemNumber])),0) AS NumBottles
FROM Sales;

I saved this "query" as qryCasesToBottles. I want to call this query from
within other queries. But so far, I can't get the syntax right. Can anyone
help? thank you


Ed Cohen
 
hi Ed,

Ed said:
I have created a procedure in Access using the query tab, as follows:
PROCEDURE CasesToBottles [NumCases] IEEEDouble, [ItemNumber] Text ( 255 );
SELECT DISTINCT Round(([NumCases] * (Select BottlesPerCase FROM Items WHERE
ProdNumber = [ItemNumber])),0) AS NumBottles
FROM Sales;
This is a stored procedure. So switch to the stored procedure tab and
create it there.

btw, if there is non sp tab, then you are using a .mdb/.accdb. Normal
Access databases don't have stored procedures. You only have them in
..adp with SQL Server.



mfG
--> stefan <--
 
Back
Top