Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

How To compare rows

This is a discussion on How To compare rows within the SQL forums, part of the Databases category; Hi every One I am trying to compare rows data which is in Date & time in format in the table. all need to do compare the time to find ...

Go Back   Geeks Talk > Databases > SQL
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 06-29-2009
Junior Member
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Simen1277 is on a distinguished road
How To compare rows

Hi every One

I am trying to compare rows data which is in Date & time in format in the table. all need to do compare the time to find the pattern in the querry. I am new for SQL.

please tell me the suggestion.


Querry
Code:
select u.USERS_IDENT, cafe.customerorg_name,u.USERS_LOGIN,u.users_fname, u.users_lname,p.progress_start,
 p.progress_complete, p.progress_status
 from ---------table names ,
(select
	cafe.customerorg_name,dist.customerorg_name district,area.customerorg_name area
	from   --table names
	where
	cafe.customerorg_parent = dist.customerorg_ident
	and dist.customerorg_parent = area.customerorg_ident
	and cafe.customerorg_name like '600607'
	)cafe
where p.progress_user_ident(+) = u.users_ident
and u.users_active='1'
and p.progress_crsware_ident = 'C00123'

and u.users_customerorg_ident = c.customerorg_ident
and cafe.customerorg_name = c.customerorg_name
order by cafe.customerorg_name;
Thanks in Advance

Last edited by debasisdas; 06-30-2009 at 02:43 AM. Reason: added code tags.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-29-2009
Contributing Member
 
Join Date: Jun 2009
Location: United States
Posts: 71
Thanks: 0
Thanked 5 Times in 4 Posts
CSOOR is on a distinguished road
Re: How To compare rows

I am not getting from the query which column is datatime which you want to compare, so take that column of one table and take out the time out of that column and compare that with the other datetime column of other table by taking out the time. There should be functions available in the server you are using , for the conversion. Look at those functions and use them for the conversion.
Reply With Quote
  #3 (permalink)  
Old 07-14-2009
Junior Member
 
Join Date: Dec 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Simen1277 is on a distinguished road
Re: How To compare rows

select
USERS_IDENT
,customerorg_name
,USERS_LOGIN
,users_fname
, users_lname
,p.progress_start,
, p.progress_complete
, p.progress_status
from ---------table names ,

(select
c.customerorg_name,d.customerorg_name district, a.customerorg_name area
from --table names
where
-------
)cafe
where ----
order by customerorg_name;


in this querry I need to comapre p.progress_Complete which is date & time format. I need to compare data in this column rowwise.

Thanks
Reply With Quote
Reply

  Geeks Talk > Databases > SQL

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
How to compare two pdf files with using qtp ch.bhaskar.mca QTP 2 03-22-2009 10:13 AM
Compare 2 files in VP nsureshkumarpp Rational Robot 0 01-08-2009 04:59 AM
can we lock rows of a table so that not any instance can even select that rows? UditaOra Oracle 3 07-31-2008 08:32 AM
how to move the particular rows or multiple rows in gridview are selected using check gnanadesigan.k ASP.NET 1 07-18-2008 08:39 AM
Compare CSV files rahul.malhotra Geeks Lounge 0 11-22-2007 02:05 AM


All times are GMT -4. The time now is 04:24 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved