mercredi 3 février 2016

If Statemet on Sql Query?

i have a query that give me multiple result like this ones:

|DATE|------|DESCRIPTION|---|PDV|----------|ID|-------|NAME|--------|Value|-|Quantity|
2016-01-25    DESAYUNOS     REST            1   DEL PATRON COMBO    162.00    1
2016-01-25    COMIDAS       REST            1   DEL PATRON COMBO    162.00    1
2016-01-25    CENAS         REST            1   DEL PATRON COMBO    162.00    1
2016-01-25    DESAYUNOS     REST            1   DEL PATRON COMBO    162.00    1

Line 1 and 4 are exactly the same, is there a query that can detect same rows an increase the |Quantity| Column by 1 for each equals? like and If statemnt with a while i don tknow if this is posible in SQL

Aucun commentaire:

Enregistrer un commentaire