Take Left Of Another Column..

Mar 25, 2008

Not sure if this is possible? I have a column called Issues and another column I want to call ShortIssues and I basically want ShortIssues to be Left(Issues,50) so that its just 50 characters long of column Issues.

any ideas.

Thanks,

View Replies


ADVERTISEMENT

Multiple Left Joins From Same Column

Sep 8, 2011

I have a table (Table A) that includes every number that's been dialed in our call center. I have another table (Table B) that has account numbers and three different phone fields for each account.

What I initially tried was to left join the Dialed Number column from Table A to all three phone number columns in Table B. This produces no results. If I only join Dialed Number to Phone Number 1 (for example), I get results, however, if the agent dialed one of the other two numbers, it's not going to show up.

View 1 Replies View Related

Forms :: List Boxes - Single Column Versus Multi Column

Apr 3, 2013

How do I select the first column of a multi-column list box (called "List1") for a query.

A single column list box works fine.

Code:

SELECT Tble_Employee.Emp_No, [forms]![attendee_form]![list1] AS SelectedCourse
FROM Tble_Employee;

View 6 Replies View Related

Queries :: Run A Simple Update Query To Copy Data From One Column To Another Column

Sep 24, 2013

I am trying to run a simple update query to copy data from one column (Addrl1)to another column (Working_Addrl1) within the same file and I can't for the life of me figure it out. Then I need to repeat for addrl2 and addrl3 to working_addrl2 and working_addrl3.

View 7 Replies View Related

Populating A Column In A Table Based On Values In An Existing Column

Mar 5, 2007

Hi all,

In the organisation that I work for employees get paid every 2 weeks on a Saturday. So for this financial year the pay period end dates have been 08/07/2006, 22/07/2006, 05/08/2006 etc


I have a column in an Access table listing various dates. I want the next column to be
populated with the next pay period end date after that date.

So if DATE is 05/07/2006 I want PAY PERIOD END to be 08/07/2006
and if DATE is 09/07/2006 I want PAY PERIOD END to be 22/07/2006 etc

How do I do this?

Kind Regards,

Matthew

View 1 Replies View Related

Queries :: Change In Column Based On Base Query Column

Mar 24, 2014

I have created a cross tab to extract pipeline and sales for Q1 2014, Q2 2014, Q3 2014 & Q4 2014... the user can select the quater from a multivalued text box...

Now for the final output, have created another query which pull the above four quarter in each column from the cross tab...now the problem arises when i change the quarter to Q2 2014, Q3 2014, Q4 2014 & Q1 2014..it gives an error "Microsoft office Access database does not recognizes "Query name" as a valid field name or expression".

The error is because the second layer of query does not identifies Q1 2014.

How do i make access change the column automatically when the Q1 changes to Q2...

View 1 Replies View Related

Modules & VBA :: Input String In Column Based On Data In Another Column?

Nov 30, 2014

I need to input a string into a column named "EventType". The code should first check if the column "Agent Name" contains any strings. If there is none, it will input "IBM Director" into the EventType column.

Once it has looped through the agent names, the code will then loop through the Details column and input into EventTypes based on what is displayed within the string.

These are the codes that I am using to achieve this, however nothing is being input into the EventType column.

Code:
Private Sub Command11_Click()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("Final")

[Code] ....

I think the problem lies with the code that checks the agent name. When I removed it, it managed to populate the EventType column based on the details. But I still need to find out how to check the agent name too.

View 4 Replies View Related

Queries :: Find Unmatched Contents From The Column By Matching With Another Column?

Nov 16, 2013

i have a columns as 1. contactname, 2. firstname 3. lastname 4. email and in this columns some emails are not matching with the contactname or some time firstname or some time lastname so i need the to find out the un matched contacts from the database.

View 1 Replies View Related

Referencing Dropdown Column Diffferent To Boun Column

Dec 14, 2006

hi,

im wanting to reference a value of a dropdown which is already serving a function - the dopdown already has it's bound set to 3 but i want this new function to refercne the second column-

im tyring:

"Tutor = '" & Me.ComboStaff.Value(2) & "'"

which isn't working- how do i reference the second column of a dropdown if its bound to its third?

cheers

dubs

View 2 Replies View Related

Moving And SORTING Multiple Column Data Into One Column

Feb 25, 2008

Hi. I have a question I'm hoping someone can help me with. I would like to take data from multiple columns and put the data into one column. Additionally, I do not want to exclude any data (union all) and I would like to group the resulting union by another field. For example:

Original data layout:

Column Headings: Sample Event, Depth 1, Depth 2, Depth 3,
1st Row Data: 1, 6, 9, 12, 9
2nd Row Data: 2, 7, 9, 8, 3

Desired data layout:

Column Headings: Sample Event, Depths
1, 6
1, 9
1,12
1, 9
2, 7
2, 9
2, 8
2, 3

So far I'm using the following SQL. What do I need to add or change to get my desired result of grouping the unioned depths by the 'sample event' field?

I appreciate any help anyone may have to offer. Thank you.

