我想将存储过程用作另一个存储过程中的表。这是我的代码:
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
但它返回“'+' 附近的语法错误”。你对这个问题有什么建议吗?