Home > database >  Would you please tell me what the problem how to this query is not the same as what I want results
Would you please tell me what the problem how to this query is not the same as what I want results

Time:10-05

SELECT distinct ic_supply_card branchid,
Ic_supply_card newcardid,
Ic_supply_card cardid,
Ic_supply_card status,
Ic_supply_card. TTC,
Ic_supply_card tradetime,
Ic_supply_card approvedate,
Ic_supply_card approvenodeid,
Ic_supply_card approveoperator,
Ic_supply_card originalttc,
Ic_supply_card flag,
Ic_supply_card remark,
Ic_supply_card subbranch,
Ic_pos. Nodeid
The FROM ic_supply_card, ic_pos
WHERE ic_supply_card. Branchid=: as_branchid AND
Ic_pos. Nodeid like: as_nodeid AND
Ic_supply_card. Tradetime & gt;=: ad_start_date AND
Ic_supply_card. Tradetime & lt;=: ad_end_date and
Ic_supply_card. Posid=ic_pos. Posid
Group by ic_pos. Nodeid
The ORDER BY ic_supply_card approvenodeid, ic_supply_card. Cardid ASC

I think according to search for his posid ic_pos nodeid for a list of other associated
Then press the nodeid grouping but the result's more than a
Remove the group by ic_pos. Nodeid results normal
Excuse me, where is the this statement is wrong? Thank you

CodePudding user response:

So messed up!
Each table data, as a result, the real data?

CodePudding user response:

Remove the distinct the key word and see if it is more than one line

CodePudding user response:

After the need to focus on, now but first, let me help you
  • Related