SELECT Depth1 AS Depths
FROM Depth_Velocity_Substrate_Correct
Union all
SELECT Depth2
FROM Depth_Velocity_Substrate_Correct
Union all
SELECT Depth3
FROM Depth_Velocity_Substrate_Correct
Union all
SELECT Depth4
FROM Depth_Velocity_Substrate_Correct
Union all
SELECT Depth5
FROM Depth_Velocity_Substrate_Correct

View 5 Replies View Related

Modules & VBA :: Convert Number Column Into String Column

Feb 28, 2014

I want to convert a number column into a text column.

Number Column is called Customer.

Below I can't match to the other table containing the text column Customer No.

How can I convert columns in vba?

Code:
strSQL = "SELECT CALCULATED_Forecast_TNS.*, USEFUL.TRP_in_EUR " & _
" FROM USEFUL INNER JOIN CALCULATED_Forecast_TNS ON (CALCULATED_Forecast_TNS.[Reference No] = USEFUL.[Reference No]) AND (USEFUL.[Customer] = CALCULATED_Forecast_TNS.[Customer NO])"

Set qdf = CurrentDb.CreateQueryDef("REPLACABLES", strSQL)

DoCmd.RunSQL "UPDATE REPLACABLES SET CALCULATED_Forecast_TNS.TRP_in_EUR = USEFUL.TRP_in_EUR"

View 1 Replies View Related

Queries :: Add A Column In A Query That Will Give Y Or No To Previous Column

May 21, 2015

I am looking to add a column in a query that will give a Y or No to previous column data if it contains TEXT or NUMBER (It could read "TEXT" or "NUMBER" or even Y for text or N for number).

View 3 Replies View Related

Queries :: How To Distribute Different Values Of One Column In New Column Fields

Jan 30, 2014

In my table for duplicate "line no" I have different "contractor" like below.

LINE NO CONTRACTOR

L-0001 C-1000
L-0001 C-2000
L-0003 C-6000
L-0003 C-8000
L-0003 C-9000
L-0004 C-5000

Now I would like to make a query for transposing values like below:

LINE NO CONTRACTOR1 CONTRACTOR2 CONTRACTOR3

L-0001 C-1000 C-2000
L-0003 C-6000 C-8000 C-9000
L-0004 C-5000

how I have to make this query?

View 1 Replies View Related

Counting Distinct Values Of A Column Group By Another Column

Dec 4, 2011

I have this table ("people") and an example of possible rows:

id(key) COL 1 COL2 department country name
1 xx yy KPP USA John
2 zz kk KPP USA John
3 ss ff TLL USA John
4 ww qq PPO Italy Marco
5 jj uu PPO Italy Marco

I have to count the number of distinct DEPARTMENT for each NAME; so, for John should be 2 (KPP and TLL) and for Marco 1 (PPO).

I have tryed in this way:

SELECT
COUNT(DISTINCT department) AS NumberOfDifferentDepartments
FROM people
GROUP BY name;

But Access says me there is a syntax error.

I'm working with MS Access 2002.

View 2 Replies View Related

How To Highlight One Column And Change All Data Inside Of That Column To Same

Aug 18, 2011

I have a Access 2003 file and I want to filter anywhere where there last name is "expired" and change the column first name to say "no". How do I do that?

View 1 Replies View Related

Using Left Function

Jul 20, 2005

I have a column in access containing codes in format K2316 and wish to remove Prefix (K) from this code.

How can i do this as a calculated field?

thanks

View 14 Replies View Related

Right Or Left In Query?

Jun 15, 2005

hey,

Is it posible to somehow intigrate this code or some other code that would do the same in to query?

code:
str1 = Right(Me.Text1, InStr(Me.Text1, "Ex") + 2)

I have a table1 with filed "EXZ" and that field contain some data like "7.5/400/Eex de IICT4" now i would like to run an update query on that table and update field "EXZ" from "7.5/400/Ex de IICT4" to "Eex de IICT4". The last part of the data is not allways the same but it does allways start with "Ex"! So is that even posible to do with query or do i have tu use a macro or what?

THX

View 3 Replies View Related

Left Join

Nov 21, 2005

Hi
I am trying to use left join on the following tables.
Employees
----------
EMPLOYEE_ID
FIRST_NAME
LAST_NAME

and

Weekly_Timesheets
-------------------
EMPLOYEE_ID
WEEK_NO
YEAR_NO
TOTAL_HOURS_WORKED

All I want is to pull all the employees with their corresponding total worked hours. There are cases when some employees forget to fill their time sheets in a week and might not have entries in weekly_timesheets table. Since I want all the employees irrespective of whether they have a record in weekly_timesheets or not I am using left join.

The left join I am using is as follows:

SELECT EMPLOYEES.EMPLOYEE_ID,
WEEKLY_TIMESHEETS.TOTAL_HOURS_WORKED
FROM EMPLOYEES
LEFT JOIN WEEKLY_TIMESHEETS
ON WEEKLY_TIMESHEETS.EMPLOYEE_ID = EMPLOYEES.EMPLOYEE_ID
AND WEEKLY_TIMESHEETS.WEEK_NO = 46;


