i had execute this query in sql server management studio 2012 the result was ok , but when exécute it via other interface i had this error message : ODBC-ERROR / 3700 / MICROSOFT SQL SERVER native client 11.0 la fonction substring requiert 3 argument(s)
the querry :
select(select substring ( (SELECT case when kindart = 'H' AND vater='2' AND FIE.glasteilend='N' and FIE.ffartnr <> '' then FIE.GHOEHE when LFDNR='2' AND FIE.glasteilend='N' and FIE.ffartnr <> '' then FIE.GHOEHE end test1
FROM AUFART FIE WHERE FIE.AUFNR=L.AUFNR AND FIE.REFPOSNR=L.REFPOSNR AND FIE.glasteilend='N' and FIE.ffartnr <> '' FOR XML PATH ('FIE.auftnr')),20,6 ) + ' '+ substring ( (SELECT
case when kindart = 'H' AND vater='2' AND FIE.glasteilend='N' and FIE.ffartnr <> '' then FIE.GHOEHE when LFDNR='2' AND FIE.glasteilend='N' and FIE.ffartnr <> '' then FIE.GHOEHE end test1
FROM AUFART FIE WHERE FIE.AUFNR=L.AUFNR AND FIE.REFPOSNR=L.REFPOSNR AND FIE.glasteilend='N' and FIE.ffartnr <> '' FOR XML PATH ('FIE.auftnr')),71,6)) H_Vitrage1
from AUFPOS L
where L.aufnr = '5009340'
would please at least tell me why in sql management studion work just fine and evry where else not
thank you