I have an inventory log which has a running log of items and is timestamped when a new entry is submitted. Because it is a log it has multiple entries for each item (when the particular item switches hands for example)
I am trying to create a report (using a table with calculated field) which will show the list of items and the last timestamp associated with each item.
I created a calculated field and tried:
SELECT TOP 1 Date
FROM tbl_Tablet_Inventory_Log
WHERE DeviceWirelessNumber=[@field:DeviceWirelessNumber]
ORDER BY Date DESC
Date is the column from the tbl_Tablet_Inventory_Log with the timestamp, DeviceWirelessNumber is the column name of item I am trying to match on current table with the calculated field
I am getting error:
Invalid formula: Subqueries are not allowed in this context. Only scalar expressions are allowed.
Completely new to sql and would appreciate any help
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Question
Fleshzombie
I have an inventory log which has a running log of items and is timestamped when a new entry is submitted. Because it is a log it has multiple entries for each item (when the particular item switches hands for example)
I am trying to create a report (using a table with calculated field) which will show the list of items and the last timestamp associated with each item.
I created a calculated field and tried:
SELECT TOP 1 Date
FROM tbl_Tablet_Inventory_Log
WHERE DeviceWirelessNumber=[@field:DeviceWirelessNumber]
ORDER BY Date DESC
Date is the column from the tbl_Tablet_Inventory_Log with the timestamp, DeviceWirelessNumber is the column name of item I am trying to match on current table with the calculated field
I am getting error:
Invalid formula: Subqueries are not allowed in this context. Only scalar expressions are allowed.
Completely new to sql and would appreciate any help
Thanks!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.