Hi Melissa, What's wrong with phrasing your query as :
select distinct i.reportid, ivalue as IPAddress, ivalue as Computer
From item
where reportid=1; /* LIMIT 3 */ -- or something like this if you do want 3 rows anway. Am I putting LIMIT right? -- Asif On 10/19/06, Melissa Dougherty <[EMAIL PROTECTED]> wrote:
I'm trying to take table data and display the data horizontal.... I need to take the column and show the results in one row. I have tried several different inline view (queries) and get multiple rows. Here is an example.... It brings back three rows with each column in a different row. select distinct i.reportid, (select ivalue from item where ifield like '%IP Address%' and ifield = i.ifield and ivalue = i.ivalue) AS IPAddress, (select ivalue from item where ifield = 'Computer Name' and ifield = i.ifield and ivalue = i.ivalue) AS Computer from item i where i.reportid = 1 order by 1 Any suggestions? Thanks, Melissa
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]