Concatenate Function For Table1

Mar 17, 2014

I would like to join 3 values to one new column called incident number. Problem is that one of the value is from a lookup field.

If the table look like

ID Type PNumber
1 INR 2477

I generated Incident number as [ID] "-" [Type] "-" [PNumber]. the result should be 1-INR-2477 but its shows 1-1-2477 because the Type column is a lookup field and INR is on the first value of the same lookup table.

How I could resolve this in the table or Query.

View Replies


ADVERTISEMENT

Help With Query: FROM Table1 WHERE Table2.Column1

Aug 30, 2005

Hi

I have two tables. both tables contain an id column (Integer) with the same values. Table1 contains the data I want. Table2 contains one column with boolean values.

So this is what I want (though it doesn't work at all)

FROM [Table1] WHERE [Table2].[BooleanVolumn]=true

So I want all the records from Table1 where the same record in Table2 have a true value in Table2.BooleanColumn.

This is hard to explain, but I hope you understand.

Thanks for any help!

View 2 Replies View Related

Comparing Values From Table1 And Table2

Sep 10, 2006

Hello everyone! I've found much use of this forum recently as I am working on a database concerning my work.

I'm not a newbie working with access but this problem seems confusing at the beginning.

I've got 2 tables
1) Information about produced details. Article, Mass etc.
2) Mass constants
Mass min. Mass max. Constant

What I need, is to build a query that compares the mass of the detail with the range mass min. and mass max. and shows the mass constant that the detail belongs to.

Has anyone tried to solve this kind of issue before?

Greets from Estonia,
K

View 1 Replies View Related

How Can I Convert Table1 To Query Or Table2 As Attached ?

Jan 10, 2005

Hi all,

Could you help me in converting table1 to query or table2 as attached?

Regards,

Mohammed Dallag
Saudi Arabia

View 1 Replies View Related

Queries :: Inner Join - How To Return Data From Table1 Only

May 7, 2013

How to return data from table1 only if table key matches table2 key.

I tried this but doesnt return me the data i want.

SELECT A.*
FROM tbA AS A INNER JOIN tbB AS B ON A.[ keyfld] = B.[keyfld];

View 9 Replies View Related

Taking Data From Table1 Modify And Output To Table2

May 25, 2006

hey all,

bit of a head scratcher for me here.

i have a database and i need to be able to read all the records from table1 modify the data and output the data to table2 and I would prefer this to be done via just one button in a form so im guessing VBA need to be used.

table1 consists of an ID field, firstname field, lastname field and date field.

table2 has ID field, full name field, date field

so i want to read the first and last name and date from table1, merge the first and last name and then output the merged names and date to table 2.

ive googled around and all ive come up against is recordsets but im having a hard time actually getting them to even work.

any help is appreciated.

cheers

Matty

View 6 Replies View Related

General :: Getting Values From Table2 Based On Value Selected In Table1

Oct 3, 2014

I have a table named Product and Quotation.

This is what i want to achieve

In Table Quotation when i select product name from dropdown menu i want all the related information for that product to be visible in Quotation like product id, productdescription & productcost

View 2 Replies View Related

Tables :: Autonumber From Table1 Not Coming Across In Number Field In Table2

May 5, 2013

I have created 2 tables:

StaffID
StaffTrainingID

Table 1 (StaffID) - contains all personal details in the form of forename + surname + position + email + contact numbers ect. Each field/person has an autonumber.

Table 2 (StaffTrainingID) - contains all mandatory training/lectures (18 fields in total). I don't wish to list each staff member again in table 2 so have put a StaffID field in (data type is number).

However, when I try to type in the StaffID number in that field so I can link that person to the relevant training he/she has taken, Access won't allow it.

View 4 Replies View Related

General :: Append Data From Table1 To Table2 Daily With No Duplication

Jan 6, 2014

I have 2 tables,

table1=productid,ProductName,Qty &
table2=Productid,productName,Qty,currentDate.

I want to be able to append data programatically once daily OnClose.Although users can log-off & on as many times,but the Append should be once & after then,update subsequent records for that day automatically from table1-table2.

View 2 Replies View Related

Tables :: New People Added In Table1 Not Showing Up In Other Tables Despite Relationship

May 5, 2013

I have 3 tables.

Table 1: contains staff names and contact numbers
Table 2: contains training above staff have been on or need to go on
Table 3: contains pc and printer asset numbers of above staff

I used a form and entered some new members of staff in table 1. They got their auto numbers etc but when I open table 2 and table 3 those new members are not showing up in those tables. I have checked the relationship status between the 3 tables and the staffID from Table 1 is associated to table 2 and to table 3.

What's stopping the new entries from showing up in tables 2 and 3 ?

View 10 Replies View Related

Concatenate And Iif

Mar 24, 2006

I have a problem I am working and and am not sure what the best approach is, hoping someone can lend me some insight:I have two fields on a table:SerialNumber....LocationI need to concatenate these two (no problem there). However my situation is such that my serial numbers vary in the number of digits. For example:serial - 55124 (five digits)serial - 552356 (six digits)serial - 5514235625 (ten digits)the serial number field is 10 characters and the serial numbers can be anywhere from one to ten in length (this is external data I am working with, not data I created)When I concatenate the two fields I need the location value to always be in the same place, so if I have a location called - TEST - I need the end result of my concatenate query to place the location always after the tenth place of the serial number position, like this:55124_____TEST552356____TEST5514235625TEST(Without the underscores)Don't ask me why...it's a long story.

View 2 Replies View Related

Concatenate

Dec 9, 2004

I have a table that I would like to concatenate three name fields:

Last Name, First Name, Middle Name. I inserted a field between each one to create a space when the fields are brought together. The table looks like this:

Last Name, Blank 1, First Name, Blank 2, Middle Name

When these five fields are brought together they can not exceed 25 characters, so the middle name will cut off when the field reaches 25.

Any help will be appreciated.

View 1 Replies View Related

Concatenate Question

Aug 27, 2006

Hoping someone can help me with this:

I have a table with two fields that I am wanting to concatenate. The two fields are: Order and Line#. The line numbers are sequential by tens, like this:
10, 20, 30...etc.

So I have order lines that are from two to four digits. Like this:
20
120
1020

All order numbers are six digits. I want to concatenate the order and line (easy to do) my problem is I want to append zeros in front of any line number less than four digits. For example, using the lines above and an order number of 111111 I want the result of the concatenation to be like this:
1111110020
1111110120
1111111020

Sorry to ask...but I don't know how to do it.

Thanks for looking!

View 3 Replies View Related

I Am Trying To 'concatenate' The Two Id Fields Together

Oct 17, 2006

I have two fields in a table.

client_id and property_id

client_id is an autonumber with a format of 0000000 (meaning the first record is 0000001)

property_id is made up from the first 4 letters of and address line (for example Smith Street would be shown as 'Smit')

I am trying to 'concatenate' the two id fields together, via an expression in a query, to get 'Smit / 0000001' but can only seem to get 'Smit / 1'

How can I solve this ?

View 4 Replies View Related

Concatenate Names

Apr 6, 2007

My database has FirstName and LastName fields.
I would like to initialize a new field called UserID with the first letter of the first name concatenated to the last name. I have found references that point to using Left([FirstName],1)&[LastName] but am unsure if this can be done in the table definition or if it must be done using a query. Either way I could use some advise on initializing this fields since I have 3500 registered users.
Thanks

View 2 Replies View Related

Concatenate And LOOKUP Help…

Aug 24, 2007

Here’s my goal.
1.)I have one column and want to add a 633 in front of if.
a.Expr3: "633 " & [Grp] & ""
b.This only shows 633 and asks for an entry for the GRP? Why? I want the format to be 633 xxx. If I do add, lets say, 123 in the popup, all of the columns are 633 123.
2.)After combining the following, I want to take that number, and look it up in another query. If the number matches a number in the other query, than I want it to enter the number in column 1. If not, I want it write no number. I have gotten this part to work using an IIF function but I just wanted to let you know what I am after.

View 6 Replies View Related

Concatenate Four Fields

Feb 25, 2008

I have this query
SELECT [9A].DO, [9A].WORK, [BATCH] & " " & [SOURCE] & " " & [NO] & " " & [SEQ] AS RECEIPT,
FROM 9A;

It returnes the results like this:
RECEIPT
6/2/2003 P 29 10
1/15/2003 P 54 55
3/3/2003 P 42 7
1/6/2003 P 39 35
12/30/2002 P 23 30

What changes are needed to the query to return it like this:
06022003P0029010
01152003P0054055
03032003P0042007
01062003P0039035
12302002P0023030

In other words
The date must have 8 charactors with no /
Then P with no spaces before or after
The next number must have 4 charactors no spaces
and the last number must have 3 charactors

Thanks

View 1 Replies View Related

Concatenate In Acess

Apr 4, 2006

Hi ...

I have a table called new items which has these fields

Name (Primary)
Serial No
Tag Type
Description
Status


I want the name to be unique and generates automatically and be SerialNo + Tag Type + Description <<<< NAME

I tried a querie which doesnt work
Code:[Description] & ", " & [SerialNo] & " " & [AssetType]

View 1 Replies View Related

Concatenate A Lookup Value?

Jan 2, 2014

I have a table with a bunch of columns (call it Table A), one of those columns being a look-up (foreign key) to another table (call it Table B). I would like to have another column in Table A that is a concatenation of the value in 1 column on Table A with the look-up value from Table B. What is happening though is a concatenation of the value from Table A and the KEY from Table B. I am not aware of a way to get the concatenate to use the lookup value instead of the foreign key.

View 1 Replies View Related

Concatenate Two Fields

