I'm building a Table Valued Function in SSMS, and I'm expecting IntelliSense to help me select columns, but it doesn't. Consider this:
CREATE FUNCTION dbo.My_TVF
(
)
RETURNS TABLE
AS
RETURN
(
SELECT [PO].I -- Here I is my cursor, ctrl+space does nothing
FROM dbo.SomePurchaseOrderView PO
JOIN dbo.SomePurchaseOrderLineView POL ON PO.PO_NUM = POL.PO_NUM
WHERE PO.PO_NUM IN (
SELECT TOP 500 PO_NUM
FROM dbo.SomeTable
WHERE PROCESSED = 0
)
)
GO
I want it to suggest column names for the select clause.
Notes:
I know it often fails when there is some kind of syntax error in what you are writing, but I can execute my query just fine when I specify a column.
On msdn it says: "IntelliSense is available for the SELECT statement when it is coded by itself, but not when the SELECT is contained in a CREATE FUNCTION statement."
Although, when testing it in my SSMS 2012, it does seem to work...
Source: http://msdn.microsoft.com/en-us/library/bb934481.aspx
(sorry, I don't have enough rep for a comment...)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With