IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Please give me the query for the following requirement


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
umakanth.ravirala

New User


Joined: 04 Sep 2007
Posts: 15
Location: Halifax, United Kingdom

PostPosted: Thu Nov 15, 2007 10:57 am
Reply with quote

Hi please give me a query which will give bill date with out at on it
Example is given below

BILL_DTE CDE
01.01.2007 AT
01.01.2007 TC
01.01.2007 TF
02.02.2007 TF
02.02.2007 TC
02.02.2007 TS

Here date 01.01.2007 hat AT on it so I don’t want to retrieve that date any where Just I want to retrieve a date with out AT atleast once on it

Ex: BILL_DTE = 02.02.2007

regards....
Umakanth
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu Nov 15, 2007 11:10 am
Reply with quote

Hi,


Quote:
Here date 01.01.2007 hat AT on it so I don’t want to retrieve that date any where Just I want to retrieve a date with out AT atleast once on it


Pls clear your quetion.
Back to top
View user's profile Send private message
umakanth.ravirala

New User


Joined: 04 Sep 2007
Posts: 15
Location: Halifax, United Kingdom

PostPosted: Thu Nov 15, 2007 11:16 am
Reply with quote

hi
in that example there is AT for date 01.01.2007 so i dont want that date
i want only dates without AT atleast once
Back to top
View user's profile Send private message
VinayCM

New User


Joined: 06 Nov 2007
Posts: 36
Location: Bengaluru

PostPosted: Thu Nov 15, 2007 11:35 am
Reply with quote

Umakanth,
I hope this query works.. check it out..
SELECT BILL_DTE FROM TBL_NAME
WHERE CDE <> 'AT'
Back to top
View user's profile Send private message
vasanthkumarhb

Active User


Joined: 06 Sep 2007
Posts: 275
Location: Bang,iflex

PostPosted: Thu Nov 15, 2007 11:38 am
Reply with quote

Hi



Pls try the query below


Code:
SELECT BILL_DTE FROM TABLE WHERE CDE NOT = "AT";



try this query and let me know. Before executing check the syntax also.
Back to top
View user's profile Send private message
umakanth.ravirala

New User


Joined: 04 Sep 2007
Posts: 15
Location: Halifax, United Kingdom

PostPosted: Thu Nov 15, 2007 1:46 pm
Reply with quote

hi vasanth i got it


select bill_dte from table where bill_dte not in (select bill_dte from table where cde='AT');
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top