I have 2 queries.
The first query is from the webi universe which has:
Staff ID
Arrival Date
Leave Date
The 2nd query is an Excel data query that has:
Staff ID
Test Date
What I am want to do is to create a single table that has:
Staff ID
Arrival Date
Leave Date
Test Date
How can I do that?
Create two data providers. First Data Provider using Universe will select Staff ID, Arrival Date, Leave Date. Second Data Provider using Excel Data Source will select Staff ID, Test Date. Run the queries. Once the data is fetched. Merge the common column (Staff ID). Then create a new table and drag the columns as required.
Related
I have two tables:
documents table
audits table.
audits table is a polymorphic table and has auditable_type and auditable_id which is linked to the id of documents table. audits table also has event and new_values column.
Here's the table schema.
documents table has user_defined_field JSON column.
My goal is I want to get the first 4 values of the status field in user_defined_field JSON column. There will be a column in the report of the web app to display the 1st Status, 2nd Status, 3rd Status, 4th Status.
So basically, it's like the documents table is join to audits table and should get the first 4 record of the document id and display it in the SQL select as status_1, status_2, status_3, and status_4
Thank you.
I am using SSIS to import data from an Access database created by another department. It is weekly data, and one column is named [weeknum]_Sales - where each week the name of this column changes (201810_Sales, 201811_Sales, etc.) I am mapping that column (by position) to column in my db (Sales) but I need to put "weeknum" in another column.
Basically, their database is aggregating sales by item, and has this week's total (table has all items but only one week), but my db has years of data.
Their table (in Access)
Store, UPC, Sales, Units.....
My table:
Store, WeekNum, UPC, Sales, Units....
So I need to "retrieve" the left 6 characters of column name of column 3 (or 4) to a variable or expression before the SSIS Dataflow runs, and set column 3 of my table to that value for all rows inserted.
I know how to set the the destination column to a literal, expression or variable - but I don't know the specifics of how to get the column's name at run time of the SSIS package.
Thanks,
I am designing a database with there tables: Product, Customers and Test records.
Each product has a customer assigned. Hence, in the product table, I have a customerID field/column. In the test record, each record has a product. Hence the final Test record table will have ProductID and CustomerID.
On the form I have created a dialogbox which is displays, the product name and customer name. The sourcerow is from the Product table. However, what is stored is the ProductID and customerID. The product and customer names are displayed in two unbound fields.
Question. When retrieving record from the test table, do I need to do an onload script to process the value of the ProductID and CustomerID or is there a more efficient way?
enter image description here
You could either use a DLOOKUP
=DLOOKUP(Field, Domain, Criteria)
https://599cd.com/tips/access/dlookup-function/
Or create a Query that uses the IDs to join to the other Tables then pull in the names you want to see.
Basically I have a table named DEPOSITS with columns amount, date and time. Lets say I want to select all the columns of DEPOSITS and add in an additional column named Data source with the values deposits. Can I do this without altering the actual database table column?
So my select query output will be like
Table Deposits
amount date time dataSource
1000 1/1/2017 5am Deposits
2000 2/1/2017 10pm Deposits
Note that I don't wish to alter the table to insert a column dataSource. I just want to select it as shown. Please help thanks!
Yes you can:
select amount, date, time, 'Deposits' as dataSource
from Deposits
I am working on a database in MS Access 2013 which has a considerable amount of non-normalised data, and I want to move them out to alternate tables and use them as lookups in the main table. However, when I create a lookup column, MS Access deletes the data and there is far too much data to reset every record by hand.
Is there a way in Access 2013 to create such a lookup without losing the data?
Please don't comment about how using lookup tables in Access is bad. I have read posts like the one below and I disagree with most of the points there, and some of them are just simply wrong.
http://access.mvps.org/access/lookupfields.htm
Below is a sample of my data. I need to extract the 2nd and 3rd fields to other tables. If I can do this with them, I can do it with the others.
Presently this is stored as text in the fields. I would like to remove them and replace them with FK id's.
You could create your second table and add the data to the table. Then update the first table to match the records to each other
Let say you have the following table:
CustOrders
ID Customer DateOrdered
123 K-Mart 01/01/2013
124 K Mart 01/05/2013
125 Walmart 02/05/2013
126 Walmart 03/07/2013
127 Miejers 03/11/2013
128 K-Mart 03/12/2013
You could find out all of the Customers that are in the CustOrders table by performing the following:
SELECT DISTINCT Customer From CustOrders
Then create a record in the following table for each:
Customers
ID Customer
1 K-Mart
2 Walmart
3 Miejers
Then you could Update the CustOrders table by performing the following:
UPDATE CustOrders SET Customer = 1 WHERE Customer = 'K-Mart' OR Customer = 'K Mart'
Of course you would have to do this for each distinct customer you have.
Then if you want you could change the data type of the Customer field in the CustOrders table to Long Integer.
Lastly I would create a combo box on any entry/edit form that has the following RowSource:
SELECT ID, Customer FROM Customers ORDER BY Customer
Set the combo box to limit from list and bind to column 1.