error ole db foxpro

  • hy

    i decided to write this on ole db foxpro source

    SET FMTONLY OFF

    exec [servername].[db].[dbo].[getWeekNumber]

    this is the sp:

    alter procedure getWeekNumber

    as

    begin

    declare @weekNum nvarchar(100)

    select @weekNum = convert(nvarchar(10),weekNum) from [server].[db].[dbo].[tblWeekMetadata]

    where GETDATE() between fdate and tdate

    set @weekNum ='select * from w' +@weekNum

    end

    but i get this error

    command contain unrecognized pharse/keywordany suggestion?

  • Hi,

    What is being returned to @weeknumber before you try the SET @WeekNum = 'SELECT * FROM w' + @weeknumend?

    Regards

    Stephen

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply