Home > database >  Questions about the cursor take different data
Questions about the cursor take different data

Time:10-03

The data from the table below a column of values assigned to the drop-down list box, not compare between values, so out is to have the same value

Now want to take the value is not repeated (that is to say, in the drop-down list box in the display value is not the same, no repeat)

Don't know where to solve, all body code, detailed point of the

DECLARE cur_002 CURSOR FOR
SELECT the userdata. Name
The FROM the userdata.
The open cur_002;
Boolean lb_continue
Int ll_total

Lb_continue=True
Ll_total=0
String ls_xh
The DO WHILE lb_continue

The FETCH cur_002
INTO: ls_xh;

If the sqlca. Sqlcode=0 Then
Ll_total + +
Ddlb_1. Additem (ls_xh)
The Else
Lb_continue=False
End the If
LOOP

CodePudding user response:

With distinct


SELECT distinct userdata. Name
The FROM the userdata.

CodePudding user response:

Thank you, can, really strong,

CodePudding user response:

refer to the second floor yuenyanfj response:
thank you very much, and really strong,

A sweat, it's a pity that I missed the first, or I can be strong
  • Related