Split Query Results

Feb 7, 2007

I have a query and the results i want to split them into a new table. lets say the query has 8 fields.

A B C D E F G H

i want to append these in a table like this

1st row of the table = A B C D
2nd row of the table = E F G H

and it has to go trhouh the whole query for all the rows to do the same thing.

Thank you in advance.

View Replies


ADVERTISEMENT

Query Results Minus Query Results = New Query?

Apr 1, 2008

I used to queries ,1 to get items that are taken ( its all about sign in sign out for equipment) and other query is list of all items.
How can i make 3rd query which will give me all but taken items from query1?
(of course items from query 1 are in query2)
thx in advance

View 7 Replies View Related

Help With A Split Query

Dec 19, 2007

Hi All,

Hope you can help, it’s been a while since I have used Access, and I am using 2007.

I am trying to split out Postcodes to remove the last 2 characters, i.e.

LE12 6YU becomes LE12 6 (NewPostCode)
LE5 8YU becomes LE5 8

I set up my query in data set view and then I switch over to SQL view, this is what I have

================================================== ===
SELECT Sample.Postcode, split([Postcode], RIGHT(postcode, 2))(0) AS NewPostCode
FROM Sample;
================================================== ====
When doing this query I get an error saying invalid syntax and it reads the (0) as (0. Or something

Much appreciated,

View 2 Replies View Related

Modules & VBA :: How To Use Split Function Query

Feb 18, 2014

I have a query

Code:
SELECT tblZlecenia.ID_Zlecenia, tblZlecenia.TerminOdbioru, tblOffset.ID_RodzajZlecenia, tblZlecenia.NazwaZlecenia, tblZlecenia.Id_K, tblZlecenia.Id_Rodzaj_Pracy
FROM tblZlecenia LEFT JOIN tblOffset ON tblZlecenia.ID_Zlecenia = tblOffset.ID_Zlecenia
where

In where I would like to put code like this:

Code:
Split(tblOffset.DziedziczonePo, ";")(1) & ";" & Split(tblOffset.DziedziczonePo, ";"(2) & ";" = "tak;tak"

Is it possible to create such a query?

View 1 Replies View Related

Split A Query Into Two Text Files?

Jan 24, 2014

I have a very large query that I need to export to text. I'm hitting the 4GB limit, so I'd like to "split" the query and create two text files instead.

What's the most efficient way to do this? Also, are there any export file formats that can handle more data? (i.e. is there a format that could fit this massive query into a single file?)

View 10 Replies View Related

Invalid Bracketing In Query In Split Database

Mar 13, 2008

I have a time reporting database called Productivity. I also have a split version with ProductivityFE containing the forms, queries, and reports and ProductivityTables containing the data. All three are on my PC. Each month I update Productivity with new records and run a report or two to check things out. Then from ProductivityTables I import the data tables. If there are any updates to the forms, queries, and reports these are imported into ProductivityFE. I again test a couple of reports before finally placing both FE and Tables on a server. The managers then place a copy of FE (from the server) onto their desktop and run reports from there. So far so good until this month when I created a new query for a new report. It runs fine in Productivity, but in the split database (on my PC) I get the error 'Invalid Bracketing of name [tblCostcenters.ProdCenter]'.

Below is the SQl from the query. Of note here is a time record contains both a home costcenter and a worked costcenter for the employee. I have two instances of tblCostcenters in order to reference the field ProdCenter for both the home and worked costcenters. The code fails at the first IIF statement on [tblCostcenters.ProdCenter]. Based on other posts on this sight I tried replacing these brackets with [tblCostcenters].[ProdCenter] and [tblCostcenters_1].[ProdCenter] and it seemed to be working until the last bracketing was changed, after which I was faced with the parameter query dialog box looking for a value for tblCostcenters.ProdCenter.

So I'm stumped. Why would the query work in a single database but not in a split database?


SELECT tbleTimeData.HCCtr, tblCostcenters.Title AS HTitle, tblCostcenters.ProdCenter AS HProdCenter, tbleTimeData.WCCtr, tblCostcenters_1.Title AS WTitle, IIf([WCCtr]="","Other Affiliates",IIf([tblCostcenters.ProdCenter]<>[tblCostcenters_1.ProdCenter],"Outside Product Center",IIf(IsNull([tblCostcenters_1.ProdCenter]),"Outside Product Center","Within Product Center"))) AS WProdCenter, Sum(tbleTimeData.Hours) AS SumOfHours
FROM (tbleTimeData LEFT JOIN tblCostcenters ON tbleTimeData.HCCtr = tblCostcenters.Costcenter) LEFT JOIN tblCostcenters AS tblCostcenters_1 ON tbleTimeData.WCCtr = tblCostcenters_1.Costcenter
WHERE (((tbleTimeData.FY)=[Forms]![frmMainMenu]![cboFY]) AND ((tbleTimeData.FP) Between IIf(IsNull([Forms]![frmMainMenu]![cboFPFrom]),[Forms]![frmMainMenu]![cboFPTo],[Forms]![frmMainMenu]![cboFPFrom]) And IIf(IsNull([Forms]![frmMainMenu]![cboFPTo]),[Forms]![frmMainMenu]![cboFPFrom],[Forms]![frmMainMenu]![cboFPTo])))
GROUP BY tbleTimeData.HCCtr, tblCostcenters.Title, tblCostcenters.ProdCenter, tbleTimeData.WCCtr, tblCostcenters_1.Title, IIf([WCCtr]="","Other Affiliates",IIf([tblCostcenters.ProdCenter]<>[tblCostcenters_1.ProdCenter],"Outside Product Center",IIf(IsNull([tblCostcenters_1.ProdCenter]),"Outside Product Center","Within Product Center")))
HAVING (((tbleTimeData.HCCtr) Between IIf(IsNull([Forms]![frmMainMenu]![cboCCtrFrom]),[Forms]![frmMainMenu]![cboCCtrTo],[Forms]![frmMainMenu]![cboCCtrFrom]) And IIf(IsNull([Forms]![frmMainMenu]![cboCCtrTo]),[Forms]![frmMainMenu]![cboCCtrFrom],[Forms]![frmMainMenu]![cboCCtrTo])) AND ((tbleTimeData.WCCtr)<>[HCCtr]));

Thanks!
John

View 2 Replies View Related

Queries :: Split Memo Field In A Query

Feb 26, 2015

I have a table that contains a memo that is delimited by line breaks. For each of these breaks i need a new record in the query results that i can then use in a Labelling application.

My current query looks something like:

ID | Product | Pack Size
1 | item a | 1x1000,1x1050
2 | item b | 1x1000,20x25
3 | item a | 1x1000

(Where the , is a new line)

Whereas my ideal output is:

ID | Product | PackSize
1 | Item a | 1x1000
1 | Item a | 1x1050
2 | Item b | 1x1000
2 | Item b | 20x25
etc.

I think im supposed to use the Split() Function though i dont have a clue wherw to start.

View 11 Replies View Related

Queries :: Split Date Values In Query

Jun 1, 2013

I have a manufacturer that has sent me payments from 8/2/2012 to 05/20/2013 but there was a wide gap where we did not do business from the end of 2012 to April 2013.

How can split the date ranges up in the query so when I create my report, I can get two ranges for the same manufacture.

For example one list of payments from <#12/31/20112# and the other from >#4/1/2013#

View 5 Replies View Related

Split Database Make-Table Query Problem

Mar 30, 2007

Hi All,

I've developed a database that was working fine until I split it to use in a network enviroment. The problem is a make-table query that now make it's table in the front end instead of the back-end. I need to run a make-table query because the query uses a custom function which then causes errors when the query is accessed by a web form that I use.

The only way I thought of getting round it was to create a permanent table in the back-end which is cleared every time and an append query used to populate it.

Anybody any other ideas?

Cheers

View 3 Replies View Related

Select Record In Split Form Query Result

Mar 25, 2008

I have searched and search and I can't find the answer to this question when I thought it would be simple. Hopefully you can put me out of my misery!

I have a access 2007 split form with a series of search boxes and a query result window. Enter info into one or more of the search boxes, click search and you get the matching results in the query window below. That works fine but I want to work with the results of the query, how can I do this?

I was looking for the user to be able to select a record and then click a command button to open that record in a form. Or in another instance select a record in the result window, have the current from close and have the primary key passed to a another form which I use to open the split form.

I just can't see how to do it but I expect there are several ways. Happy to use VBA but my experience is with Excel VBA so I'm still getting used to the objects.

Thanks in advance!

View 4 Replies View Related

General :: Lookup List In Table From Query In Split Database

Sep 14, 2012

i have developed an application in access 2010 . and split into front and back end . now i want to add more tables in back end and i need to define lookup list in table definition from the query presently in front end . when i get into lookup list and query builder doesnt show front end content ... how to solve this problem ?

View 2 Replies View Related

How To Split Up One Column With Multiple Rows Related To One Person Into A Query

Jul 1, 2013

I have an Access Database and I want to split up one column into multiple columns. The one column has multiple rows that relate to one person, so for instance I have the following:I am taking information from both tables and I want to create a query but I need to separate out the mother, father, and guardian with the names attached

So from the Child table :

Joe Smith Address Phone

The query that I created is from two tables, the child table and the family table: ( I used the dashes just for it to be easier to read)

------Child Table/PrimaryKey --------Family Table---------------------

First Name--- Last Name--- First Name--- Last Name--- Relationship
Joe ----------------Smith ----------Jane --------Doe-------------Mother
Joe ----------------Smith ----------John---------Smith---------- Father

So in this scenario I need to get the name of the second parent in another column....meaning have all the parents appear on the same line for this child, and each child there after..

So I need it to look like this:

------Child Table/PrimaryKey --------Family Table---------------------

First Name------ Last Name------ First Name------ Last Name------ Relationship------ 2First Name------2Last Name------2Relationship
Joe----------------Smith------------ Jane-------------- Doe------------- Mother-----------John---------------- Smith------------ Father

View 1 Replies View Related

Tables :: Split Database - Table Field To Lookup Values From A Query?

Jul 6, 2015

I have a split database and need a field (Combo type) in the table to lookup values from a query in the front end. How do I do this as it doesn't see the querys because the front and back end are split?

View 3 Replies View Related

Queries :: Join Results Of Unmatched Query With Matched Query To Include Null

Mar 24, 2013

I am trying to do the good 'ol sales report (query) to include customers with no sales.

I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)

If I run a query to show customers (in the customer table) with account numbers, that works

An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).

