Queries :: Parsing String With Multiple Delimiters?

Aug 13, 2015

I have a field in our database with five distinct strings, separated by a delimited (a slash or "/").

I've been able to successfully write the formula to parse the first field:

ARL: Left$([pipeline]![Short Description],InStr(1,[pipeline]![Short Description],"/")-1)

The second field:

BRANCHMGR: Mid(Left([pipeline]![Short Description],InStr(InStr(1,[pipeline]![Short Description],"/")+1,[pipeline]![Short Description],"/")-1),InStr(1,[pipeline]![Short Description],"/")+1)

and the last field:

DATE: Mid$([pipeline]![Short Description],InStrRev([pipeline]![Short Description],"/")+1)

how to get the third and fourth strings parsed. I know its going to include some nested InStr or InStrRev commands -- just having trouble figuring out the structure. Could potential need a LEN command as well.

Typical field might look like this:

"Name1/Name2/Description/Update/Date"

View Replies


ADVERTISEMENT

String Parsing.....

Feb 7, 2006

hi, im new to both access and sql and was hoping i could get some help...

i have a string of numbers seperated by commas stored in my database. i need to count how many numbers there are in each string and then display all the results with less than 36 numbers contained.

am i able to do this with an sql statement, or am i likely to need vba??

(example string: 9.89007472991943, 12.3332061767578, 14.4694166183472, 16.287145614624, 17.5347270965576, 17.6327610015869, 16.1364498138428, ...)

thx in advance

View 1 Replies View Related

Parsing The Left And Right Characters Of A String

Aug 19, 2005

I have the following string: NE1220904
I need to remove the left two characters and the right four characters of a string in a query. I have found how to remove one side or the other, but not from both sides. Thanks in advance for the help!

View 6 Replies View Related

Parsing String Into Separate Columns Of A Table

Sep 3, 2007

:confused:

I have a Microsoft Access table with the following columns: A,B,C,D,E,F.
In first row of Column A, I have the following string value: "Al,Peggy,Kelly,Bud,Buck"
What I would like to do is parse this string as such:

Column B:"Al"
Column C:"Peggy"
Column D:"Kelly"
Column E:"Bud"
Column F:"Buck"

Is there a simple VB funtion to accomplish this?

View 1 Replies View Related

Parsing Through A String And Counting Number Of Occurrence

Feb 12, 2013

I have about 150k rows that look like this

SHORT_DESCRIPTION
unable to view
unable to send out some stuff
what is going on

Is it possible for access to query through each field, and tell me the total number of occurence for each word? In this small example, the output would be:

Unable 2
to 2
view 1
send 1
out 1
some 1
stuff 1
what 1
is 1
going 1
on 1

Is this possible?

View 6 Replies View Related

Import Text File / Multiple Lines And Varying Delimiters / Size To One Record

Aug 22, 2012

Using MS 2007, I have a 200 text files exported each day from another application that has two different types of lines (see below). I would like to import each text file in to a database as a single record.

Text file example (text.txt):

R111 WC 8/21/2012 7:00 Doe, John doej 10110110

First Question? Y
Second Question? N
Third Question? Y
...
Seventeenth Question? 10

As you see, I have the first row with multiple fields, but the next rows I have a question and an answer.

I would like to have this data imported as shown in the attachment. Example.zip

Most answers I see are for either multiple lines (same data and sizing). I am not sure how to handle several different lines with that vary in size and delimiters.

View 5 Replies View Related

Parsing Data Into Multiple Fields?

Jul 25, 2013

I have tables that are ODBC linked to a SQL database. The source tables have record date and time stamps written into one field. This means that I can't use the Access date filter functions on these fields. Is there an easy way to parse this field into two fields, one each for the date and time?

View 3 Replies View Related

Modules & VBA :: Parsing Multiple Values From A Textbox

Jun 5, 2014

I have a form in which the user has the privilege to download some data from the table.the user will paste some of the numbers to the textbox from the excel in order to download the specific data.i need to write a query to parse the textbox using the in condition

View 12 Replies View Related

Queries :: Retrieving Multiple Rows And Placing In One String

Jan 31, 2014

