473,672 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Here's one for ya.

I have a history table with a bunch of IDs. What I need is to collect a
company/project id on the history table that has a particular yes/no
field flagged, then EXCLUDE that ID from a query. I've tried using a
query that lists the flagged dates along with the ID tags associated,
and tying that back to either the company info table or history, with
the criteria

<>[DecDate]![CyID]

Where DecDate is the query that lists the dates and IDs of the flag.
But I can't get this to work.

May 8 '06 #1
2 1178
Jaaz wrote:
I have a history table with a bunch of IDs. What I need is to collect a
company/project id on the history table that has a particular yes/no
field flagged, then EXCLUDE that ID from a query. I've tried using a
query that lists the flagged dates along with the ID tags associated,
and tying that back to either the company info table or history, with
the criteria

<>[DecDate]![CyID]

Where DecDate is the query that lists the dates and IDs of the flag.
But I can't get this to work.

I don't know about DecDate or CyID, but if I understand the problem,
here's what I might do. T1, History are the table names I'll use in the
example.

Query/New and add tables T1 and History. Drag relationship line between
T1 and History on the field ID. Now dbl-click the join line and set it
to All records in T1 and those that match in History. Now drag the
fields to display from T1. Now drag the ID field and YesNo field from
History. In the criteria row for ID, enter
Is Null
Right underneath enter
it Is Not Null
On the Is Not Null criteria line, under YesNo enter False or True
depending on whether or not you want toe data for Yes or No values

This is basically saying show all records from T1 that has no history
record or if it does, the YesNo must be Yes or No...your choice.


May 8 '06 #2
You could also try nesting a select statement in the criteria like this;

"SELECT * FROM T1 WHERE T1.ID NOT IN(SELECT T1ID FROM History WHERE
MyYesNoField=Tr ue;);"

That will filter out IDs from the Main table that have associated records in
History that have your YesNo field set to true in this case. This also
occurs without having to do any grouping. If you want to filter out IDs
that have the YesNo field set to false, just replace the True in the
preceding statement to False.

"Jaaz" <Ja****@gmail.c om> wrote in message
news:11******** *************@g 10g2000cwb.goog legroups.com...
I have a history table with a bunch of IDs. What I need is to collect a
company/project id on the history table that has a particular yes/no
field flagged, then EXCLUDE that ID from a query. I've tried using a
query that lists the flagged dates along with the ID tags associated,
and tying that back to either the company info table or history, with
the criteria

<>[DecDate]![CyID]

Where DecDate is the query that lists the dates and IDs of the flag.
But I can't get this to work.

May 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2083
by: DavidS | last post by:
Have Visual Studio.NET installed on MS 2000 Professional OS laptop. No issue ever with web development and SQL connections. Purchased new laptop with XP Professional SP2!!!!!!!! & Visual Studio.NET installed. Nothing but headaches. Continually getting System.Data.SqlClient.SqlException : Timeout expired message - The timeout period elapsed prior to completion of the operation or the server is not responding. Can anyone help with...
22
2203
by: Rob R. Ainscough | last post by:
Sorry to hear about the job cuts and Oracle now out sourcing to India. Rob.
0
1321
by: Ramprasad | last post by:
Life is Different here, sky has no limit but you must grip it with this website, your Mirror of mind are present there. Whatever you want related to your everyday life, it can present or give information about the same, within a second, just for one click by mouse. Click here. You can get from any thing from your House, Just one click in mouse http://deysworld.bravehost.com For Food and Drink Click Here. For Latest Fashion Click Here For...
1
1604
by: leighahh | last post by:
Hi everyone i was wondering if there was a way to turn this code that is css into HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <!-- YOUR WEBSITE TITLE --> <title>
2
3365
by: dibblm | last post by:
I'll start this hopefully simple and add code where needed or requested. Im using a combobox that bound to a DataSet. The Dataset retreives it's values from SQL. I can retreive the values fine. However only displaying (1) Column. Which is fine. Here's where it gets complicated for me. The dataset has 2 other columns that get filled. I need the resulting columns to be sent to text boxes when I select a value from the combobox. ...
0
8419
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8945
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8643
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8697
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7475
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6255
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2837
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2093
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.