I was wondering if these two queries could be combined into a single query?
Query 1: to get the @guidID to be plugged into Query 2:
DECLARE @guidID uniqueIdentifier
SET @guidID = (SELECT guidID FROM dbo.table1 WHERE IntID = 1)
Query 2: retrieves a combined table from a function and table1
SELECT o.guidID, IntID, Title, func.Name
FROM dbo.table1 o
INNER JOIN dbo.func1(o.guidID) func ON func.guidID = o.guidID
WHERE IntID = 1
func1 takes in a guidID object Returns a table of (guidID, IntID
Thanks for any help, this is as far as I've gotten, which give me the data that I need but in two separate queries.