How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?

I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?

View 3 Replies View Related

Queries :: Update A Query Based On Results From Another Query Using Count Function

Apr 2, 2013

I run a physical therapy office and patients come in for treatment either 3, 4 or 5 times per week. My database is used to track these frequencies (among other things).

I have 3 queries which count how many patients come in 5, 4 and 3 times/week.

In my main table I have fields called "how many 5's", "how many 4's" and "how many 3's".

I have tried to design an update query which will update those fileds in my main table to reflect the counts in the 3 queries mentioned above.

(I'm not using SQL view, I'm using the query design view)

In the "update to:" row, I use the Build function and locate the count I'm looking for.

Problem: when I run the query I get the error: Operation must use an updateable query.

View 3 Replies View Related

Self Generating Query String Based On Query Results?

Jan 3, 2008

Here's my problem. I need to generate a report that says how much of each individual product was produced and as well as the total produced for a specified category in a time period. Something like the following:

05 Catagory A: 02 Product AA, 01 Product AB, 02 Product AC
10 Category B: 07 Product BA, 03 Product BB
04 Category C: 01 Product CA, 01 Product CB, 01 Product CC, 01 Product CD

etc...

I currently have a query that queries a database and pulls out all products that were produced in a specified period and the categories they belong to and dump them into a local access table. Now what I need to do is search through the query results and count up how many of each product were produced (02 AA, 01 AB, etc...) and the totals for each category. The number of categories is pretty limited (6), but there are hundreds of product codes, so I need a way to do this without having to type in each induvidual product code as the requirement by which the query searches. Also, the product codes that get returned are different every day.

