Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Please give me the query for the following requirement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: Please give me the query for the following requirement
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: 276
Location: Bang,iflex

PostPosted: Thu Nov 15, 2007 11:10 am    Post subject:
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    Post subject: Reply to: Please give me the query for the following require
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    Post subject:
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: 276
Location: Bang,iflex

PostPosted: Thu Nov 15, 2007 11:38 am    Post subject:
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    Post subject: Reply to: Please give me the query for the following require
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 3 Sun Mar 12, 2017 5:35 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us