Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Create procedure issues -628 when add... chandraBE DB2 1 Mon Sep 18, 2017 12:16 pm
No new posts Can we limit length in concatenation ... balaji81_k DB2 7 Tue Aug 22, 2017 2:50 am
No new posts Need DB2 query to fetch previous row ! Chandan1993 DB2 10 Sat Jun 03, 2017 10:43 am
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us