Compare (2) fields in (1) table

Grettings,
   I am working on a database analysis and need some assistance on building 
a specific query.

  I have an input table that was formed at a previous query that is composed 
of a few 100 records. In one column field I have "Meter_Number_1" and in the 
same table in a seperate column field I have "Meter_Number_2"

What I need to do is for each row, to identify where the number for 
"Meter_Number_1" and "Meter_Number_2" are the same. In addition to that, a 
sperate query will be where they are not the same.

   I am starting off small and the full out analysis will include a couple 
thousand records and I don't want to have to compare the data line by line.

Thanks for your help
0
Utf
2/4/2010 7:35:01 PM
access.queries 6343 articles. 1 followers. Follow

4 Replies
895 Views

Similar Articles

[PageSpeed] 13

On 4 feb, 20:35, ModernGIS <Modern...@discussions.microsoft.com>
wrote:
> Grettings,
> =A0 =A0I am working on a database analysis and need some assistance on bu=
ilding
> a specific query.
>
> =A0 I have an input table that was formed at a previous query that is com=
posed
> of a few 100 records. In one column field I have "Meter_Number_1" and in =
the
> same table in a seperate column field I have "Meter_Number_2"
>
> What I need to do is for each row, to identify where the number for
> "Meter_Number_1" and "Meter_Number_2" are the same. In addition to that, =
a
> sperate query will be where they are not the same.
>
> =A0 =A0I am starting off small and the full out analysis will include a c=
ouple
> thousand records and I don't want to have to compare the data line by lin=
e.
>
> Thanks for your help

I think the queries should lok like:
SELECT * FROM YourTable WHERE Meter_Number_1=3DMeter_Number_2

and
SELECT * FROM YourTable WHERE Meter_Number_1<>Meter_Number_2


Groeten,

Peter
http://access.xps350.com
0
XPS350
2/4/2010 7:55:52 PM
Create a query with an expression, something like:

Match:iif(meter_1 + meter_2, "Yes", "No")

"ModernGIS" wrote:

> Grettings,
>    I am working on a database analysis and need some assistance on building 
> a specific query.
> 
>   I have an input table that was formed at a previous query that is composed 
> of a few 100 records. In one column field I have "Meter_Number_1" and in the 
> same table in a seperate column field I have "Meter_Number_2"
> 
> What I need to do is for each row, to identify where the number for 
> "Meter_Number_1" and "Meter_Number_2" are the same. In addition to that, a 
> sperate query will be where they are not the same.
> 
>    I am starting off small and the full out analysis will include a couple 
> thousand records and I don't want to have to compare the data line by line.
> 
> Thanks for your help
0
Utf
2/4/2010 8:28:17 PM
Chris,

  Little confused on exactly how I should be doing this. When I design the 
query, in what field do I put the expression and on what line? Do I need to 
make sure I have a field column already done?

How exactly do I write the expression

Thanks

"Chris" wrote:

> Create a query with an expression, something like:
> 
> Match:iif(meter_1 + meter_2, "Yes", "No")
> 
> "ModernGIS" wrote:
> 
> > Grettings,
> >    I am working on a database analysis and need some assistance on building 
> > a specific query.
> > 
> >   I have an input table that was formed at a previous query that is composed 
> > of a few 100 records. In one column field I have "Meter_Number_1" and in the 
> > same table in a seperate column field I have "Meter_Number_2"
> > 
> > What I need to do is for each row, to identify where the number for 
> > "Meter_Number_1" and "Meter_Number_2" are the same. In addition to that, a 
> > sperate query will be where they are not the same.
> > 
> >    I am starting off small and the full out analysis will include a couple 
> > thousand records and I don't want to have to compare the data line by line.
> > 
> > Thanks for your help
0
Utf
2/4/2010 9:46:06 PM
In design view grid blank column insert these entries --
FIELD         MyMatch: [Meter_Number_1]
TABLE        YourTableName
SORT     - nothing -
CRITERIA  [Meter_Number_2]

In other query design view grid blank column insert these entries --
FIELD         NotMatch: [Meter_Number_1]
TABLE        YourTableName
SORT     - nothing -
CRITERIA  <>[Meter_Number_2]

-- 
Build a little, test a little.


"ModernGIS" wrote:

