Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
marleyuk
Starting Member
4 Posts |
Posted - 2006-02-16 : 04:45:52
|
Im importing a file into access and i want to add querys. The problem is the field im querying wont always be in the same place or be the same name. The only thing that remains the same is that the field i want to query will always be the last column. Anyone know what to do for this?? Thanks Marley. |
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-02-16 : 05:09:03
|
Hi Marley,Are you trying to perform a union of two queries?If yes then name of the columns doesnt matter.however, the datatype of columns (at the respective positions i.e if there are 2 columnsthen datatype of column1 of query1 should match datatype of column1 of query2 same with column2) and the number of columns of both queries should match |
 |
|
marleyuk
Starting Member
4 Posts |
Posted - 2006-02-16 : 05:17:17
|
Erm not really sure i understand. I'll explain the system.-I have a form with a command button,-Once clicked the form opens a dialogue window prompting the user to select a file,-Once the file is chosen it is automatically imported into a table,-I want to run 7 querys on the data in this table,-I want the output as a summary and to be saved as a .txt fileThe real problem is that with each import the amount of rows and columns will change.. the file been imported shows the data from different nodes so depending on how many nodes are tested the amount of data will change. |
 |
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-02-16 : 05:33:26
|
Everytime you are trying to append data into the same TableBut how come columns will change?? Not Clearquote: The real problem is that with each import the amount of rows and columns will change.. the file been imported shows the data from different nodes so depending on how many nodes are tested the amount of data will change.
|
 |
|
marleyuk
Starting Member
4 Posts |
Posted - 2006-02-16 : 05:41:05
|
There are 2 columns that remain the same "Time" and "Seconds" then the other columns are Nodes. So depending on the name of the node i test the column will change. Also depending on the amount of nodes i test the amount of columns imported will change. Example - import file 1Time | Seconds | Suhddsd2342 | safsa121 | sdgsd923212/01/06 | 3060 | 0 | 0 | 0.00112/01/06 | 1080 | 0 | 0 | 0.0023Example - import file 2Time | Seconds | hdhdhdhd23 | asaasas | 0sdsgsdgs12/01/06 | 3060 | 0 | 0 | 0.0012312/01/06 | 1080 | 0 | 0 | 0.0223 |
 |
|
shallu1_gupta
Constraint Violating Yak Guru
394 Posts |
Posted - 2006-02-16 : 05:47:57
|
Post The table structure in which you are importing the text files. And where exactly are you facing problems? While Importing or Querying?and what you are trying to query once data is imported. |
 |
|
marleyuk
Starting Member
4 Posts |
Posted - 2006-02-16 : 06:03:44
|
Im facing problems trying to query fields that wont excist until after each import. I cant add a picture to these forums so can i email you either a zipped version of the database or a picture?? |
 |
|
|
|
|