SQLSelect — AddHaving passes wrong argument order

Open
#64 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

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)
NewHaving.Create Field, op, Value
Expected
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.

Dominant language
VBA
Stars
90
Forks
18
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Beakerboy/VBA-SQL-Library

All issues in Beakerboy/VBA-SQL-Library

Similar issues

More Databases issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.