> Chris,
> 
>   Little confused on exactly how I should be doing this. When I design the 
> query, in what field do I put the expression and on what line? Do I need to 
> make sure I have a field column already done?
> 
> How exactly do I write the expression
> 
> Thanks
> 
> "Chris" wrote:
> 
> > Create a query with an expression, something like:
> > 
> > Match:iif(meter_1 + meter_2, "Yes", "No")
> > 
> > "ModernGIS" wrote:
> > 
> > > Grettings,
> > >    I am working on a database analysis and need some assistance on building 
> > > a specific query.
> > > 
> > >   I have an input table that was formed at a previous query that is composed 
> > > of a few 100 records. In one column field I have "Meter_Number_1" and in the 
> > > same table in a seperate column field I have "Meter_Number_2"
> > > 
> > > What I need to do is for each row, to identify where the number for 
> > > "Meter_Number_1" and "Meter_Number_2" are the same. In addition to that, a 
> > > sperate query will be where they are not the same.
> > > 
> > >    I am starting off small and the full out analysis will include a couple 
> > > thousand records and I don't want to have to compare the data line by line.
> > > 
> > > Thanks for your help
0
Utf
2/4/2010 10:15:02 PM
Reply:

Similar Artilces:

delay #2
Hi, I use E2K3 in this configuration : 1 FE; 1 BE My FE is in DMZ,when my user open thir Outlook 2000 they received an POP, in this popup, request Exchnage for found information, i read my FE Name. Have you an idae ? for help to find my pb. Rem : after this delay , i have'nt any pb for use outlook or on my BE; Thks Sdeseals ...

Problem with onChange Script that Depends on Multiple Fields
I am having problems getting this onChange script to work correctly. It is a simple if/else script to generate a score for our accounts based on other field input from the same tab. Please let me know if I should be approaching this in a different way all together or if my script is just wrong. Here is the script: // Declaration of Variables var oSEGscore = event.srcElement.value; var oOSVpY = crmForm.all.new_osvperyear.value; var oPOSVCU = crmForm.all.new_promotesosvcu.value; var oAFI = crmForm.all.new_allowsotherfi.value; var oCiMoUSP = crmForm.all.new_contactismemberusp.value; var o...

email/internet information field/button missing from vendor card?
We have version 9 Business Ready. The users wish to be able to have an automatic email sent when an EFT is sent to a vendor--the actual transactions are not sent through GP so that isn't set up yet. However, I don't see any fields relating to emails in vendor cards. I see it under Internet Information under Setup, but the help (and other postings) says it should be visible on the vendor card. Can someone help? The Internet Info button is right beside the lookup button for the Address ID in the vendor card - you don't see it? Frank Hamelly, MCP-GP NOVA Solutions LLC Melbour...

lists #2
Hi I have created a drop down list in excel which is attached to a table (via VLOOKUP). The drop down list contains a code number. What I would like is a comment next to the list saying what each code represents (eg 100 - stationery) but only putting in the value when selected (as it is part of a formula). does anyone know how to do this? any help appreciated. kind regards Rexmann Kind regards Gareth Hi! If this is a listbox from the Control Toolbox then you can do this: Call up the listbox's Properties Select ColumnCount and enter 2 Select ColumnWidths eg 30, 100 (depends on you...

Deselecting records in pivot table automatically
I have a file with over 51,000 rows. I need to pivot the data to get at 3 different conclusions. I can pivot, but I need to further filter the pivot and I'm having problems figuring out how. My headings and some sample data: Dist_Nbr Customer_Acct_Nbr Customer_Number Bill-to_Company_Name Bill_Grp 7510 60000100 600001 SUMTER PACKAGING CORPORATION 00 4611 60000200 600002 A SMOOTH MOVE LLC 00 7170 60001200 600012 DOCUMATION INC 00 7170 60001201 600012 DOCUMATION INC 01 0684 60008300 600083 DOCUMATION INC 00 >From this I need 3 lists and I already pivoted the report. One list gives me...

Copy Purchase orders #2
Does any one know how to copy a purchase order? We do booking orders and have different ship dates. I would like to break up my PO and not have to enter items 2 - 3 times. Thanks No-one answered this one yet. Shame, because I could do with knowing. We very often want to produce a PO for 8 branch, all identical. Please help. "lax guy" <laxguy@discussions.microsoft.com> wrote in message news:C284C5BF-7A6E-45CA-A9A0-88871B48E3B0@microsoft.com... > Does any one know how to copy a purchase order? > > We do booking orders and have different ship dates. I would like...

Globally set fields view
Hi, I have a user who has someone unset his fields when he tries to view his folders. We have straightened out his inbox by going to current view and readding the fields that somehow got deleted, however, I can't find the way to do this globally for all his folders. He has about 30 of them, and I'd hate to have to re-add the deleted fields, one at a time for each folder. There has to be a way to make one folder's view the default setting for all the folders, but I can't find it. Any help is appreciated. Thanks, Sharyn If it's one of the default views that got me...

Pivot table or Macro?
Hi! I was asked to manage space in many warehouses. I have was wondering if I was better of using Pivot tables or Excel Macros. Someone must of gone through the same situation. I have to say that I am more familiar with coding macro programs but I am open about learning more on Pivot table! (or both). Any suggestions regarding this matter? Thanks=92 ahead. Hi, You really need to explain what "manage space" entails. This just really isn't enough info to supply a meaningful answer. -- If this helps, please click the Yes button Cheers, Shane Devenshire "Bobby" wro...

multiple emails #2
recently whenever i send an email to someone, they receive at least 2 copies of it, sometimes 3, i just noticed that when i am sending, the in process shows 2 processes for each email that i send. anybody got any ideas. ...

Remaining Predecessors Custom Field
Hi, I am working in a large Project document (1000+ tasks) with a lot of dependencies. My goal is to create a formula in a custom field that shows only remaining/uncompleted predecessors, but I am having trouble getting something that works. Would any of you be able to point me in the right direction or provide me with a solution? Thank you, Jason -- jdd23 ------------------------------------------------------------------------ jdd23's Profile: http://forums.techarena.in/members/171363.htm View this thread: http://forums.techarena.in/microsoft-project/1290250.htm ...

Pivot Chart #2
Hi. I have Excel 97 at work. I have a Pivot Table. I want to make charts for items that their grand total is more than 100, between 10 and hundred and less than hundred. So everytime the pivot table is updated the charts will update themselves. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ ...

handle #2
Hi, How should i get the handle of the print dialog that comes up when i print a file using ShellExecutEx()...? "gshetty" <gshetty85@gmail.com> wrote in message news:1193068049.692260.78380@q3g2000prf.googlegroups.com... > Hi, > > How should i get the handle of the print dialog that comes up when i > print a file using ShellExecutEx()...? > There's no straightforward way to get it, but this is a reasonable hack: Use Active Accessibility (SetWinEventHook) to be notified of new window creations, and identify the print dialog with either the classname or...

Remove multiple rows of Null fields in a report
I have created a report with multiple lines of data that could be null. I set the fields to "can shrink." It does shrink the line and move it up a field but if I have multiple fields in a row it does not bring the field all the way to the top. Any ideas? Brad wrote: >I have created a report with multiple lines of data that could be null. I set >the fields to "can shrink." It does shrink the line and move it up a field >but if I have multiple fields in a row it does not bring the field all the >way to the top. A CanShrink text box will shrin...

compare
Hello everyone, I have been reading this group for a while, however I am quite a rookie in using of excel. I would appreciate if someone could help with this issue. I quite often have to compare two sheets (from different workbooks-files, but with the same sheet name). Calculations are thus updated time by time and I need to check where were the main differences. Cells contain both values and formulas. I have found through this newsgroup nice add-ins of Myrna Larson and Bill Manville, and Rob Bruce. However I would need the macros to highlight only significant differences (let's say fro...

Transaction Logs #2
Hi everyone, I've installed Exchange 2003 in my environment.and now there are a lot of E00XXXXX.log files filling up my hard disk. I've read and heard that after a fully backup those files would be erased, but it does not happen. Do I need to configure something? Tks in advance, Marco Please detail how you are performing a full backup. In order to purge the log files, you need to be performing an Exchange-aware full online backup (Exchange services still running). NTBackup on the Exchange server is Exchange-aware. 3rd party products such as BackupExec are only ...

CFileDialog customization #2
I have my own class I have derived from CFileDialog and I want to filter the "Look In" combo box so it only contains the folders I want the user to be able to navigate to. I can easily gain access to the CComboBox but I'm having difficulties filtering the contents. I can't really go from the text of the item, because I really need the full path. There is a trick with the list control of the file dialog in that each item display has its PIDL stored in the lParam of the list item. I was hoping there would be a similar trick to the items in the combobox. I can do a GetItemD...

Compare two files and update data from another file base on words in a cell separated by commas
I have two file with several colomns. I need to compare two Col B fileA Col B of FileB as shown in example. http://spreadsheets.google.com/ccc?key=0AgUVfFOnkiaKdFBiNDFLamcybXdhW... Each col have about 1000 rows. Each row contains thousands of words and phrases separated by Comma. As you can see from example, my data has soo many words and phrases separated by comma in each row of two colomn A and B. ============== i Need to merge data of corresponding row from COLA$FileB TO corresponding row of COLA$FileB Also merge data of corresponding row from COLB$FileB TO correspondin...

Posting Status #2
I have a PMPAY batch where the status is 'Receiving' these are configured to post through to the GL. See KB850289 for details on how to fix that. "rcr" wrote: > I have a PMPAY batch where the status is 'Receiving' these are configured to > post through to the GL. ...

On POS (not RMS) Adjusting Time Clock Defaults to Today's Date #2
When an employee negelects to time out and we make adjustments on a subsequent day, the Time Clock display will default to today's date even though the correct date is selected in the Employee's Time Clock window. You have to select Save and Close, then reopen the Time Clock event, then adjust the time out time to the correct date. Anybody else notice this bug? M Kalmus Dogtooth Coffee Company ...

Outlook task #2
I am running Outlook XP Pro and Windows 2000 and I'm wondering is there a way to arraign tasks by categories. Any help would be appreciated. Lawrence <anonymous@discussions.microsoft.com> wrote: > I am running Outlook XP Pro and Windows 2000 and I'm > wondering is there a way to arraign tasks by categories. > Any help would be appreciated. In the TaskPad, click View>By Category -- Brian Tillman Smiths Aerospace 3290 Patterson Ave. SE, MS 1B3 Grand Rapids, MI 49512-1991 Brian.Tillman is the name, smiths-aerospace.com is the domain. I don't sp...

Beginer
hell friends, i got rid of earlier problem but i am facing one more new problem. Problem : How to disable the default buttons present in the tab dialog. i am attaching the code below. Can one tell me what mistake i have done? CTab1 tab1; CTab2 tab2; sheet.AddPage(&tab1); sheet.AddPage(&tab2); sheet.m_psh.dwFlags &= ~(PSH_HASHELP); //trying to disable help button sheet.DoModal(); i have searched in google and in msdn about this problem but i could not able to find the solution. please help Thank you in advance Murthy >How to disable the default buttons present i...

help with formula #2
Here is the answer of my question sent to Google on 2003- 07-15 00:41:33 PST : """ Tim wrote in message: > > I've got a workbook with many worksheets on it(about 60). On 2 columns > on a sheet in this workbook i have data and i need to export this data > to particular cells in other worksheets. For example on columns A1:A20 > and B1:B20 on a worksheet is my data and I want to export the contents > of cells A1B1 to cells A1B1 in worksheet1 then data from A2B2 to cells > A2B2 in worksheet2 and so on. > What is the easiest way to do this job? > ...

Removing Delegates #2
I'm trying to remove a delegate from Outlook 2003 and I get this "The delegate settings were not saved correctly. Unable to active send-on-behalf-of list. You do not have sufficient permission to perform this operation on this object." I have checked and no one has a permission to send-on-behalf-of list. Please help I have seen this happen when the GC (Global Catalog) server is not writable by you. This may not mean much to you, but it will to your Exchange Admin. Your Admin can either, point your system to a writable GC and/or Remove the hidden delegates using the Excha...

How to insert field code in Word 2007?
Prior versions allowed insertion of fields via menu. Desired capability is to insert 'number of pages' in footer. As in 1 of N, where N is number of pages in document. 2003 and prior allowed this as a footer command or a field insert. Now the only option is to scroll through all the sample footers, pick the lonely example that includes the desired 1 of N, change the format, add the other footer information and finally done. Or, open an existing document and copy the footer and paste it. As with many "features" of 2007, deleting the field insert is not an improve...

2 workbooks
I have got 2 workbooks with a list of names. I need to find out if a name appears in both books. One of the workbooks came from a different source and the other one is a report I ran from our database. I need to find out whether the workbook from out of the company has got any of our own names on it. I am using Microsoft Excel 97 and am fairly new at this so please be gentle. One way I did think was to combine the two workbooks into one and find the duplicates but thought there may be another way. Thank you. Hi "queen on", Assume that In book1 the names are in column A, s...