Jun 27, 2013

I concatenated two fields in a query for a cbo, one field has cpt# the other descriptions. CPT# can vary with respect to maybe a four digit, five digit, etc. Because of this, when joining these fields, descriptions are not lined up. Is it possible to fix this?

View 8 Replies View Related

Concatenate Detail Value In One Column

Jun 11, 2007

i'm using Master and Detail table. Master table i have TaskId, ResId where ResId is mapped to Detail table which contains resource working on the task. i want to generate a query where for each task i want to display resource id in single column like below.

Task Id Resource Id
1 222,233,244,255

Do i need to use recursive query or any other method to get results like above.

View 1 Replies View Related

Concatenate String And Variable

Apr 3, 2006

Hey all, hope this question isn't too newbiefied :D .

I have a database where I must run 10 tests depending on which product I have selected (from a drop box). Each product requires different tests (of the 10) and I am hiding the tests that I do not need after the product is selected. The way I have it set up right now is I have 10 different If statements...one for each test on the "On Change" event.

I have been trying to reduce this down to one If statement nested inside a while loop, but my visual basic isn't very good. I have named the Test buttons Test3- Test13, and want to increment just the number of the test. However, when I try to plug in my concatenated string, I have problems. My code is as follows:

Dim testcount As Integer
Dim testcheck as Boolean
Dim testnumber as String

testcount = 3

While (testcount < 14)

testnumber = "Test" & testcount
If Me.selectedproduct.Column(testcount) = True
Me.testnumber.Visible = True
Else:
Me.testnumber.visible = False
End If

testcount = testcount + 1
WEnd



Me.testnumber is obviously not an object on the Form...so I guess my real question is, how do I get visual basic to plugin the variable testnumber so that the code reads Me.Test3.Visible.

Any help would be appreciated.

View 2 Replies View Related

Queries :: How To Add More Fields To Concatenate

Mar 5, 2014

I have a table called Export_Car which contains Data such as License Number and Make and Model.I am calling a VBA function (in my query) that I have found online.This works fine and concatanates all the License Numbers for that Dealer.

ConcatRelated("License & Chr(13) & Chr(10)","Export_Car","[Dealer_ID] = """ & [Dealer_ID] & """")

My question is how do I add more fields to concatanate, such as Make and Model.

View 1 Replies View Related

Query To Concatenate Two Strings

Sep 21, 2011

I have written a query to concat two strings,

select concat([first_name] & ', ' & [last_name]) as [Employee Name] from [employee_details]

THe above query is returning the result correctly only if both first_name & last_name fields are not empty. If the fields are empty, it is dispalyingcomma (,).

View 1 Replies View Related

Concatenate Text From Flat TXT Files

Jun 15, 2007

I receive reports formatted as a .txt (flat) file.
Problem: I have to develop a process to manage the .txt files so the data can be separated into its own fields. The layout of the output is as follows:

Date Time User Status Customer Name ID#

06/04/07 15:51 MRF C PTRSNEEO,TBYET L 01234567
Closed By:MRF acvd per xx adv xx of prices on her xxxx XYZASSX
TBLTSXS 75ZZ 90/09ds &5.35 XMEPRAZLE CCC 20XX
90/90ds &2.15 UTZXLPIES EX CCC 100XX 90/09ds &2.15
TYERLXP 0.125XX (TPSDTRM) 90/90ds &2.15 MNTYIMPS
90/90ds &2.15 XYZCNITSASLS TTT 20XX n/s gave # to
call back mrf

1) The layout of the flat .txt file does not allow it to be parsed vertically.
I.e. Vertically: Date and Time overlap the Secondary User information.
The User initials are not aligned. Customer Name is directly over the documentation text and of a different string length.

When I try to "cut" the data by the main sections into columns (Date / Time / User / Status / Customer Name / ID#) to import into Access the text in the documentation fields is "cut" into those sections as well.

I want to be able to reconstruct the text sections that are split apart into a single "cell" that can be exported to Excel or used within Access.

2) Also, some records have 1 line of text, others 2...up to 8. Each individual line of text ends up in its own cell. How can I "code" Access to read to the end of the last line of text (last cell) of the record and then concatenate the text in those cells into one continuous string of text in a single cell?

At the end of each record in the report there is a space separating the records.

I realize this is long and complicated, but am lost and the volume of this type of work is increasing. Requests to IS to change the output of the system reports is low priority so I am stuck. Thank you for any help you may provide.

View 1 Replies View Related

Concatenate Two Columns In Table Design

Apr 25, 2008

I have created a Table Design
Name
Last Name
ID Number
NameID

I import data from CSV xls file which has Columns of Name, Last Name, ID Number.

What I want to achieve is while importing it should Concatenate Name and ID number and store in Name ID.

I have searched it well but havent been able to find solution. Any suggestion how to achieve this.


Thanks
NIRI

View 4 Replies View Related







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