Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Clustering / April 2005

Tip: Looking for answers? Try searching our database.

I need help with SELECT statement

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vanessa Lee - 15 Apr 2005 02:16 GMT
Hi, Could you help me modify the SELECT statement below that would
accomplish my final goal.

SELECT col1, col2 FROM table1 WHERE col3 < @V

In col1 rows have many duplicates
col2 has unique values
col3 can have 5 possible values: 5, 10, 15, 20, 25
Variable @V can be equal to 5 or 10 or 15 or 20 or 25

The goal is to:

Return row values from col1 without duplicates, and return corresponding
values from col2 (both col1 and col2 in one row) "WHERE" col3 always has
maximum value from all possible values but is <= @V

Thank you.
Vanessa
Kalen Delaney - 15 Apr 2005 16:43 GMT
Vanessa

This question has nothing to do with clustering. It looks like you have
posted to every single SQL Server newsgroup, regardless of relevancy. Please
do not do this.

Signature

HTH
----------------
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com

> Hi, Could you help me modify the SELECT statement below that would
> accomplish my final goal.
[quoted text clipped - 14 lines]
> Thank you.
> Vanessa
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.