Queries :: Extract Data Between Two Consecutive Comma Set

Jun 16, 2013

102,34112,021502503130010010000,QAR,1,24,1,{NULL:0 },{5:Y},6,14.5,31-MAR-2011

Above data is in one field , i want and expression to extract the data between two consecutive comma set by specifying the comma range.

For example if i specify range 2 to 3 then formula should return "021502503130010010000"

View Replies


ADVERTISEMENT

Queries :: Extract Data From One Field To Another?

Jun 17, 2013

Full Name, Forename, Surname, Salutation. This data has been extracted from another database where the Surname field was not required but it is now. So i need to find a way to pull data from the salutation field into the surname field where salutation has data but surname is null. The next one when surname and salutation are null but full name has data i need to pull that across.

View 11 Replies View Related

Queries :: Extract Data From Query

Sep 15, 2013

I am trying to extract data from a query. Part of code when form loads, my questions is bold:

'query criteria
vOrgCode = Me.tOrgCode
'sql statement
strSQL = "Select tblMembers.tOrgCode, tblMembers.tGender, tblMembers.nMonthlyIncome, "
strSQL = strSQL & "tblMembers.nFarmSize, tblMembers.tPrimeCrop, tblMembers.nNoHills "
strSQL = strSQL & "From tblMembers Where tOrgCode = '" & vOrgCode & "'"

[code]...

i cannot build a simple query and save it as reference since the number of organizations may be 25 at the minimum. this is why i want to build it on the fly, so to speak.

View 3 Replies View Related

Queries :: Extract Day Of Week From A Date To Link To Data

Dec 8, 2014

I want to use the expression Date() in a query to get today's date and then format this to "ddd" to give me the day of the week.

I then want to link this "ddd" to data in my table that contains the three letter days of the week.

How do I make the day become "static" in order to be able to link.

View 6 Replies View Related

Queries :: Extract Data From Memo Field And Put Into New Table

May 13, 2014

Is there a way I can take each entry in a memo field and put it into a text field in a separate table. The database is getting really big and the customer notes field for each record has lots of entries. The memo field looks like this:

8.4.14 Ordered 2 cartons
20.3.14 Ordered 2 cartons
4.3.14 Ordered 2 cartons
18.2.14 ordered 1 carton
30.1.14 ordered 3 cartons SCENTED wipes

[Code]...

I want to take each line and put put the date in a date field and the text in a text field in a separate table linked by CustID. Is there a way to do that?

View 7 Replies View Related

Queries :: Using Query To Extract Data Based On Numbers

Feb 18, 2014

I have a table with a field named BinNo which has a list of items with a bin no in the format 1.234( this number can be any number up to 6000.9999).

Is there a way for me to have a field on a form where I enter a number (i.e 1) and it lists all the items with a 1 before the decimal point but not 10 or an other number with a one in it. If I enter 10 then it will only give me the items with 10 before the decimal point and not 11 etc.

I have a query that pulls all the data into it but I only want the query to show the items relating to the number I enter into the form field.

View 2 Replies View Related

Queries :: Extract And Replace With Additional Data Append Delete Query

Jul 1, 2015

I have a Table1 served by Form1..It is a list of: UnqID, process, quantity, totaltime(in seconds).I want to click on a record to bring up a filtered Form2 with the chosen record on it.What I want to be able to do is to now split the quantity (and the time) and put these new records back into Table1 and delete the original record

EG

ID1,10,write a report,2400

I want to delete this and replace it with two (or three/four etc) replacements, but still adding up to 10 quantity and 2400 seconds so that the new data could be:

ID2,5,write a report,1200
ID3,5,write a report,1200

My initial thoughts are to create a holding table to:Append filtered data on Form2 to a holding Table1hld (i don't know how to do this) delete data in Table1.then enter the new quantities into a holding Table2 (that I will input myself) and then append (through a series of queries back into Table1).The first problem is how to append (and subsequently delete) the filtered record from Form2 to Table1hld.

View 1 Replies View Related

Identify Changes In Data Between Consecutive Rows?

Jul 19, 2015

I have data for multiple account numbers (for work) and dates, and I need to identify when there is a change in account number in order to add a new field with a count - which counts sequentially starting with 1 and then starts over at 1 when the account number changes.

Ex. The red column is what I am trying to create

Account Date_To Counter
12345 06/30/2015 1
12345 05/31/2015 2
12345 04/30/2015 3
19999 06/30/2015 1

View 2 Replies View Related

Queries :: Consecutive Days Worked?

Sep 19, 2013

I have a table of employees, and dates they worked on. These are seasonal employees who want to get in as many days as possible before the season ends, but regulation states they must take a compulsory rest day after x days.So I need to create a query that can return the list of employees, with a count of consecutive workdays up until current date.

If today is 20/09/2013, and Johnny worked on, 19, 18, 17, 15, 14, 13, his count must be 3, because he was absent on 16. Therefore only from 17 through 19 is regarded as consecutive.

If Peter worked 19, 18, 17, 16, 15, 14, 13, his count would be 7, because unlike Johnny, Peter still worked on 16.

View 12 Replies View Related

Run Multiple Append Queries In Consecutive Order?

Jul 16, 2013

I am setting up VBA to run multiple append queries in consecutive order. The append queries are supposed to pull a four digit number off of a form that will allow them to know which data to append. I want the number to be stored as text to correspond with the tables I am working with, but I am having trouble getting the form to work.

Here is how I would like it to work:

I enter my 4 digits in the text box on the form. Say "1305" for May 2013. I want to then run my vba (my queries update using the forms!txtupdatequery!textbox I have put in the criteria of the queries) and all of them run.

I enter my date (as a number but I want it to be text) and the form gives me a #name? error.

View 3 Replies View Related

Queries :: Adding Consecutive Values To Get A Running Total

Oct 23, 2013

I have a quick (hopefully) query about adding up consecutive values to get a running total.

Currently I have the following

ID Value
1 0
2 5
3 2
4 0
5 1
6 30
7 2

etc...

I am looking for a way to get a running total up to the point of a 0 then restarting. e.g.

ID Value Running total
1 0 0
2 5 5
3 2 7
4 0 0
5 1 1
6 30 31
7 2 33

View 12 Replies View Related

Queries :: How To Get Access To Put These Records Together Separated By A Comma

Jul 31, 2014

I have an access table for SampleTests. Each sample may have multiple tests carried out on it. Each test is one record in the access table and a sample may have multiple records therefore depending on how many tests are to be carried out on this sample. I need to create a query that would have sampleID as one of the fields which it gets from the SampleTests table and then I need the second column to have all the tests associated with that sample ID in the format test1,test2, etc. but I cannot see how I can get access to put these records together separated by a comma.

View 5 Replies View Related

Queries :: How To Count Number Of Comma Within The Field

Nov 20, 2014

I have one field containing a couple of 6 digit codes and would like to count the number of codes in the field and write the number to a calculated field. Each code is separated by a comma and a space. How can I count the no of comma within the field?

View 3 Replies View Related

Queries :: How To Sort Mails Separated By A Comma

Feb 11, 2015

I have a field email in the table 2015. I woud create a query that sort my mails separated by a comma. E.G.

123@456.com
456@789.fr
...
Sorted =

123@456.com,456@789.fr, ...

View 2 Replies View Related

Queries :: Syntax Error (comma) In Query Expression

Jul 31, 2013

Access and receive the following message after trying to run a query: Syntax error (comma) in query expression, followed by the formula I wrote on the Query Builder. I use 4 tables to run the query, but only need to trim some stuff from one of them. This table is called BD_lamosa_corregida and have already selected Expression on the Total row in Design View. This is the formula:

parte: Trim(IIf(IIf(IsError(InStr(1,[Parte],"(",1)),"",InStr(1,[Parte],"(",1))="",[Parte],Left([Parte],IIf(IsError(InStr(1,[Parte],"(",1)),"",InStr(1,[Parte],"(",1))-1)))

The formula is trying to trim the left side of an expression (Part description) which may contain a code number in parenthesis or not, it might also have this parenthesis separated by a space or not.

View 1 Replies View Related

Queries :: How To Split Colum Value (with Comma) To Multiple Columns

Mar 8, 2015

how to split this , I am new Access DB, I worked in Sql Server but access new to me

I have the below data

Appid Names
100 John,Bob,Kondya, Lima
200 Shor,James,Kim
300 Cinem

I want to convert to

Appid Names Name1 Name2 Name3 Name4
100 John Bob Kondya Lima NULL
200 Shor James Kim NULL NULL
300 Cinem NULL NULL NULL Null

View 2 Replies View Related

Queries :: IIF Statement - Syntax Error (comma) In Query Expression

Aug 4, 2015

I'm trying to run a very basic iif statement to correct hourly data for sorting. Basically, a trading day runs from 8am - 8am, so I need to adjust the hours to ensure that 1am on the 15th trading day (really the 16th on the calendar), comes after 9am on the 15th trading day (which will actually be the 15th on the calendar).

Here's what I've used. It's driving me bananas, because it keeps telling me that there's a syntax error (comma) in the query expression, but I can't understand why?

Sort2: IIf([DELIVERY_HOUR]<8,[DELIVERY_HOUR]+24,[DELIVERY_HOUR])

View 14 Replies View Related

Queries :: Creating Query From External Comma-delimited List Of Words

Mar 25, 2013

I have a table (let's call it "tableA) with about 7 fields. One of the fields contains information that I need to do a query on so that I may find specific payees, for example:

The field is called "Payee" and in that field for each record, the information could be "At&T", "A T and T" or "Abercrombie & Fi", but there is also other information in that field along with At&T, etc., so the field for a record may look like this:
A T AND T MOBILI A T AND T MOBILI 10 90034 Bill Pay
or
ABERCROMBIE & FI 3042 PP 10 9111 DIRECT

Is there a way to set up another table (let's call it tableB) to have all the Payees names (such as AT&T or whatever) in it and by the push of a button (maybe macro), have a query go out and find all matches from tableB in tablea?

So, basically have the query look in tableA and find all the matches from TableB. Please understand that tableA could have records that contain the same name, but spelled a number of different ways, for example, AT&T or A T and T or ATandT or ATT. Again these names may or may not be embedded in with other information in a field.

Or is there a way that an Access query can look into an external list and find the records, example:

Have a text (file) list with all the names (separated by a comma or space - AT&T, AT & T, Amercrombie and FI, Abercom&Fitch, etc. Now have a query go to that list and find all records that match in my tableA?

View 3 Replies View Related

Extract Data

Dec 6, 2005

Currently I have a remark field and want to just extract the amount. The data input is not in a structured manner therefore I could not use the mid function.

Example :

Remark
CASH PURCHASE $50K.DEBIT 3007484701
SUB $20,000 FIRST STATE DIVIDEND
AMT:$10,900(FS BRIDGE FD)NO DISC

View 3 Replies View Related

Extract Certain Data

Aug 15, 2006

I have a very simple question that I have not find the result or maybe I do not know what to look for!
I have a query containing a field named year and one named sales, what I need is to have a single result of total sales per year. example
year sales
2005 100
2005 100
2006 80
2006 70
2006 60

The result I would like to put then in a form is:
total 2005 200
total 2006 210

All this by simply running a query without indicating any parameters.

Thanks
M

View 6 Replies View Related

Extract Data

Aug 17, 2006

OK, so i have finally got round to re-building my client's database as suggested several times by RV.

I have three main tables that I need to extract data from - tblMembers, tblModules, tblCompleteModules.

Basically its a database containing the training details of Scout Association leaders. Each Leader needs to complete 26 modules over a period of time.

tblCompleteModules contains the data for the modules that have been completed, MemberID, ModuleID Date Completed and CompletedID.

I know how I can extraxt the modules that members have completed, but how can i extract the data for the modules that have not been completed. For example I need to report on the number of people who haven't completed module number 20 for example.

Any ideas?

View 2 Replies View Related

Extract Data From Word Doc

Mar 11, 2008

I have a word doc from which I want to import data in a Database.
The word doc has a table, something like this :

Projectnumber 10700004
LSname LSTK number one
POnumber 1170-LST-04
Contactname Mr. Karel van Straten
Vendorname Mothercompany name S.A.
Manufacturer Operating Company name
Otherdata Others
Mancity 46100 Hamburg
Mancountry Germany
Manorder 31-0111-009
Mancontact Mrs. Angela Duval
Mantel 0049 2323 209 151
Manmail email@testing.de

At this stage I copy the table data and paste it into a memo field in a Dbase Query and try to manipulate the text in that query to get some of the data segregated , i.e Projectnumber : 10700004 , Mancountry : Germany , etc.
However, this doesn’t work as I want.

e.g. I’m trying to get the Manmail text thru this qry :
Manmail: Mid([Memofield],Len([Memofield])-InStr([Memofield]," ")) , but the output is not consistent.

Would there be a better way to get the original ( doc-table) data in the same way in my database.

Note :
I could use an additional step : copy/paste to Excel and then import to Access, but that’s something I would like to avoid.

Any suggestion will be appreciated.

Cheers, Ron

View 4 Replies View Related

Extract Data From One Field And Put In Another

Oct 22, 2005

I am trying to extract data from one field and then put it into another field. I have 2 fields, Code_A and Code_B. I am trying to take the Code * data from Code_A and put it in Code_B. Any help is appreciated.

Code_ACode_B
AlphaCode 3
Code 3
AlphaCode 3
Code 2
DeltaCode 3
Code 3Unknown
CharlieCode 3
Code 3

View 4 Replies View Related

Is It Possible Please To Extract Table Structure And Data?

Mar 25, 2006

Hello,

Is it possible please to extract a tables structure and data into SQL in Access. I know how to do this in phpmyadmin (an internet based DBMS) but not so sure in Access.

What I want to do is to create an identical version of the table in SQL Server, so therefore require the structure and data in SQL format if possible.

Any help is much appreciated, thank you.

View 3 Replies View Related

Extract Data From A Table To A Form

Nov 29, 2006

I have a really simple question :-

I want to write a simple routine to enter a value into a text box, retrieve a record from a table using the value entered as a key (or display a message if it doesn't exist) and then populate a form with the other fields from that record.

So if I entered code 123 it would find the record where code = 123 and display the associated description and price for code 123.

I've created the table and the form but am struggling to do the bit that retrieves the data ! Help!

View 3 Replies View Related

Criteria, Extract Data From Tables

Nov 2, 2004

I have imported several Excel files into Access to create tables in the database.



I teach online and basically I need to know how to extract certain bits of data from each table and put them together.



For example:



Table #1 is my student roster list and contains the fields: Firstname, LastName, SchoolName, and several other fields.



Table #2 is a list of schools throughout the state with fields such as: SchoolName, Registrar, ContactPerson, and so on.



There are several other tables involved but I’m trying to make this question as simple as possible and if I can get this question answered, I think I may be able to figure out the rest.



I would like to print a report out for each individual student that will include the school name from Table #1 and match it with the same school name in Table #2 and then extract the pertinent school information from Table #2 for that school.



I have more than one table with a list of schools. Should I name each field that pertains to the school name with a unique name?



To clarify….



Table#1 can have the same school name listed any number of times because some of the students attend the same school.



Table #2… Each unique school name will be listed only once.





These Excel files come to me regularly as they are updated and I am trying to find an easy way to extract the data that I need.



Can someone please tell me how to write this query?



Thanks so much for your help!

View 5 Replies View Related







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