473,657 Members | 2,358 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Comparison or LOGIC issue *Newbie

1 New Member
Hello Gurus,

I am a newbie to SQL without any formal training (using Navigator 5) and reached a dead-end on trying to figure out the logic and the coding I need to make this work ! Your assistance is GREATLY appreciated ! heres my problem....

I need to segregate all the records in the cabinet based on the LAST_DATE that that a cabinet was opened (before April 2007) and all records ( recs_import_dat e ) not touched by cabinet on or before that DATE. The problem is the results I get produce all records opened before 4/1/07 BUT When I bounce all the cabinet/records off a list of cabinet/records opened after that date I get he same cabinet/records.

The problem is that I need a script solution that will produce ONLY those records where the cabinet/reocrds was opened before the April date and has NOT been opened or touched after that date.


My logic would be something like * Provide only those records that were imported before '01-apr-2007' and have not been touched after that date or if the below script could work it would look something like ???

select distinct cabinet, recs_import_dat e,
(case when recs_import_dat e >= '01-apr-2007' then '1' else '0' end) Last_date
from data_table
where
import_date <= '31-mar-2007' and not > '01-apr-2007"
group by recs_import_dat e, cabinet
order by
Last_date;
Sep 28 '07 #1
0 891

Sign in to post your reply or Sign up for a free account.

Similar topics

3
1359
by: Stian Søiland | last post by:
Could anyone explain to me why this does not work as intended? >>> class Oldstyle: .... pass .... >>> old = Oldstyle() >>> old == 1 False >>> old.__eq__ = lambda x: True >>> old == 1
46
5132
by: yadurajj | last post by:
Hello i am newbie trying to learn C..I need to know about string comparisons in C, without using a library function,...recently I was asked this in an interview..I can write a small program but I was told that wouldn't it be wise to first get the length of the strings..if it doesn't match then they are not the same..I agreed...then he said..but again that would be an overhead first measuring the length...and then doing a character by...
32
4083
by: ma740988 | last post by:
template <class T> inline bool isEqual( const T& a, const T& b, const T epsilon = std::numeric_limits<T>::epsilon() ) { const T diff = a - b; return ( diff <= epsilon ) && ( diff >= -epsilon ); } int main() { std::deque<double> pt ;
43
2709
by: michael.f.ellis | last post by:
The following script puzzles me. It creates two nested lists that compare identically. After identical element assignments, the lists are different. In one case, a single element is replaced. In the other, an entire column is replaced. --------------------------------------------------------------------------------------- ''' An oddity in the behavior of lists of lists. Occurs under Python 2.4.3 (#69, Mar 29 2006, 17:35:34)
6
1926
by: C# newbie with big problems | last post by:
Ok, I am building a product configurator which works quite well except for a few bugs. It has a couple of listboxes and a checked list box. Now the checked list box holds upgrades for products listed in a different listbox and these upgrades are grouped by category so for example if you select a computer then the checked list box may display: 512 RAM 1GB RAM HDD 30 GB HDD 60 GB
2
1218
by: netasp | last post by:
hi all, I need your help with the following scenario: I am using VS 2005 and SQL server DB, my form has 3 textboxes txtTotalAmount, txtAmountEntered, txtAmountBalance. If txtTotalAmount is $20.00 for example then user can enter $2.00 in cash, $2.00 in MasterCard, $16.00 in Cash ,..etc until total amount is reached then balance will show to user. I just don't know whats the best way to approach this? store everything in
0
2499
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com http://www.livingcosmos.org/Members/sundevil/python/articles/a-comparison-of-python-class-objects-and-init-files-for-program-configuration/view
12
1463
by: curiousEngine | last post by:
Write a program that allows you to input 3 integer values A, B and C and output the largest of the 3 values. //TO DO RIGOUROUS TESTING #include<iostream> using namespace std; void main(){
10
8531
by: lilly07 | last post by:
Hi, I have one column of strings in 1st file file and another file which consists of 5 clumns in each line and my basic objective is to find each item/line of 1st file is available in 3rd column of 2 nd file. And I tried the following logic. It might be bit round about way but as a beginner am trying as follows. The column in the 1st file is having data as example NS008_456_R0030_3008 The 2nd file data is as follows: + test ...
0
8411
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8323
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
8838
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...
0
8739
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6176
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
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2740
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
1969
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.