If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Query a dynamic table...HELP!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-01-03, 14:00
jshull jshull is offline
Registered User
 
Join Date: May 2003
Posts: 1
Question 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!!!!
Reply With Quote
  #2 (permalink)  
Old 05-02-03, 22:41
ClaireHsu ClaireHsu is offline
Registered User
 
Join Date: May 2003
Location: Parsippany NJ
Posts: 36
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On