Ok so I have a query that returns a bunch of fields and rows from a large table and I find that I need to calculate a value from another table and hopefully have that value display in the resulting recordset as a field.
To keep it simple let's say I have a query
Select recorid,description,dtstamp and several more fields from table1
From the second table I need to know if there are any rows with the matching recordid and a status='PS'
I could work with either a count of the records or just a true false based on if there is a match or not.
I am thinking maybe a sub query of some sort using count() but can't determine how to write it.
Keep in mind this table2 may have no records in it with a matching recordid or it may have lots of them and those that may be there may or may not have the status='PS' and I basically just need to know if there are any with matching recordid and status='PS'
Any hints?
To keep it simple let's say I have a query
Select recorid,description,dtstamp and several more fields from table1
From the second table I need to know if there are any rows with the matching recordid and a status='PS'
I could work with either a count of the records or just a true false based on if there is a match or not.
I am thinking maybe a sub query of some sort using count() but can't determine how to write it.
Keep in mind this table2 may have no records in it with a matching recordid or it may have lots of them and those that may be there may or may not have the status='PS' and I basically just need to know if there are any with matching recordid and status='PS'
Any hints?