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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change column names monthly

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi<br>I need to know if there is a way to change the column names in a table monthly? <br>EG <br>C1, C2, C3, C4<br>C2, C3, C4 will be monthly changing as 20001, 20002, 20003 and then next month<br>20002, 20003, 20004....so forth every month. Please help...Thank you.
 
OK, you want to change the field names of a table.&nbsp;&nbsp;Are you changing the data monthly also?&nbsp;&nbsp;If so, where is the new data coming from?&nbsp;&nbsp;My reason for asking is that if you are in effect creating new data every month it is pretty easy to create new field names.<br><br>If you could provide a bit of detail, we can give you some ideas on the best way to do this.<br><br> <p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br>
 
Kathryn<br><br>When first created the table will get data from a query whereby data for the 12 months will be input. I am not even sure how to create the table for the start with 12 months as the variable. Then the following month the the last column will change to show the lastest update. This will change monthly showing results for the last 12 months. <br>So the problem here is to first create the table with naming the variables with 20001, 20001 etc associated with it. Secondly will be updating it.<br>I appreciate your ideas.
 
Can you give me an idea of what the table upon which the query is based looks like?&nbsp;&nbsp;And also what you want the query results to look like?&nbsp;&nbsp;Give some sample data if possible.<br><br>I am looking for something like this:<br><br>tblMyTable<br>==========<br><br>YourFieldName1&nbsp;&nbsp;YourFieldName2&nbsp;&nbsp;YourFieldName3<br>&nbsp;&nbsp;&nbsp;XX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add9989&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9455<br>&nbsp;&nbsp;&nbsp;dai&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dja7t84&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;96t4u<br><br><br>qyrMyQueryResults<br>=================<br><br>YourQueryField1 YourQueryField2 YourQueryField3<br>&nbsp;&nbsp;&nbsp;XX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;add9989&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;9455<br>&nbsp;&nbsp;&nbsp;dai&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dja7t84&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;96t4u<br><br><br><br><br> <p>Kathryn<br><a href=mailto: > </a><br><a href= > </a><br>
 
<br>Kathryn<br><br>&nbsp;I figured the solution. Thank you for your help:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top