Results 1 to 2 of 2
  1. #1
    Join Date
    May 2003
    Posts
    1

    Question Unanswered: Query a dynamic table...HELP!

    Hello,

    I am trying to write a query to pull data from a table that is system generated daily at midnight. I tried:

    declare @tablename varchar(50) set @tablename = (select name from sysobjects where crdate = '05/01/2003') select * from @tablename

    But I get an error on 'select * from @tablename' (must declare @tablename)

    Any assistance is GREATLY APPRECIATED!!!!

  2. #2
    Join Date
    May 2003
    Location
    Parsippany NJ
    Posts
    36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •