Not Equal?

May 26, 2005

Hey,

I have 2 tables that i compere together with a query and if my criteria is OK than selected data is recordet in new table with some calculation....code:

INSERT INTO tblZaloga ( Proizvajalec, Tip, DN, Predvideno, Naroceno, Zaloga )
SELECT tblACAD_Urejeno.Proizvajalec, tblACAD_Urejeno.Tip, tblACAD_Urejeno.DN, tblACAD_Urejeno.KosovSkupaj, tblIN_Urejeno.KosovSkupaj, Sum(([tblIN_Urejeno].[KosovSkupaj]-[tblACAD_Urejeno].[KosovSkupaj])) AS Zaloga
FROM tblACAD_Urejeno, tblIN_Urejeno
WHERE (((tblACAD_Urejeno.Tip)=[tblIN_Urejeno].[tip]) AND ((tblACAD_Urejeno.DN)=[tblIN_Urejeno].[DN]))
GROUP BY tblACAD_Urejeno.Proizvajalec, tblACAD_Urejeno.Tip, tblACAD_Urejeno.DN, tblACAD_Urejeno.KosovSkupaj, tblIN_Urejeno.KosovSkupaj;


Now i have a problem with racords that does not reach my criteria. The problem is that i dont know witch records are the one that does not reach my criterya? Can someone pls tell me how can i create a table like the code up there but with records that are not procesed?

THX

View Replies


ADVERTISEMENT

"Not Equal And Not Equal" Query Not Working

Apr 14, 2006

I am trying to run a query where one field has a Not Equal parameter AND another field has Not Equal parameter (for example, Product Code Not Equal "A" AND Client State Not Equal "NY)

The result of the above query are all records that have Product Code = "A" are missing from the result. I want some of the "A" Product Codes; I just want to exclude the ones where the Client state is NY.

The list of values for each field is too big to state it in a positive way (I would have to list all the other 28 product codes and all the other 49 states).

What am I doing wrong? Thank you in advance for any suggestions.

View 1 Replies View Related

Not Equal?

Jun 8, 2005

Hey,

Can someone pls tell me how can get not equal resoults from my two tables? I have table1 and table2 both with field "Layer" and what I want is to get only that data from table1 that does not have the same Layer as table2.Layer?

I try to JOIN table1 and table2 and i get the same resoult as with this code:
WHERE ((tblACAD_MRK.Layer)=[tblLayerji].[NeteniLayer])

but thats exactly the oposite from what i want, so i try with this code:
WHERE ((Not (tblACAD_MRK.Layer)=[tblLayerji].[NeteniLayer]))

and the code does not give me the resoult that i want, becouse i get all the layers for some reason :confused:

So can someone pls tell me what can i do?

THX

View 2 Replies View Related

Not Equal

Sep 27, 2005

I'm wanting to write this query that looks at both tables and only returns records that don't match...not for sure how to do this..


SELECT tblCombined.DLID, tblCombined.DUP, tblCombined.QRYRAN
FROM Susp_Master INNER JOIN tblCombined ON (Susp_Master.DUP = tblCombined.DUP) AND (Susp_Master.DLID = tblCombined.DLID);

View 4 Replies View Related

WHERE First Three Letters Equal Xyz

Sep 21, 2007

Hi there,

I have one question with regards to the WHERE part of an SQL query. I want to limit my query on datasets, where the first three letters of a certain field (which contains strings) equal "Exp". Is there a more efficient way than the following?


SELECT A.Date, A.Name
From tblA as A
WHERE A.Name="Exp_A" OR A.Name="Exp_B" OR A.Name="Exp_C";


Best regards,
JapanFreak

View 3 Replies View Related

Value In A Table Equal To The Sum Of Other Values

Dec 11, 2007

Hey.

Is there any way to make a field in a record automatically set it self so it's the sum of other values in the record

http://img412.imageshack.us/img412/1677/helphg9.jpg

That's an example what i want to do except i had to manually type in 25. Is there any way to get that so it does that automatically. I am happy to use forms or macros or anything as long as it occurs straight away after the data is inputted and not have to run something or open something up

Thanks in advance

View 5 Replies View Related

If Records In Rows A And B Are Equal Then

Apr 26, 2008

Hello,
I would like to show records in my query only if records in raw a and b are equal and they have same question id.
Please let me know if you can help.
Many thanks,
Debbie

View 3 Replies View Related

Not Equal To & Grouping Query

Apr 28, 2008

I have Table as PL2008 and RPT2. Both tables have one column named PTUNID. My goal is to first Group, sum certain Columns in the PL2008 then match PTUNID from this Grouping to RPT2 Table's column PTUNID and then show the results which do not match.

I have written following Qry but what really happenning is its giving me all the results ( match and no match in both tables ) and Sum values are incorrect.

SELECT [PL2008].PTUNID, Sum([PL2008].[Total Hours]) AS [SumOfTotal Hours], Sum([PL2008].[Actual Cost]) AS [SumOfActual Cost], [PL2008].[PRFIELD]
FROM RPT2, [PL2008]
WHERE RPT2.PTUNID <> [PL2008].PTUNID
GROUP BY [PL2008].PTUNID, [PL2008].[PRFIELD];


Any suggesstion



Thanks
Niri

View 3 Replies View Related

Compare 2 Tables Where NOT EQUAL &lt;&gt;

Feb 7, 2006

It need to compare two tables where the ID Number is not equal. Specifically I need to update new poducts in a table, but only those ID#s that are not already listed.

I know how to compare two feilds where they are not equal...
i.e. [New_Table].[ITEM_NUM]<>[Old_Table].[ITEM_NUM]
...but I'm currently limited by the join properties in the tables, since I'm comparing IDs and not the feilds. ANY IDEAS?

View 2 Replies View Related

Setting A Default To Equal Another Field

Oct 21, 2006

I have a membership database. A number of members go by their middle names or a nickname rather than their first name. I need to keep track of their real full names, but I want the new-record default of the preferred name field to equal the contents of the first name field. How do I set this in the table design? The table already has 1400 records, and it would be quite a job to manually copy each first name to the preferred name field, a job I would rather avoid.

View 5 Replies View Related

Query To Return Values That Are Not Equal

May 25, 2006

I have a query that uses a linked table from an external database and joins it with a table from my database to return records that contain the same values.

Is there a way to return only the records that are present in the external database and not in my db?

Thanks

View 3 Replies View Related

Selecting Equal Amount Of Records

Jul 12, 2007

I was wondering if someone could help me.
I have a simple table with data that gets updated daily. I need to split the data into 5 equal parts for work distribution. Because the amount of records always changes I can not go by numbering so I need to go by percentage, to split it into 5 ( 20% ) parts. Please help.

View 5 Replies View Related

Count Equal Items In Report

Feb 19, 2005

Any idea how i can count the number of records that have the same order number of the one on the report list? For example, there are 3 records in my query that have Order# 1001, I would like it to show a "3" next to order 1001 in the report.

Any idea where and how I would make this happen (in the query or the report)?

Let me know!
Thanks!
ovadoggvo

View 1 Replies View Related

Modules & VBA :: On Event Value Is Equal To Last Saturday

Jan 22, 2015

How do I do: on event enter last saturday (in a control)?

The best I've been able to come up with is to check if it's A saturday.

Code:
Private Sub ctrl_Weekending_Exit(Cancel As Integer)
Dim strDay As Integer
strDay = Nz(Weekday(Me.ctrl_Weekending.Value, vbSaturday))

[Code].....

View 4 Replies View Related

Queries :: Sum All Alternatives From Column That Equal Specified Value

Jun 27, 2014

I have a database with with 100s of values for a field. What I would like to be do is specify a value via a form and the query will return all options that equal the specified value.

so for example: Specified value = 150

Field 1 Field 2
------- -------

Name1 10
Name2 50
Name3 25
Name4 25
Name5 100
Name6 40
Name7 125
Name8 50

I'd like the query to return all possibilities that equal 150 so it should look like:

result 1 - name5 + name2
result 2 - Name5 + Name 8

View 3 Replies View Related

Forms :: How To Lock A Field If Equal To A Value

Oct 9, 2014

I'm still using Access 2003 to manage our membership database, is it possible to lock a field(member's name) if the membership is equal to withdrawal or terminated? Possible to use "on click"?

View 3 Replies View Related

Not To Display Data With Equal Value From Two Tables

Apr 29, 2013

I have a query that pulls data from 2 different tables. The query should display two columns made up from data of the two tables. Some of the data in the two tables are equal. How can avoid from displaying equal results.

Dog
Cat
Dog
Dog
Elephant
Cow
Cow
Chicken
Dog
Chicken

I do not want to display the result in row 2 seeing that both are equal.

View 1 Replies View Related

How To Make Particular Fields Of One Record Equal The Value Of Another

Nov 14, 2012

I have created my first two tables ever.

The first is ClientList, which contains typical contact and biographical information (name, address, citizenship, etc), and unique ClientID# for each client. The primary key for this table is the default Autonumber ID that comes with each new table.

The second table is WillInfo, which contains information specific to drafting the client's Will (e.g., spouse name, spouse address, spouse citizenship, similar data on beneficiaries, similar data on executors, etc). The primary key for this table is ClientID#.

I then created a One-to-One relationship between ClientList and WillInfo, binding by Client ID. All this appears to work.

My question arises because I have two clients who are married to each other, which means much of the spouse info I require for the WillInfo table in respect of these particular clients is already accurately recorded as client info in the Clientlist table. So for these specific clients (but not generally!), I want the spouse information in the WillInfo table (e.g., SpouseAddress, SpouseCitizenship for ClientID# 12.001) to EQUAL specific values provided in the ClientInfo table (i.e., ClientAddress, ClientCitizenship for ClientID# 12.002).

I read and understand this is the best approach, following the principle that data should not be entered twice, so as to increase efficiency and avoid mistakes and future problems.

My question is: How do I do this? In Excel, if the client info I wanted to replicate was in cells B4-B9, I would enter =B4, or =B5, or =B6 and so on in the cells for spouse info. What is the equivalent expression for replicating specific client info from a different table.

View 7 Replies View Related

Make A Field Equal To What Was Entered Previously

Sep 20, 2006

I think this should be simple, but my mind just isn't functioning today. I have a form that people have to enter information in every hour. It has a lot of repetitive information to be entered each time, for example, they are supposed to enter their initials or name so that we can track them down if there is an issue. Is there some way, to make that field on their entry form, equal to the previous entry? Thank you!

View 9 Replies View Related

Have Table Primary Key Equal The Record Number.

Feb 3, 2008

Hi
How can I make the primary key (participant #) in my table equal the record number on the Form? In other words, when I open the form, I need two things to always happen:
1. the primary key must equal the record number (which is displayed on the form)&
2. when I click "Add New Record" button, I want a new customer # automatically generated and in the correct order.

Is this possible? I've been struggling...

View 4 Replies View Related

Forms :: Automatically Add New Record If Field Is Equal To Certain Value?

May 26, 2014

A have an OrderDetail form where I add the articles to a specific order. My articles can be ordered with 4 different attributes and one of them cost more than the others. If they want the article that cost more, I would like access to add a new record with some information.

also:
4 different attributes to my articles. (A, B, C, D)
if ArticleAttribute = A then Null
if ArticleAttribute = B then Null
if ArticleAttribute = C then Null
if ArticleAttribute = D then add NewRecord with ArticleId = X

View 14 Replies View Related

Queries :: Remove Duplicates - If 2 Fields Are Equal

Nov 19, 2013

I have a large table with many fields and many rows. There is no primary key. I'll call one field ParentPN, and another field ChildPN. There are many other fields as well. I want to identify all rows where BOTH the ParentPN and ChildPN occur more than once. I know how to create a query to identify duplicates of ONE field in the table, but not two. I can solve this with VBA: I will read the two fields of interest in the first row, then compare both values with every other row. If it finds another row with BOTH ParentPN and ChildPN identical with the first, that's a "hit". Then, repeat with all the other rows. I could find ways to make this run faster, but I was wondering if there are any build in functions to accomplish this. I looked at the Find Duplicates query builder, and all I see is I can select ONE field to search for dupes, not two.

View 14 Replies View Related

Queries :: Check If Date Is Equal To Last Day Of Month

Jun 9, 2015

I have two date columns in my table called "End date" and "Closing date".

An example could be 14-06-2015 and 13-04-2017.

I need to make a query which is checking if the two dates are equal to the last day of their respective month. I don't have two columns in the table with the last day of month, so I first need to find out what the last day in the month is.

View 2 Replies View Related

General :: Equal Fields Across Tables / Forms

Aug 22, 2013

I have a few fields that are the same across a couple of forms and sub-forms (each form/sub-form being represented by a different table). I would like for data entry into one field to ensure that the data is autofilled into the other. ie if I type 'ENG' into field 1 on form 1, it will autofill the equivalent field in sub-form 2 as 'ENG' so that I do not have to type the same thing twice. These entries are not unique or in any order as it is variable depending on the entry and so they can't be linked as primary keys and foreign keys. So how would I do this? I would like to avoid VBA is possible.

View 1 Replies View Related

Forms :: Equal Field In Form And Subform?

Aug 28, 2013

I have a main form with many subforms, each form /subform representing a table. One of the fields on the main form (ie engine type) is also in the engine subform. How do I make it so that filling in the engine type field on the main form automatically fills in the subform field?

View 9 Replies View Related

Forms :: Value Of Text Box Is Equal With Column 1 From List Box

Nov 7, 2013

i create a project for salary company , i have a list box and have 6 columns & i have 1 textbox , i work with code and a listbox is the query know i need the value of textbox is equal with the column 1 from listbox how to do it ? like when i run form need to be enter the code when entered the code in listbox is equaled with the textbox .another question , in the list box i have one column it is about salary i want the total of salary.

View 4 Replies View Related







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