I have table named Ranges CREATE TABLE [dbo].[RANGES]( [Name] [varchar](50) NOT NULL, [From] [int] NULL, [To] [int] NULL)
then i want to use function that get the range of numbers between each from, to valueI typed this query using cross join select * from RANGEScross join(select * from dbo.fnCrossJoinRange2([Ranges.from],[Ranges.to]))t
dbo.fnCrossJoinRange2 is a table value function that I use this error appear after running the queryMsg 207, Level 16, State 1, Line 3Invalid column name 'Ranges.from'.Msg 207, Level 16, State 1, Line 3Invalid column name 'Ranges.to'.I want to solve that without using cursors or loopany suggestion please