I was thinking something along the lines of take the product code of the first row and check for any others in the results that match and write that into another table. Then move onto row 2 and use its product code as a search parameter and search through the query results for any matches. Then continue that until the end of the query results. Can I do that? Is there a better way to achieve what I need?

View 7 Replies View Related

Return Weekend Results On Monday, Yesterday's Results Otherwise

Nov 14, 2007

I am trying to filter a form to show the entire weekend's activity on Monday but only yesterday's activity Tuesday through Friday. Using this code I can return Friday's results on Monday and yesterday's for the rest. How do I get the range Friday to Sunday?

IIf(DatePart("w",Now())=2,Date()-3,Date()-1)

Using >Date()-3 doesn't work.

Thanks

Bruce

View 5 Replies View Related

Query Results In Form, But What If Query Is Null?

Aug 30, 2005

I have a query that displays results in a form, but if the query is null, I want to display a different form, or just an error message that says something like "your query returned no results" (right now it will display the form with no fields)

I am a beginning Access/VBA user and have searched and browsed the forum for combinations of null/query/form, but haven't found what I need. Can anyone point me in the right direction?

Thanks for any help.

View 5 Replies View Related

Query Results

Nov 30, 2005

I am wanting my query results to appear in my main form so that i can edit them, rather than a table the query is just a look up of my form that stores about 500 records and stores all the same fields

