473,386 Members | 1,764 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Comparison or LOGIC issue *Newbie

1
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_date ) 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_date,
(case when recs_import_date >= '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_date, cabinet
order by
Last_date;
Sep 28 '07 #1
0 876

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

Similar topics

3
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
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...
32
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 );...
43
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...
6
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...
2
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...
0
by: metaperl | last post by:
A Comparison of Python Class Objects and Init Files for Program Configuration ============================================================================= Terrence Brannon bauhaus@metaperl.com...
12
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
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...

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.