The moment I am trying to execute this statement Access is crashing. I couldn't figure out what am I doing wrong.

Kind Regards
Bhanu

View 6 Replies View Related

Left$ Query

Dec 8, 2005

Left$([Entry timestamp],14)

I want to execute the above sql query but the result is not what i'm expecting.
the field entry that i wan to extract the leftmost 14 characters is
2.005113E+19
instead of just having plain numbers like 2005113009010532000000.....

I think it's becoz of the format that's why Left function is not working as expected. Can somebody help me out regarding this? Thanks very much

Regards
Dominic

View 8 Replies View Related

Left Function

May 17, 2006

Hello,

I have used the left function to provide me with the left x characters of a field, which works fine.

Description: Left([c$products],[diff])

However, I want to query this field to only give me certain descrpitions, but it will not work.
Can anyone let me know if this is possible, or if I'm totally out of luck,

Thanks,

J.

View 4 Replies View Related

Left Join?

Jun 22, 2006

Hi Guys

I'm kind of a newbie to Access but am learning :D
I've found myself stuck with a join statement

I have 2 tables: tblFleet & tblService

I need to find the most recent service date from tblService for each entry under tblFleet....

This is my code thus far, but it shows all the records for both tables where the fleet_Num field is equal....

SELECT tblFleet.Fleet_Num, tblFleet.In_Yard, tblService.SrvDate
FROM tblFleet LEFT JOIN tblService ON tblFleet.Fleet_Num = tblService.Fleet_Num
ORDER BY tblService.SrvDate DESC;

View 2 Replies View Related

Left Join

May 8, 2007

Simple exlusion query:

SELECT tblEmployees.EmployeeID, tblEmployees.LicenceNo, tblTimeSheet.ShiftDate, tblEmployees.FirstName, tblEmployees.LastName
FROM tblEmployees LEFT JOIN tblTimeSheet ON tblEmployees.EmployeeID = tblTimeSheet.EmployeeID
WHERE (((tblTimeSheet.EmployeeID) Is Null));

errrr nope it doesnt work.. and that is direct from the wizard...

I have a work around but it is inelegant not to mention not workable..

what i need to do is filter on a shift date as i need to see what employees are not rostered on particular dates..

what i have had to do is make a query selecting base data from timesheet and filter the date at that point... make another query to do the left join.. again not elegant... to make a report i would somehow have to programmatically adjust the filter on the date.. too hard basket and will be too slow when i have a copious amount of data in 12 months... anyone know what the hell is wrong?

View 5 Replies View Related

Need Some Help With A Left Function

Sep 13, 2007

I have an imported table with zipcodes, some are 5 digit some are 9. When i go to build my query i dont get an accurate number, i tried a left function to get the 1st 5 digits but keep getting a invalid syntax. I am in the query builder. anyone help me with syntax, heres what i currently have

Mail Zipcode «Expr» Left («stringexpr», «n»)

View 3 Replies View Related

Left Join

Nov 14, 2007

Hello

I have a loan db that I want to write a query to reflect all active loans with or without a current month's payments. In other words, I want it to select all active loans even if there was no activety during the month. I have 1 query that pulls out all active loans; qryActiveLoans. I then create a left join (2) with that query Grouping on the Loan# and summing the Principal and Interest fields where the payment Date is between #10/01/07# and #10/31/07#. I need to group on loan the number because some loans have more than one transaction in the month.

The problem is that the query does not select the loans that didn't have any payments during the month. I thought that a left join (2) will pull out ALL the records from the qryActiveLoans query. I've tried adding the word ALL after the SELECT statement but that does not work. I've also tried various forms of nz without success. This is probably a common problem but I could not find it in my searches of past postings.

Any help would be appreciated.

View 4 Replies View Related

Almost There, One Form Left!

Sep 10, 2005

I've created a db for my mortage company and I have everything complete except returning customers. I want the customers to have the same customerID but different TransacionID. Sounds simple to me but im having problems. It could be a table issue but im hoping its just a form thing.

I have tables: Customers-CustomerID(autonumber),CustFirstName,CustLastName, PhoneNumber,EmailAddress,OriginatorID.

Then I have Table: Detail- CustomerId(lookup from customer table),TransactionId(autonumber),SSN,Address,City, State,Zip,Spoucename,CreditScore,

Then I have Table: Loan- TransactionId(lookup from Detail),LoanType,LoanAmount,StartDate,EndDate, LoanLender


I have a form for new customers which is the customer table. Then once the customer has his credit checked we enter the customer details with a form. Then when they want to move forword with a loan there is a form that pulls the TransactionID from the Detail Table.

I cant figure a way to make a form that will create a new transactionID associated to the custs CustomerID without overwritting the older record.

What do I need to do?

Thanks for any help.

Scott

View 1 Replies View Related

Left Pad With A Zero Digit

Oct 6, 2004

Hi, when I type 0600 in a text box, it dispays it as 600. How do I make it so it displays the number that I actually type in, with a zero as the first digit?
Please help. Thank you.

View 6 Replies View Related







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