tags:

views:

11

answers:

1
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[FlowClientGetCatWeb] 
(@ID_Izmerit Integer, @ID_User Integer, @APP bit) 
AS 
SELECT Name, (CAST(ID_ListGroupParIzm AS nvarchar(10))+'_'+CAST(Point AS nvarchar(10))) AS GroupPoint 
FROM 
SELECT ID_ListGroupParIzm, Name, Point 
FROM FlowClientGetCat(@ID_Izmerit,@ID_User,@APP)

why error ? and how to fix :-/

+3  A: 

Enclose the nested query into parenthesis:

ALTER PROCEDURE [dbo].[FlowClientGetCatWeb] 
(@ID_Izmerit Integer, @ID_User Integer, @APP bit) 
AS 
SELECT  Name, (CAST(ID_ListGroupParIzm AS nvarchar(10))+'_'+CAST(Point AS nvarchar(10))) AS GroupPoint 
FROM    (
        SELECT  ID_ListGroupParIzm, Name, Point 
        FROM    FlowClientGetCat(@ID_Izmerit,@ID_User,@APP)
        ) q
Quassnoi