Tables :: Combining Two Text Columns Into One In A Table?

Aug 16, 2013

My Approach database contains records relating to nearly 800 sites in London. There are radically different amounts of data held about each site. The database contains a lot of different tables, each containing a different class of information. Not all the sites listed in the database have information in all of the tables.

The unique thing that holds it all together is the unique site reference number. Unfortunately this is split into two separate columns in the Approach database, "Reference" and "Suffix". Not all sites have a suffix. (The purpose of the suffix is to identify sub-sites which are subordinate to the main site reference, but need to have their own individual records.) Because many sites have no suffix, most of the fields in the second column are blank.

In order to link all the tables together in access I need a Primary Key which is unique to each site. In this case the reference/suffix number is the obvious (only) candidate. There is no problem using two different columns to create a primary key. The problem I face is that it doesn't like the fact many of the fields in the second column are blank.

My solution to this is to combine the two columns into one. That would give every site a unique reference, and none of the fields in the combined column would be blank. Can I work out how to do it? All I want is a new column that displays the reference and suffix (if any) in a single field, no spaces.

View Replies


ADVERTISEMENT

Combining Date Columns From Different Tables And Retrieve Data

Aug 17, 2012

I'm trying to retrieve information from 3 tables (Order, Receive and Issue) to one table as Inventory Table/Query. it looks like as follows

Order Table:

OrderID
ProductID
OrderDate
OrderQTY

1
1
3/1/2012
30

2
1
4/1/2012
10

3
2
4/1/2012
20

Receive Table:

ReceiveID
ProductID
ReceiveDate
ReceiveQTY

1
1
3/3/2012
30

2
1
4/3/2012
10

3
2
4/2/2012
15

Issue Table:

IssuedID
ProductID
IssuedDate
IssueQTY

1
1
3/5/2012
20

2
1
4/6/2012
10

3
2
4/5/2012
5

I'm looking for Inventory table/query which will give all of the data per date, which is like the following

Inventory:

Date
ProductID
OrderQTY
ReceiveQTY
IssueQTY

3/1/2012
1
30

3/3/2012
1
30

3/5/2012
1
20

4/1/2012
1
10

4/1/2012
2
20

4/2/2012
2
15

4/3/2012
1
10

4/5/2012
2
5

4/6/2012
1
10

View 3 Replies View Related

Combining Some Columns In Access Table

Jun 21, 2012

I have a table in Access with 184,000 rows or records of data and 20 columns or field names. When looking at the table ten of the columns represent the identifying information for the data stored in the other ten columns. I need to convert the last ten columns of data into one column with a second column added to identify the original field name. Then end result would be one current record of data being converted into ten records with the original 10 columns of identifying data, a new column containing the original field name and a column for the data value from the original column identified in the new column.

I have been able to do this in Excel using a consolidation pivot table, un-checking the rows and columns then clicking on the final sum value to get a detailed list of the records. Unfortunately there still appears to be a cap because I get a message saying some of the data has been dropped after a little over a million rows.

I am using the 2010 version of Access and Excel.This is the smaller table. I have several others that have up to 200 columns that need to be converted the same way.

View 6 Replies View Related

Combining Multiple Columns Into One Longer Column (without Combining Fields)

Jul 17, 2013

I trying to combine three columns that I have into one column without combining fields.

Currently what I have:
(see image below)

What I want:
ID-----MOC
##----name1
##----name2
##----name3
##----name4
##----name5
etc

The list I have will be much longer and will be changing frequently, which is why I can't just go on excel and manually do this.

View 14 Replies View Related

Combining Tables To Make One Big Table?

Oct 11, 2006

Hi

I have several small tables that I want to make combine into a big table.

How do I do this - is the only way by using a query?

Maria

View 2 Replies View Related

Combining Rows From Multiple Tables Into A New Table

Nov 21, 2006

I have three tables, with the following data (fields separated by "-" here):
Unit - Customer Number - Customer Name - Type of A/R - Total A/R
Unit - Customer Number - Customer Name - Type of A/R - Total Overdue
Unit - Customer Number - Customer Name - Type of A/R - > 90 Day Balance

I would like to combine these tables into one table with the following field names:
Unit - Customer Number - Customer Name - Type of A/R - Balance

When I append the data, it comes out like this:
Unit - Customer Number - Customer Name - Type of A/R - Total A/R - Type of A/R - Total Overdue - Type of A/R - > 90 Day Balance

I would like this new table to include all rows from the original tables, sandwiched on top of each other. As far as I can work it, the Append Query only adds the data as add'l columns; not as add'l rows. I tried changing the field names entirely, so that the final field in each table is called "Balance." However, I still get the same result as above - the columns are added, instead of rows. I swear there's a way to do this, I just can't remember it!

View 1 Replies View Related

Combining Columns

Feb 7, 2006

