Skip to content

Tag: mysql

SQL query that has a lookup field

I have a table Invoices that has 3 fields: InvoiceProductCode InvoiceQuantity InvoicePrice InvoiceProductCode can be blank, but if it’s not blank, I would like it to be filled with a value from …

Error in SQL syntax [function in node-red]

I’m trying to post the data into database through node-red but I got this error. “Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘insert into customizations(custom_id, product_id, pa…

Is there a flexible way to specify ranges of dates?

I am working with MySQL. I have some queries that begin like this: I also sometimes need to run the same query, but with each date range being a week (Monday to Sunday), or a calendar month. Moreover, sometimes there are 100 or more of these, which is quite prone to typos in addition to occupying a lot of lin…