G
Guest
I am working on this Access 2000/2002 ADP application. I am having a bit of
problem figuting out where the error is in this Stored Procedure:
---------------------------------
ALTER Procedure sp_ITLog_NoActivity
(
@beginningdate datetime,
@endingdate datetime
@Activity text
)
As
SELECT tblInventoryTransactions.TransactionID as ID,
tbl_InvTransactionTypes.ActivityDescription as Activity,
tblInventoryTransactions.dtStamp as Timestamp, tblEmployees.FullName as
Employee,
tblItems.itemnumber as Item, tblItems.ItemDescription
FROM tblInventoryTransactions
INNER JOIN tblEmployees ON tblInventoryTransactions.EmployeeID =
tblEmployees.EmployeeID
INNER JOIN tbl_InvTransactionTypes ON
tblInventoryTransactions.ActivityType = tbl_InvTransactionTypes.ActivityType
left outer join tblitems on tblinventorytransactions.itemid =
tblitems.itemid
WHERE (tblInventoryTransactions.dtStamp BETWEEN @beginningdate and
@endingdate) and tbl_InvTransactionTypes.ActivityDescription as Activity <>
"Remove Items"
order by tblInventoryTransactions.dtStamp
return
------------------------------
What I'd like to do bring back any value in the WHERE clause along with
start and end date against the tbl_InvTransactionTypes.ActivityDescription
as Activity other than the words "Remove Items". Don't know where it's
failing being new to stored procedures. Can anyone assist?
Management approached me with this, and now they want this yesterday. Your
input and correction of the above SQL statement will be appreciated.
Thanks,.............
problem figuting out where the error is in this Stored Procedure:
---------------------------------
ALTER Procedure sp_ITLog_NoActivity
(
@beginningdate datetime,
@endingdate datetime
@Activity text
)
As
SELECT tblInventoryTransactions.TransactionID as ID,
tbl_InvTransactionTypes.ActivityDescription as Activity,
tblInventoryTransactions.dtStamp as Timestamp, tblEmployees.FullName as
Employee,
tblItems.itemnumber as Item, tblItems.ItemDescription
FROM tblInventoryTransactions
INNER JOIN tblEmployees ON tblInventoryTransactions.EmployeeID =
tblEmployees.EmployeeID
INNER JOIN tbl_InvTransactionTypes ON
tblInventoryTransactions.ActivityType = tbl_InvTransactionTypes.ActivityType
left outer join tblitems on tblinventorytransactions.itemid =
tblitems.itemid
WHERE (tblInventoryTransactions.dtStamp BETWEEN @beginningdate and
@endingdate) and tbl_InvTransactionTypes.ActivityDescription as Activity <>
"Remove Items"
order by tblInventoryTransactions.dtStamp
return
------------------------------
What I'd like to do bring back any value in the WHERE clause along with
start and end date against the tbl_InvTransactionTypes.ActivityDescription
as Activity other than the words "Remove Items". Don't know where it's
failing being new to stored procedures. Can anyone assist?
Management approached me with this, and now they want this yesterday. Your
input and correction of the above SQL statement will be appreciated.
Thanks,.............