![]() WHEN C.MODEL LIKE'TORBA PAPIER%' THEN 'TORBY PAP.' WHEN C.NR_REFERENCJI IN('REKLAM') THEN 'REKLAMÓWKI' When MONTH(A.DATA) =4 then concat('r-',year(getdate())+1-YEAR(A.DATA)) ![]() WHEN DATEPART(ISO_WEEK,A.DATA)=1 AND MONTH(A.DATA)=12 THEN YEAR(A.DATA)+1 WHEN SUBSTRING(C.KOD_SEZONU,1,2)='JZ' AND A.DATA 50 AND MONTH(A.DATA)=1 THEN YEAR(A.DATA)-1 WHEN C.KOD_SEZONU ='PERMAN' THEN 'REGULAR' Since the error message mentioned the concat() function, here is an example of use concat() in my select statement: concat('r-',year(getdate())-YEAR(A.DATA))Ĭast(concat(substring(C.KOD_SEZONU,3,4)+1,'-03-31') as date) Or maybe the syntax for this purpose should be different? I wonder if there is any function which I can use while executing the query but I should not use while creating a view. "The CONCAT function requires 2 argument(s), But used for view creator returns an error: ![]() Then I pasted earlier prepared select statement which works fine and without any error. I just basically followed few steps described in: I am trying to create my first View in The Microsoft SQL Server Management Studio 17.
0 Comments
Leave a Reply. |