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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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