Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Database Error WHERE Clause
#1
I'm trying to include a WHERE clause into this query but it gives me the error below.  It works if I remove the WHERE clause.  Note: it also fails if I try to include any of the column names (file contents below) in the select clause. 

Can anyone shed some light on this here?  I'm just trying to learn how to query a text file like a database.


Macro Macro6
Code:
Copy      Help
Database dbt.Open(dbt.CsText("C:\Temp\"))
ARRAY(str) at
dbt.QueryArr("SELECT * FROM move.txt where rep=10" at)
out at
Quote:Error (RT) in <open ":3116: /64">Macro6:  0x80040E10,
    [Microsoft][ODBC Text Driver] Too few parameters. Expected 1.    <help #IDP_ERR>?
Quote:Date    Rep    Total
7/19/2022 7:48:34 AM    10    600
7/19/2022 8:18:56 AM    10    600
7/19/2022 8:39:38 AM    10    600

 
An old blog on QM coding and automation.

The Macro Hook


Messages In This Thread
Database Error WHERE Clause - by ken gray - 07-19-2022, 02:48 PM
RE: Database Error WHERE Clause - by Gintaras - 07-19-2022, 03:14 PM
RE: Database Error WHERE Clause - by ken gray - 07-19-2022, 06:06 PM
RE: Database Error WHERE Clause - by Gintaras - 07-19-2022, 06:28 PM
RE: Database Error WHERE Clause - by ken gray - 07-19-2022, 07:59 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)