Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

..FROM Statement non explicit Tablenames?

Status
Not open for further replies.

thokern

Technical User
Mar 19, 2003
21
0
0
DE
A normal (sql) select clause contains in the FROM section the <TABLENAME>(s)!

The DBMS I´m working with creates every day a table named: eCallByCallStatYYYYMMDD where YYYY is the year of current date, MM is the Month of the current date and DD is the day of the current date. Those tables are available for 10 days.

I want to query the CallByCallData of the current day. Every trial to get (odbc-sql)access to that table failed until yet.

Is there any trick to define the tablename non-explicit????

No, I don´t know the sa login! It must be done using sql-syntax!!!!!!!!!!!!!!!


ANY HELP WELCOME
 
Hi,
Try creating a command object with a parameter for the tablename..
When run, it should prompt you for the tablename and you can enter today's version..

Bad system design, by the way, to be reporting against..If you always want today's table, have the SqlServer admin create a synonym/alias ( not sure what SqlServer calls it) for it when it is created each day- that way you can use the constant synonym name ( Like eCallByCallStatToday, for instance)





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top