Re: SQL or programming?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ivan Debono (ivanmdeb_at_hotmail.com)
Date: 06/08/04


Date: Tue, 8 Jun 2004 16:52:32 +0200

What I mean by Problem 2 is:

Selecting the category which occurs the most for items in Table B. So if
category1 occurs most even though some items cost less, then get category1.
Problem 1 will do the opposite: Select the cheapest items irrelevant of the
category.

Ivan

"Tom Moreau" <tom@dont.spam.me.cips.ca> schrieb im Newsbeitrag
news:Oz9hcZWTEHA.332@TK2MSFTNGP11.phx.gbl...
> Geez. Rough day. Also, reading your response, I think you interpreted
what
> the guy wanted for Problem 2. I couldn't figure out what he meant and
then
> inferred it through the data as the max (Cost). :-S
>
> --
> Tom
>
> ---------------------------------------------------------------
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com/sql
>
>
> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
> news:%23RaHWWWTEHA.3332@tk2msftngp13.phx.gbl...
> > from
> > (
> > Item
> > , min (Cost) as Cost
> > from
> > TableB
>
> Forgot a SELECT in there. ;-)
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>



Relevant Pages

  • Re: Using a "match" table to store multiple columns for parent data
    ... Category1 = MAX, ... FROM ProductCategories PC ... If you want more product categories, you will need to extend the query. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: howto use the query results as view column?
    ... how can create a view like this (id, name, category1, category2, ... category3) with high performance? ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (comp.databases.ms-sqlserver)
  • Re: Hierachical Relationship driving me nuts.
    ... If you are using SQL Server 2005, ... I need to then be able to retrieve a particular category and its children (to a specified depth) and display it in a repeater. ... ---category1 child ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SQL or programming?
    ... , min (Cost) as Cost ... join TableB as b on b.Item = x.Item ... Columnist, SQL Server Professional ... Item 1, $10, Category1 ...
    (microsoft.public.sqlserver.programming)