Hello,
I am trying to combine 2 columns from 2 different tables. Table names are Center and TeachingSite. These tables are stored in an Oracle database, so i can't really change the table structure. I need to combine the Center.Name and TeachingSite.Name field into a list box on a form. This way, everything is listed into one list box instead of a list box for Center.Name and 1 for TeachingSite.Name. Is there a way to create a SQL statement or anything else that would work that will combine these into one listbox and be able to select any item from the list to show related data on subforms and so on. Thanks.
Jared

View 8 Replies View Related

Combining 2 Columns For Retrieval

Jan 11, 2008

Hi,

I want to retrieve data from 2 columns using only 1 search option. At the moment I have 2 ID fields which contain various numbers. My data retrieval functionality only retrieves data on either one column or the other using 2 search buttons. So for example, if they want to retrieve data on ID column1 they have to click the button named this and if they want to retrieve data on ID column2 they have another button for this. What I want to do is when the user clicks the button I want access to prompt them for an ID number (only want 1 prompt). Once the ID number is input I want access to search both columns for the ID number and return it. Any ideas on how this can be achieved plz?

Thanks

View 1 Replies View Related

Combining Multiple Columns Into One

Sep 4, 2007

I'm trying to make a payment report which prints a separate pay sheet for each employee based on what job they did. I don't want to get into too much detail here, but basically, a name is associated with each action in a setup like this:

Job1......Job2......Job3......Job4......Job5
Joe.......Bob.......Jim.......Fred......Jeff
Joe.......Joe.......Jeff......Jim.......Jeff
Bob.......Bob.......Jeff......Bob.......Jim

and so on and so forth.

I want to have a query that gives one column that looks like this:

Bob
Fred
Jeff
Jim
Joe

I already know how to sort and group by, but how would I write a query that contains one column, then another column when that one ends, then another, et cetera?