I am trying to write a query that selects multiple rows of a table and puts those into a single string with a comma delimiter.

I want it to select all rows after a specific word is found in the row above and then stop selecting when another specific word below the last row is found.

Example below: >>>

The data i am using is very unorganised and has not headers, so I have to try and specific lines in order to allocate them to a specific user.

Sample Data:

IDFullContent
459Authorized Privileges:
460ACNT ALLSPOOL ALTPRI AUDIT BUGCHK BYPASS
461CMEXEC CMKRNL DIAGNOSE DOWNGRADE EXQUOTA GROUP
462GRPNAM GRPPRV IMPERSONATE IMPORT LOG_IO MOUNT
463NETMBX OPER PFNMAP PHY_IO PRMCEB PRMGBL
464PRMMBX PSWAPM READALL SECURITY SETPRV SHARE
465SHMEM SYSGBL SYSLCK SYSNAM SYSPRV TMPMBX
466UPGRADE VOLPRO WORLD
467Default Privileges:

Output Expected:
"
ACNT,ALLSPOOL,ALTPRI,AUDIT,BUGCHK,BYPASS,CMEXEC,CM KRNL,DIAGNOSE,DOWNGRADE,EXQUOTA,GROUP,GRPNAM,GRPPR V,IMPERSONATE,IMPORT,LOG_IO,MOUNT,NETMBX,OPER...etcc "

The delimiter can be anything.

View 1 Replies View Related

Parsing A Record Into Multiple Records By Date Range

Sep 1, 2015

I have a record in a table (Table1) with the following:

Item Start End
A 2012 2030

I have another table (Table2) with the following:

Item Start
A 2018

A 2025

What I would like to do is update/append Table1 so that it looks like the following:

Item Start End
A 2012 2017
A 2018 2024
A 2025 2030

View 4 Replies View Related

Queries :: Parsing Strings Of Text Between XML Tag Identifiers

Oct 12, 2014

I have a Db with a table imported from sql server. One of the fields contains data wrapped between xml tags. The xml tag identifiers when looked at as columns are not consistently the same tag identifiers but effectively I am parsing the string to provide columns of data from between the tag identifiers.

example:

<T6><A29>Compton Group</A29><A31>CO009</A31><A32>CO161/71</A32><A30>Invu Proposal</A30><A28>05 September 2007</A28><A41>Sales</A41></T6>

I am wondering if the method I am using to deconcatenate the string is the bext way. In my query I reference the left tag value .

TagVal1: ParseTagOpenVal([Attributes],3)

And then I parse the result based on the right hand tag value

Val1: ParseTagCloseVal([TagVal1],1)

I have a couple of modules for parsing the string and I am able to deconcatenate using this method but I am wondering if its the only way or the most efficient?

View 1 Replies View Related

How To Handle Delimiters In A Query

Dec 10, 2007

Any suggestions on how to handle delimiters when creating an SQL query string?There's a query form with a number of text boxes. User can enter text in one or more boxes. The VBA code checks the text boxes and generates the query string from what's been entered.eg. strSQLString = "SELECT * FROM [myTable] WHERE [Surname] = ' " & txtSurname & " ' "If the user enters a name such as O'Neil this will result in an invalid SQLString because of mis-matched single quotes."SELECT * FROM [myTable] WHERE [Surname] = ' O ' Neil ' "How can I handle input text which may contain delimiters?

View 3 Replies View Related

How To Import Txt File That Dont Have Delimiters (Seprators) In Access DB

Apr 3, 2008

How to Import Txt file that dont have delimiters (Seprators) in Access DB.:confused:
Actually iget this file from server...and every time i have to do it manaually.
I need to automate this....please help
thanks

View 2 Replies View Related

Multiple INSERT String

Aug 4, 2005

Can anyone help?

Have searched the net with no luck. This is my problem.

I am trying to use a multiple INSERT string to create records in a table, from a VB application and using ADO to do it.

If I send the single INSERT it works fine, but if I try to send more than one in the same string I get a 'MISSING SEMI COLON AT END OF STATEMENT' error.

I have tried putting one at the end of each statement, then just at the end of the INSERT statements string, but still get this error.

