Beakerboy / Beakerboy/VBA-SQL-Library

SQLSelect — AddHaving passes wrong argument order

Open
#64 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
VBA
Stars
90
Forks
18
PR merge metrics
No merged PRs in 30d

Description

SQLSelect: correct AddHaving argument order
- Component: `src/ClassModules/SQLSelect.cls` (around 71–95)

### Problem
- Calls `SQLCondition.Create` with `(Field, op, Value)` but signature is `(Expression1, Expression2, Operator)`.

### Snippet (actual)
```vb
NewHaving.Create Field, op, Value
```

### Expected
```vb
NewHaving.Create Field, Value, op
```

### Steps to Reproduce
1) Add a HAVING with a non-default operator.

### Actual
- Generates the comparison with swapped operands/operator.

### Proposed Fix
- Pass `(Field, Value, op)` consistently in both branches.

---

Contributor guide

No contributing guide indexed for this repository

Research direction

Open src/ClassModules/SQLSelect.cls around lines 71–95 and inspect AddHaving in both branches, starting with the calls to SQLCondition.Create. Reproduce a HAVING using a non-default operator and verify that both branches generate the comparison with the expected argument order.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
database
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.