Hi Everyone,
I want load a list of records from as400 to webpage, But I want load only one record if there are mutiple records have the same key. I used distinct but the result is not what i want. because I selected two fields, one is that key field and another is the description. I got mutiple records with same key field and different description. But I want only one record for that key field, I don't care if the description same or not. The sql statement is listed below:
qry="select distinct keyfield, description from lib.masterfile where keyfield like '"&1234&"%'"
I got 2 records which key = 1234 :
Key Description
---- ---------------
1234 new car
1234 new 2004 car
I only want to display one 1234.
So anyone know how to do that.
Thanks
I want load a list of records from as400 to webpage, But I want load only one record if there are mutiple records have the same key. I used distinct but the result is not what i want. because I selected two fields, one is that key field and another is the description. I got mutiple records with same key field and different description. But I want only one record for that key field, I don't care if the description same or not. The sql statement is listed below:
qry="select distinct keyfield, description from lib.masterfile where keyfield like '"&1234&"%'"
I got 2 records which key = 1234 :
Key Description
---- ---------------
1234 new car
1234 new 2004 car
I only want to display one 1234.
So anyone know how to do that.
Thanks