Can Access actually handle more than one SQL instruction at a time?

Thanks for any help.

View 3 Replies View Related

Replace Multiple Parts Of A String?

Aug 8, 2007

Hi, can anyone help me do this...


In my products table I have fields such as Bulletpoint1, Bulletpoint2, MainDescription etc.

Each holds part of the product description

In a seperate table I have my description templates with placeholders for the bulletpoints and maindescription. for example....

<ul><li><!-- Bulletpoint1 --></li><li><!-- Bulletpoint2 --><li></ul>



Now, for each record I want to grab the template and replace the placeholders with the real text.

I've got as far as putting this in a query...

Expr1: Replace([DescTemplates]![TemplateData], "<!-- Bulletpoint1 -->", [Products]![Bulletpoint1])

That does the job nicely or the first bulletpoint but where from there? There must be a neater way than having a load of query columns each updating the last. ie.

Expr2: Replace([Expr1], "<--Bulletpoint2 -->", ...
Expr3: Replace([Expr2],...

Or is that the simplest way of doing it?

Cheers!

View 1 Replies View Related

Help W/ Query String- Combine Multiple Fields

Oct 3, 2007

Hey guys-
I have 2 tables- and need to find the record matches between them via their product code. Table 1 has the code as follows (and is considered 'the Master List')-
xxx-xx-xxx Where x is an integer.

Table 2 has split the 3 sections of the code out to 3 individual fields, like this-
Field1 Field2 Field3
xxx xx xxx

I need a query that will combine the 3 fields in table 2 to the same format as Table1 so that I can find the matches between them. I know this is a basic question, but I'm a learning newbie. How would I write that in a query? I don't think I want to write the format to the table- just include it in the query somehow...
Thanks!

View 6 Replies View Related

Reports :: String Together Multiple YES / NO Text Boxes On Report

Sep 1, 2014

I have a Table of Special instructions. Each type of a Yes or No Text Box. There are 13 items in this table along with the ID key.

Each Field has a Special Description. I used the Y/N format for ease of use for user input to simply select the applicable options.

However, I need the text description to display on the printed report, which is not the problem.

So i created a separate text box for each item that simply says; If True, "Description", else blank. And named each one sp1...sp14.

So now, I want to take these text boxes with the proper descriptions and string them together.

My formula is: =Trim([sp1])&" "&([sp2]) etc.

This does produce the proper text results, however, and oddly enough, each item displays on its own line rather than in a string.

I get:
SP1
SP1

Instead of the desired result of SP1 SP2

This seems to simple, and probably has to do with the yes/no format. I've tried with and without (), and using + instead of &, and to troubleshoot, I eliminated the " ". No luck. Everything is coming back as a single column.

View 3 Replies View Related

Forms :: Multiple Checkboxes In A Form To Build A String?

Mar 18, 2015

From a dropdown field in the form it's currently possible to choose a geographical region for which to generate a report. The data populating this dropdown is pulled in from a Value List as follows:

" ";"*";1;2;3;4;5;6;7;8;9;10;11;12;13;EU;WD

I now need the ability to choose various different regions simultaneously which is not possible with the current method. I've looked into a nested continuous form and a multi-select combo box or list box, but none of these are as user friendly as my preferred method.

What I would like is 15 checkboxes plus a 16th to select/unselect all. When any of these checkboxes is checked, I need to create something like a dynamic value string or temporary table to hold the list of chosen regions until the generate button is clicked at which point the data is used to generate the report and cleared. I also need a piece of code to check/uncheck all the boxes.

View 3 Replies View Related

Text String From Form Query - Multiple Choices

Aug 12, 2012

Been a while since I put hands on access. Working with a very simple database.

Working with 1 table, 1 form, 1 query.

Query has several fields. Field of interest contains names of counties.

In query design view I can type, "CountyA" Or "CountyB" or "CountyC" in the criteria and the desired results are returned.

On form I've created a text box and an open report button. The report I'm trying to open uses the query as the data source. I reference the text box on the form as the criteria for the query as follows:

[Forms]![frm_LMIBasicReport]![txtCounties][Forms]![frm_LMIBasicReport]![txtCounties]

If I enter the the name of a single county into the form it executes perfectly. If I try to enter multiple counties it fails. This is true whether I just enter the county names or replicate the exact criteria string I use in the source query. For example

CountyA works and returns desired values for County A
CountyA Or CountyB or CountyC fails. The report opens but no records are returned
"CountyA" Or "CountyB" or "CountyC" = exactly how it is entered in the query if I'm not using the form opens report but no records are returned

How can I pass multiple values from a single text box to the query.

View 1 Replies View Related

Splitting Long String To Multiple Fixed-length Strings?

Sep 16, 2013

I have a table where I want to break longer strings into three-character strings.

So... for example the data item "Forest," I'd like to generate "FOR" "ORE" "RES" "EST" and write all four to another table, allowing for duplication. Alternately, we could make a list and just count the unique 3-character strings. The end goal here is to measure the frequency of 3-character strings across a set of data.

how to do this with an Access query?

View 1 Replies View Related

Modules & VBA :: Join Multiple Values Into String For Summarizing Data On Reports And Exports

Mar 14, 2014

I have to join multiple values into a string for summarizing data on reports and exports. This process in vba is taking up to 10 minutes to process and will get worse as the size of these reports grow.

My method so far is to query the individual items into a recordset, loop through the values, adding them to the string then return the string in the query.

Here is an example:

Public Function SO_Description(intSO As Integer) As String
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQLSelect As String
SO_Description = "Profiles: "
Set db = CurrentDb

[Code] ....

View 1 Replies View Related

Parsing

Nov 18, 2005

Hi

I have text file which contains different types of Record (identified by RecordType).Its a simple FLAT file having specific record structure for each type of record.

My requirement is
1.Parse the .txt file,identify record type
2.Based on corresponding record structure apply validation rules
3.Generate error report where data violates validation rules.

I am new to access . If any of u have sample code on how to parse any file and show error report accordingly, that will help immensely

Thanks

View 1 Replies View Related

Modules & VBA :: Multiple Selection List / Comma Separated String - Run Query And Create Report

Jun 18, 2013

I'm using Access 2007.

So far I have a Multi Select enabled list on which the user selects the serial numbers they want. They then click the "Report" button which will trigger a query based on the selected serial numbers to create a report on those serial numbers.

I have the code for the multi-select list working already. It creates a string of comma separated values that are the serial numbers which are selected in the list. Somehow I need to pass this string to my query so it can use it as a filter.

Here is some of my code:

Code:
Option Compare Database
Option Explicit
Private Sub Form_Current()
Dim oItem As Variant
Dim bFound As Boolean

[Code] ....

Here's my current query in SQL:

Then finally how to I get the query to execute and create a report based on all of this?

View 11 Replies View Related

Parsing Names??

Apr 11, 2006

I am trying to do the following
If any one of you have experienced Abacus ticketing system, each reservation is comprised of a group of names as follows

1.1 Gul/Mohammad Atif Mr 2.1 Gul/Mohammad Adil Mr
3.1 Bond/James Mr

I have to copy the above data from the abacus tcketing system into a text box.
My question is how can i devide the above three names into three seperate text boxes.

View 4 Replies View Related

Website Parsing

Mar 25, 2008

I need some assistance parsing some information from a web address. Here is an example of what the web address is.-http://www.websitename.com/ct20/pages2/client_bcphone_service_order.aspx?client_id=160399 4&contract_document_id=924182&cipid=206123444-What I am trying to do is get the client ID and the contract id. The client id being 1603994 and the contract id being 924182. Any ideas would be appreciated.Gregg

View 5 Replies View Related

Parsing Name Fields

Mar 1, 2006

I am using the following statement in an update query (which by the way I found in this forum) to pull out the first name from the FirstName field. The field could have a first name or a first name and a middle initial. If the field has a first name and niddle intital: John P then I get John. If the field only has a first name, I get #Error in the update field. I have thousands of records to move to a new Oracle table which has a first name field and a middle intial field.

FNAME: IIf([FirstName] Is Null," ",Left([FirstName],InStr(1,[FirstName]," ")-1))

Any help would be greatly appreciated.

Thank You:confused:

View 4 Replies View Related







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