List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:May 2 2007 2:31pm
Subject:Re: View select results
View as plain text  
 >can I obtain a recordset like this?
 >area1, value_one, thing_one
 >  //,   value_two, thing_32
 >  //,   value_three, thing_ dd
 >area2, value_ten, thing_6w
 >  //,   value_ff, thing_l

SET @prev='';
SELECT
  IF(area = @prev, '', @prev := area) AS area,
  ... other columns ...
FROM &c ...

PB


spacemarc wrote:
> Hi
> my table have three fields that, if selected, are shown like:
>
> area1, value_one, thing_one
> area1, value_two, thing_32
> area1, value_three, thing_ dd
> area2, value_ten, thing_6w
> area2, value_ff, thing_l
> ....
> ....
>
> can I obtain a recordset like this?
>
> area1, value_one, thing_one
>   //,   value_two, thing_32
>   //,   value_three, thing_ dd
> area2, value_ten, thing_6w
>   //,   value_ff, thing_l
>
> So, do not repeat more times the value of the first column (area1, 
> area2...)
>
Thread
View select resultsspacemarc2 May
  • Re: View select resultsBaron Schwartz2 May
  • Re: View select resultsPeter Brawley2 May
Re: View select resultsspacemarc2 May
Re: View select resultsPeter Brawley2 May
  • Re: View select resultsspacemarc2 May
    • Re: View select resultsPeter Brawley2 May