I want to use a storedprocedure as a table in another storedprocedure. Here is my code:
 ALTER PROCEDURE [dbo].[Rapor_FaturalandirilmisFaturalandirilmamisSeansKarsilastirmasi]
    -- Add the parameters for the stored procedure here
    @tarih1 SMALLDATETIME,
    @tarih2 SMALLDATETIME
AS
BEGIN
    SET NOCOUNT ON;
  SELECT  K.euclidNo
          ,K.klinik_id
          ,K.KlinikAdi 
(
SELECT * FROM OPENROWSET('SQLNCLI', 'Server=***;UID=***;PWD=(***)',
     'EXECUTE Rapor_FaturalandirilmamisSeansSayilari ''' + CONVERT(VARCHAR,@tarih1,102开发者_如何转开发) + ''',''' +  CONVERT(VARCHAR,@tarih2,102)+ '''')
) AS FATURALANMAMIS
FROM Klinikler AS K
WHERE refKlinikGrup_id=1
END
But it returns "Incorrct syntax near '+' ". Do you have any suggestion about this problem?
Your error is probably related to the apostrophe's -- those always give me trouble.
But regardless -- your OPENROWSET should be in your FROM clause, shouldn't it? I'd start by fixing that.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论