Hi,
Is there any way for a function or a stored procedure to be aware of whether its results will be joined with another table in the calling query?
For example, assume one query calls:
Select * from MyFunction
while another query does:
Select * from MyFunction LEFT JOIN MyTable on ...
I would like that MyFunction will return different results in both cases.
Is there a way to accomplish this from within the function? (without passing a special parameter ..)
Thank you!
Is there any way for a function or a stored procedure to be aware of whether its results will be joined with another table in the calling query?
For example, assume one query calls:
Select * from MyFunction
while another query does:
Select * from MyFunction LEFT JOIN MyTable on ...
I would like that MyFunction will return different results in both cases.
Is there a way to accomplish this from within the function? (without passing a special parameter ..)
Thank you!