(I need to know this, because it would be a lot cleaner to show one report for all 5 jobs than a report for each job separately, and of course, that's how the boss wants it!)

View 3 Replies View Related

Tables :: Combining Several Tables Into One Table

Aug 23, 2013

I have 10 tables. None of them have any entries in them. Just field names. Is there a way to combine them all into one table.

View 14 Replies View Related

Tables :: Various Columns Of Data Mixture Of Text And Numbers

Feb 4, 2015

I have various columns of data, a mixture of text and numbers, which all have data in them, and a few columns that have numbers or text. When I copy'n'paste-append into the Access table, the text in the sparsely populated columns doesn't copy across but the numbers do.

It works if I import the spreadsheet from scratch (don't want to do that however, that data comes from somewhere else and would require modification to suit), or if I sort the data so that the text is at the top of the column, it works. Don't really want to do that either as there are 5 columns that this applies to and performing a 5 level sort shouldn't be necessary IMO. It seems that the paste is analysing the data and deeming that it should paste as a number even though the column contains text. There are only 120 rows of data, not a lot! I've tried redefining the field as Long Text (currently Short Text) but it doesn't make any difference.

View 2 Replies View Related

Queries :: Combining Columns / Rows With Same Cell Value As Key

May 20, 2013

I am a beginner in SQL, I have a problem regarding combining rows/ columns having value. Below is my example:

Table1:
1 123 23 43
1 234 3 431
2 34 34 34
2 54 3 123
3 1 32 32
2 341 1 32

Output Table:
1 123 23 43 234 3 431
2 34 34 34 54 3 123 341 1 32
3 1 32 32

or instead of combining rows, getting the result by combining columns with the same condition.How can I obtain such result?

View 3 Replies View Related

Queries :: Combining 4 Columns - Leading 0s Lost

Apr 18, 2013

I'm trying to combine 4 columns. Some of the columns have leading 0's and when I run my query I loose the leading 0's.

BATCH SOURCE NO SEQLINE
11012011 P 004800525

SELECT [BATCH] & "" & [SOURCE] & "" & [NO] & "" & [SEQ] AS RECEIPT, [7ef].LINE
FROM 7ef;

screen shot attached

View 6 Replies View Related

Queries :: Combining Columns And Replacing Certain Values

Sep 29, 2014

I need to create a query that combines two columns (lets say Column A and Column B for example) however the problem is that whatever non-null values that are in Column B must replace any value in Column A. If Column B has a value that is null then Column A's value is shown.

I have an example of what I'm working with (access file) and what result I want (excel file).

View 2 Replies View Related

Modules & VBA :: Attempting To Import Tab Delimited Text File With 274 Columns Into 2 Access Tables

Aug 2, 2013

I'm trying to import a text file with 273 fields into two tables. I've been able to do this with the code I found on an old thread and I'm now trying to accomplish everything with one step. The file I'm importing is tab delimited text file. With this current code I'm only able to populate the first record in the table and then I get error message. (Run-time error '3265') (Item cannot be found in the collection corresponding to the reqested name or ordinal).

Code:

Public Sub ImportTextFile()
' to use the ADODB.Recordset, be sure you have a reference set to ADO
Dim rst As ADODb.Recordset
Dim rst2 As ADODb.Recordset
Dim strFile As String
Dim strInput As String
Dim varSplit As Variant
Dim intCount As Integer

[code]...

View 4 Replies View Related

Combining 2 Query Columns Into 1 Column With Data In Separate Rows

Mar 29, 2012

I have a database with all the hours employees have logged stored in the database. Our payroll company wants an excel spreadsheet that has very specific info in particular columns and fields on the excel spreadsheet, so I'm trying to design a query which will put the correct info in the correct fields per their system.

The challenge is, I have currently a query with Employee ID, Overtime Hours, and Regular Hours as separate columns.

I need to translate this to a query with a single column for hours and a separate column that designates those hours as OT or Reg, with two rows for those employees who have both types.

Current:

ID / Regular Hours / OT Hours
101 / 70 / 7.5
102 / 30 / 0
103 / 5 / 0

Needed:

ID/ Hours / Type
101 / 70 / Reg
101 / 7.5 / OT
102 / 30 / Reg
103 / 5 / Reg

I don't know how to create a query or a formula in a query to break out each employee row into multiple rows with different data in the hours column. It seems like there's something pretty straightforward that I've done in a similar vein but it doesn't seem to work - I can do the opposite and combine those hours by using the SUM function in a query, but I can't seem to break it out this way.

Access 2007, Windows 7.

View 5 Replies View Related

Create Table Of Different Columns In Three Tables Join To Form A Master Table?

Jun 4, 2015

I have three tables that contain different columns but linked by a primary column call Name. I want to create a table where all these different columns in the three tables join to form a master table which can be updated regularly either through the master table or the smaller tables. The master table also has the primary column as Name.

If I update the master table with records, it should update the respective linked table and vice versa. I also want to link these tables to my SharePoint site.

Note: except the Name column, none of these tables have any other columns in common How do I go about this?

View 7 Replies View Related

Tables :: Adding Same Prefix To All Columns In A Table

Jan 23, 2013

My database has three tables with many columns. The three tables are identical in the names of their columns.

I want to copy all columns from all three tables together into one single table, giving the respective columns prefix table1-, table2-, table3- since the columns would otherwise be indistinguishable.

I already tried to search the board for "table columns add prefix".

I use Access 2010

I managed to copy all columns together into one table through design-view, but cannot figure out the "add prefix" step.

View 9 Replies View Related

Merge Columns From Many Tables Into One Column In New Table

May 21, 2013

I have 4 tables that store information on guest charges (stayinfo/room rate, fuel charges, bar tab, merch charges) each linked to table carrying guest ID's. Is there a way to combine/merge all the tables into one in such a way that all of the guestID's are in one column, all of the charges are in another column etc? Basically adding one table to the bottom of another.

View 1 Replies View Related

Tables :: Delete Extra Blank Columns At End Of Table

Jul 15, 2015

I have an Access table with data fields however at after the last field column, I have about 15 blank and unselectable or uneditable columns that I don't want there. How I delete these? Reason I want to delete them is because table is a subform on a main form and these extra columns are visible on it and they also cause a scroll bar to shown

View 4 Replies View Related

Tables :: Can Set Number Of Columns Limit On Access Table?

Apr 22, 2013

I have to submit a file to a government agency that requires more than 200 columns. Is there a number of column limit an Access table can have?

View 1 Replies View Related

Tables :: Save List Box Columns To Table Fields

Mar 31, 2015

What is the correct way to save the values in a listbox column to the fields of a table? I can use rec("field1") = Me.list16.ItemData(Varitem)and that records the bound column to field 1 but how can I save the unbound columns to other fields in the table?

View 4 Replies View Related

Linking Table Columns Within Different Tables As Master And Slave?

Jul 7, 2014

I have a database with two tables. tbl_job_information contains all the contracts info etc. tbl_data contains all the relevant work data. The first table is restricted to certain personnel, whereas anyone has access to the second table. Both tables have a column called 'job no', in the first table it is a primary key, in the second just a field. I would like to make it impossible in the second table to change the data in the 'job no' column to anything that is not in the same column in the first table. It this possible within the tables themselves, or would I have to do it via coding and forms?

View 4 Replies View Related

Combining Text When It Has Space

Oct 9, 2006

Hi

is it possible to combine text in a table when some have a space between them eg 123 456 789B would like it on the table as 123456789B without any space. I was not sure what command to use in a query to get this type of and use it for an update query if possible.
Can someone help
Many thanks

View 1 Replies View Related

Combining First Letters Of Two Text Fields

Feb 21, 2005

In a form I can easily combine and display the content of two text fields in a third text field with the formula =[field1] & [field2]. Very well. Now I would like to combine and display only the first letter of each of the two text fields. This I would expect to go somewhat like this =(letter,1,1[field1]) & (letter,1,1[field2]). How is the correct formula?

View 4 Replies View Related

Combining Two Text Box Values Into One Label

Jun 12, 2013

I have two text boxes, and i want to make there value be the label for the form. Here is what i have in the Label on the form:

=Nz([Last Name] And [First Game],"Untitled")

Where am i going wrong?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved