Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Administering
»
select query
26 posts, Page 1 of 3
1
2
3
»
»»
select query
Rate Topic
Display Mode
Topic Options
Author
Message
charipg
charipg
Posted Thursday, January 28, 2010 12:59 PM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:43 AM
Points: 378,
Visits: 897
i need a select query for below.
there is 3 date colums in a table.
how to find out the greatest value from these 3 columns.
Post #855592
LutzM
LutzM
Posted Thursday, January 28, 2010 1:03 PM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 3:17 PM
Points: 6,731,
Visits: 12,131
Sounds like homework.
If not, please provide sample data, expected result and what you've tried so far as described in the first link in my signature.
Lutz
A pessimist is an optimist with experience.
How to get fast answers to your question
How to post performance related questions
Links for
Tally Table
,
Cross Tabs
and
Dynamic Cross Tabs
,
Delimited Split Function
Post #855594
charipg
charipg
Posted Thursday, January 28, 2010 1:06 PM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:43 AM
Points: 378,
Visits: 897
selecting one greatest value from 3 coloumns.?
Post #855597
charipg
charipg
Posted Thursday, January 28, 2010 1:07 PM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:43 AM
Points: 378,
Visits: 897
selecting one greatest value from 3 coloumns in a table.?
Post #855598
LutzM
LutzM
Posted Thursday, January 28, 2010 1:10 PM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 3:17 PM
Points: 6,731,
Visits: 12,131
charipg (1/28/2010)
selecting one greatest value from 3 coloumns in a table.?
Yes.
How about sample data including your current query as requested before?
Lutz
A pessimist is an optimist with experience.
How to get fast answers to your question
How to post performance related questions
Links for
Tally Table
,
Cross Tabs
and
Dynamic Cross Tabs
,
Delimited Split Function
Post #855601
Florian Reischl
Florian Reischl
Posted Thursday, January 28, 2010 1:13 PM
SSCrazy
Group: General Forum Members
Last Login: Sunday, November 04, 2012 12:23 PM
Points: 2,087,
Visits: 3,932
Try MAX with an included CASE WHEN.
Greets
Flo
The more I learn, the more I know what I do not know
Blog: Things about Software Architecture, .NET development and T-SQL
How to Post Data/Code to get the best Help
How to Post Performance Problems
Post #855603
charipg
charipg
Posted Thursday, January 28, 2010 1:14 PM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:43 AM
Points: 378,
Visits: 897
I am not able to provide the sample data.
can you pls provide the sample query?
Post #855604
Florian Reischl
Florian Reischl
Posted Thursday, January 28, 2010 1:15 PM
SSCrazy
Group: General Forum Members
Last Login: Sunday, November 04, 2012 12:23 PM
Points: 2,087,
Visits: 3,932
charipg (1/28/2010)
I am not able to provide the sample data.
can you pls provide the sample query?
?
The more I learn, the more I know what I do not know
Blog: Things about Software Architecture, .NET development and T-SQL
How to Post Data/Code to get the best Help
How to Post Performance Problems
Post #855606
LutzM
LutzM
Posted Thursday, January 28, 2010 1:19 PM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, April 24, 2013 3:17 PM
Points: 6,731,
Visits: 12,131
charipg (1/28/2010)
I am not able to provide the sample data.
can you pls provide the sample query?
You don't have to provide your real data. Get the basic concept and transform it into a sample table with fake column names and fake values. But make sure it represents what you're struggling with.
Please remember we don't see what you see. So you have to help us help you.
Lutz
A pessimist is an optimist with experience.
How to get fast answers to your question
How to post performance related questions
Links for
Tally Table
,
Cross Tabs
and
Dynamic Cross Tabs
,
Delimited Split Function
Post #855609
charipg
charipg
Posted Thursday, January 28, 2010 1:37 PM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 12:43 AM
Points: 378,
Visits: 897
Please correct the below query..........
select max(myDate) from
( select field_1 myDate from myTable
union all
select field_2 myDate from myTable
union all
select field_3 myDate from myTable)
Post #855620
« Prev Topic
|
Next Topic »
26 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.