Skip to main content
Question

Sub-Select in Query ?

  • Apr 21, 2023 4:00 PM UTC
  • 0 replies
  • 70 views

I'm trying to generate a list of items in one table that don't exist in another table based on query parameters.  Intent is to create a system whereby a clerk can check on availability of an item between certain date parameters.  

Roughly an SQL would look like this: 

SELECT ItemID
FROM Items
WHERE ItemID NOT IN (
    SELECT ItemID
    FROM LoanedItems
    WHERE Start_Date >= '2023-01-01' AND End_Date <= '2023-03-31'
);

I'd like to be able to do this interactively on the fly;

Anyone got any ideas how to do this, I'm somewhat stumped. I don't believe a query formula can be used this way, and it might have difficulty with returning data set; i thought about generating a report to show items loaned in the period (positive logic) and show it in a window for the clerk - but that would require human processing to know what items AREN'T in the list to figure out what is available....

I thought about a pipeline, but how can i TRIGGER it without forcing a record save....

Thanks for any ideas ... 



------------------------------
joe vandervest
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24

I am trying to understand what you're asking for here.


You are saying you have a list of items. And you want to know which of those items is not in another table. So can't you just have a Formula  Query Checkbox  on each individual record to check if that particular item is in The other table or not. 



------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------