foreign key not recognized inside function
Ivailo Vratchanski
Posts: 8
the following code:
SELECT *
FROM Document.Status S
INNER JOIN Document.StatusType ST ON <<cursor here>>
and I can see foreign key in list candidates
but if I write the same inside function like this:
CREATE FUNCTION Func1(@Param1 int)
RETURNS TABLE
AS
RETURN
(
SELECT *
FROM Document.Status S
INNER JOIN Document.StatusType ST ON <<cursor here>>
)
GO
intellisense do not offer me any relations between the tables
Is there a way to activate foreign key list candidates inside functions?
SELECT *
FROM Document.Status S
INNER JOIN Document.StatusType ST ON <<cursor here>>
and I can see foreign key in list candidates
but if I write the same inside function like this:
CREATE FUNCTION Func1(@Param1 int)
RETURNS TABLE
AS
RETURN
(
SELECT *
FROM Document.Status S
INNER JOIN Document.StatusType ST ON <<cursor here>>
)
GO
intellisense do not offer me any relations between the tables
Is there a way to activate foreign key list candidates inside functions?