Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row with values from previous row #442

Open
RomainDGrey opened this issue Jul 12, 2023 · 0 comments
Open

Row with values from previous row #442

RomainDGrey opened this issue Jul 12, 2023 · 0 comments

Comments

@RomainDGrey
Copy link

RomainDGrey commented Jul 12, 2023

Hello,

I have a table with few thousands entries which could be represented with these few lines:

ID;Column1;Column2;Column3
1;"line1";"CompanyA";""
2;"line2";"CompanyA";"someText"
3;"line3";"CompanyA";""

I am using the HFSQL driver to retrieve information from a database with the same name.

By executing the following code, I got wrong information:

  sql_request = 'SELECT id, Column1, Column2, Column3 FROM TABLE WHERE Column2 in ('CompanyA') LIMIT 400'
  await cursor.execute(sql_request)
  rows = []
  while row := await cursor.fetchone():
      rows.append(self.obj_helper(row))
  await cursor.close()
  return rows

Result:
1;"line1";"CompanyA"; ""
2;"line2";"CompanyA";"someText"
3;"line3";"CompanyA";"someText"

Where can I dig to understand why, after a line with a correct string, a row without value for one of its column takes the previous entry ?
Thank you,
R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant