Can any body tell me if the following is possible in one SQL table.
Code Allocation Table
Basically when a new record is created, by populating the first 3 columns, the reference in column 4 is then generated, but the number is specific to the Project and Type fields and increments by 1 each time (multiple UID in one Table). So if some one generates another TEQ Document against Project 21345, for example, it remember the last number was 3 and allocates 4, as shown in the picture.
Many thanks in advance.
Related
Need one help. Suppose:
I have one query which gives 3 rows as output once user submits form.
On the same table 3 rows are generated as owner_details, shipment_details and contact_details. Here I have one foreign key which is same for 3 rows and one unique primary key.
Now I want to print all these 3 rows on Jasper with different owner_details, shipment_details and contact_details.
If you want to use three different section, one for every kind of details, you can design as follow your report.
Create a main report to get your main object (with three rows), so you can define 3 details bands with three different subreports, one for kind of detail.
In every subreport you can pass your collection and in the body of subreport you can discard the rows you don't want to print. So you'll have a report with three different sections and in every section one row. Right?
EDIT
To conditionate your row in detail you can do as follow (sorry but I've italian version, so the name can be different).
Select detail band as follow:
In the property tab you have a field with your print condition, as follow:
Click on 3 points and write your truly condition.
For example, if you have a field category with value ship_detail and you want to show only ship details, you can write as follow:
$F{category} != null && $F{category} == "ship_detail"
Sorry if this is a question which is ask many times, but im new to access and have no idea how this matter is called.
In Access I have 3 tables. The first one is Projects
Table Projects has many columns, one of them is Project_Name.
Second table is WBS
Table WBS has also many columns, one of them is WBS_Name and other is Project (which is a dropdown based on Project_Name from table 1).
Sample:
WBS table sample
The third is Orders, here is where im stuck.
Table Orders has a column called Order_Name, also in this table I have a column called Project (which is also based on Project_Name from table 1. The last column (WBS_Product) is a multiselect listbox with values from WBS_Name from table 2.
Order table sample
Now in this third table I want to see in the WBS_Product row only the values available for selection based on the Project selected in the second column.
You REALLY should be using forms if you want to customize your data entry like this. Because you're entering data directly into the tables, I don't believe this is possible.
I am looking for some design techniques to achieve the following:
A 3-part serial number that is generated upon record entry. Format Example: 25-001-14
The number is used to track yearly records from various locations.
The first part states the location the record is associated with, this would be a user input during record creation.
The second part is the record number, I would like for this to be automatically generated, but needs to be sequential and separate for each location and needs to reset each year.
The third part is the two digit number for the year the record was created in. I would like this to be automatically generated if possible. Note: I am currently not concerned with when this cycles back around and I face redundant data issues.
I'm thinking I would like records to be stored in multiple tables that are separated by location, if this would help things!
Any ideas would be greatly welcomed.
I think I would use 3 key fields - one field each for location, record and year. The location and year fields would be created when you get the input to create new records. I would set up a query to find the last record number used by location and year and use that query to assign the new record number when you create a new record. The concatenation of the 3 fields would be the key you described.
With a key field for location, separate tables are not necessary unless that's useful for other reasons. I would probably use just one table - you can always filter the records by location anytime you need to.
I have two identical table which consist of 3 field: ID, TID, and ITEM..
ID acts as primary key, TID identifies group of ITEM. Each TID could have different number of ITEM.
i want to compare the 2 identical table with condition like
check each grouped ITEM by TID in table 1 to each grouped ITEM by TID in table2
if table1. grouped Item exist as much as N in table2, it will be inserted into new table by query INSERT SELECT
for example at the screenshot, C - F -A has 3 occurences in table 2, thus they will be inserted into new table..
could it be done using mysql query?
i've already tried this using program by populating the two table into two 2d array, comparing them and with simple IF CLAUSE, getting the desired results.. and it worked well..
but the problem is, when i'm using huge database, it take ridiculous time to complete..
when i'm comparing 1st 2d array(table1 with 2k records) and 2nd array (table2 with 870 records), it take 2 hours to complete!!
this is the actual database
and this one is what i've already tried, populating two table above into 2d array.. while assigning both 2d arrays with table records, i also include the IF CLAUSE to check if element of 1st 2d array has N occurences in 2nd 2d arrays, the INSERT SELECT query will be executed..
the yellow blocked node col in 1st 2d array above, will e inserted into new table because it has 3 occurences in 2nd 2d array,
the number 3 came from user input
but since i'm using database object anyway, it cost me an expensive performance and time, too, i'm using vb.net 2005
i believe that there are alternative method for this problem.. could you all please tell me how the method? using mysql query or other method that could perform faster than one that i've tried?
best regards from me, thanks..
use linq its does all the mysql quires. You can find great documentation on it on msdn. Just build the db with mysql sever and use linq or entity they will both do all the commands for you. That way you can do data binding and save that info and pull it or whatever if you have more quesiton I have a copy of code in c# that uses tables for contact info I can see to you
This is a link to GitHub that contains the C# version using Linq
https://github.com/psychotiic/WebContactAppUsingLinq.cs
you will be able to use linq with that code that I just provided even though its C# its will be easy to figure out and if not you can find plenty of C# - VB code changers on the web for free.
I have a series of tables in an Access 2007 database. I am trying to find a way of outputting a flat-file to an excel spreadsheet that combines all of the tables so that each row of the flatfile represents a unique combination of the table rows from each table.
For example, these tables:
Would combine to make this output table:
The challenges I'm facing are:
The 'input' tables can vary in number of rows and columns, as well as quantity
The total number of rows in the final output table can get quite large (200,000+ rows)
I know Excel and VBA (in Excel) well but almost nothing about Access
Is there a way to do this in Access? Is there some native functionality in Access that I'm completely overlooking? Any pointers (even if it's "you need to read into X and Y") would be greatly appreciated!
Thanks,
Adam
As noted above:
Create a new query. Select your 3 tables as the data sources. If desired, set up joins between tables by dragging a line between a field in one table to a field in another. Without joins you will get a Cartesian Product ... every from 1st table paired with every row of 2nd table, and then each of those combination paired with every row of 3rd table. Select the fields you want included in the result set. When the query returns what you need, save it and give it a name. Then you can export that named query to Excel.
If the table is large, you could hit Excel's row / column limit though.