any help would be appreciated

thanks

View 1 Replies View Related

One Query W/many Different Results

May 21, 2007

Is there a way to write one query that will work for different criteria and is run by different buttons to produce bar graphs or a basic report depending on the button the user clicks??

View 5 Replies View Related

Query Results?

Jul 22, 2007

Hi all :o

I am working on a query but can manage to get it to do what I want.
I have a main table with a job_ID and a faults table which documents faults that occur related to that Job_ID the tables are related with a one to many relationship. I want the query to bring up all the jobs even those with no faults, at present it is only bring up those jobs that have faults, how do I include details of all the jobs and if there are no faults then that field is left blank, probably very simple to do but after working on this db for hours my brain is no longer functioning!! :eek:

Thanks

Jackie

View 2 Replies View Related

Help With Query Results

Jan 4, 2008

Hello all,

I have a table called tblODF and within that table, I have these fields:
- ODFNumber
- ODFScanDate
- Status (Combo box: Pending, Complete, Licensing)
- LastFollowup

In my query, I have the same fields, except I added a calculated field.
I added DayCount to

Codecalculate:(Date()-[ODFScanDate]

This should calculate the number we've had the ODF.

What I want to happen is, let's say the status is Maturity, I want the DayCount to say 0. If it's pending, I want it to calculate the actual days.

Is this possible?

Thanks

View 5 Replies View Related

Query Results

Nov 19, 2007

I've just started using Access 2007, but I've been an Access 2003 user for some years and have a couple of databases, both of which I've now brought over to 2007.

Something I've noticed and is probably very simple. In 2007, after I entered information in a table via one of my forms, I queried on that information but it wasn't included in the results. But everything else - from 2003 - was. I then went thru each field in the underlying table to "match" fields there were filled in for a 2003 record and now the new entry does appear in the query results.

This hadn't happened before in 2003 - it didn't matter if all or even particular fields were filled in. But now it needs for at least some particular fields to be filled in. Don't know if it's something different in 2007, or probably coincidental. I haven't changed anything in the table, query or entry form.

It's not a crisis (now that I see my results), but I'm wondering what is going on - now, that apparently wasn't occurring before?

Thanks!

View 1 Replies View Related

Email To Query Results

Dec 6, 2005

I hope I can explain this clearly. I'd be really grateful if anyone could help.

I need to set up some sort of contacts database at work.

I need (I think, after having a little think about it) one table, filled with people, (their names, contact details ect) and basically various queries to pull up people in certain groups. Say for instance, people who attend meeting a, b, c, (in a simplised, condensed version of the truth)

I did think about doing this with various tables actually. A contacts table, a meetings table, blah blah, but anyway. (Any advice on this incidentally would be great).

My main problem though. We often have to email all the people who attend say meeting a. We have contacts on our email systems, but they're different from person to person, and as the company is updating email systems, we can't even send contacts lists to everyone, as they're not compatible.

What I'd love is to be able to call up a list of people attending meeting a from my database and email each of those people (their contact details would include email address of course)

Does that make sense?

Is there any way of doing this?

I'd be really happy if anyone knew...

View 9 Replies View Related

Get Results From Query Into Table

Aug 30, 2005

This is a rael daft question, but how do I get the results of a query into a table?

View 5 Replies View Related

Query Results In ComboBox

Jun 6, 2005

:( I have such problem : my query works right, but in ComboBox I got results with wrong sort.
Query results is:
Street 8
Street 8a
Street 10
Street 10/12

But in ComboBox data views such:
Street 10/12
Street 10
Street 8a
Street 8

Please help me!

View 2 Replies View Related







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