Are you including what table you’re selecting from?
SELECT *
FROM Customer
WHERE Customer.Info LIKE ‘A0001%’
If you are, is Customer.Info the whole column name or is the Customer part the table name? If it’s the whole column name, it will likely need to be wrapped in [ ] as the period is probably a reserved character. At least it is in TSQL, I’m not familiar with Postgre.
Yes customer.info is the whole column name but it contains a variety of fields separated by a ~ character which I unpack later in the process and I am using the first five characters as the selector.
I am importing from a specific table called “processed_data new_data_translated”.
Hi @PaulBoyes. I don’t know PostgresSQL at all, but using the LIKE operator in TransactSQL (used by Microsoft SQL Server) is a slow operator. I’d prefer to use a LEFT-= operator instead, so your WHERE clause would be something like
WHERE left(Customer.Info, 5) = ‘A0001’
Regardless, if you have access to a DBA (or someone else) who regularly accesses your database, get a copy of one of their queries that works and adjust the values as desired.
Again, I don’t know PostgresSQL at all, but I doubt you should have brackets around your table name after the FROM. I’d follow-up with your DBA can help craft a query that works in your environment.
Greg