lone_rider15
Registered User.
- Local time
- Today, 21:57
- Joined
- Nov 6, 2016
- Messages
- 32
Hello Everyone,
I have 7 tables named with 7 days of week but has same data structure. I can't put them all in a single table because for example in Monday (22/11/16)'s file I have data from Sunday(20/11/16) and Monday (21/11/16), On Tuesday's file I have data from Tuesday (22/11/16) and Monday (21/11/16) and so on. I want to make a query which will take the table name from the selection of a combo box "cboWorkingDay" and return random 5% of the data. And then make a table named with the selection of another combo box "cboUserId". If the table already exists then just add the data.
In a nutshell:
Step -1: Select 5% FROM cboWorkingDay Where UserID=cboUserId
Step - 2: Then make table or copy data to the table named CboUserId
I have attached my sample database.
Hope someone can point me to the direction.
Thanks in advance.
I have 7 tables named with 7 days of week but has same data structure. I can't put them all in a single table because for example in Monday (22/11/16)'s file I have data from Sunday(20/11/16) and Monday (21/11/16), On Tuesday's file I have data from Tuesday (22/11/16) and Monday (21/11/16) and so on. I want to make a query which will take the table name from the selection of a combo box "cboWorkingDay" and return random 5% of the data. And then make a table named with the selection of another combo box "cboUserId". If the table already exists then just add the data.
In a nutshell:
Step -1: Select 5% FROM cboWorkingDay Where UserID=cboUserId
Step - 2: Then make table or copy data to the table named CboUserId
I have attached my sample database.
Hope someone can point me to the direction.
Thanks in advance.
Attachments
Last edited: