I’m looking in the sql db and I can see something that resembles orders inside wp_posts . However, I would expect them to be inside the tables beginning with wp_woocommerce. Can anyone shed some light on this phenomenon? Cheers Answer In woocommerce orders are modelled as a custom post type so they are …
how to get field names to each be on their own line
There’s a plugin called SQLUtilities that will format your SQL nicely; however, it’s really bothering me that it cannot put a column on it’s own separate line: The result that I want is this:
I am having issues combining `with rollup` and `GROUPING`. How to correct?
I recently was introduced to a feature called with rollup. I am adding into a report I use in Excel for trends. Issue is, I want to have the t0.DocDate ordered on date from oldest to newest date. …
Postgresql: In-Row vs Out-of-Row for text/varchar
Two part question: What is Postgresql behavior for storing text/varchars in-row vs out-of-row? Am I correct in thinking that with default settings, all columns will always be stored in-row until the …
SQLite not selecting date
My SQlite database in my app stores the date in the format of yyyy-MM-dd HH:mm:ss. I want to query a transaction that happened on a certain month of a year but my code is not working : Answer After some research I discovered that for some reason I had to do some casting for it to work.
Why am I receiving “Conversion failed when converting date and/or time from character string.”?
I am wanting to total the days in the query for [# of orders] & [total revenue] when I run this query. But I am receiving this error in my sql server “Conversion failed when converting date and/…
SQLite – How to perform COUNT() with a WHERE condition?
I have a products table with these fields: _id, product_name, priority and shelf_id. And I have a shelves table with these fields: _id and shelf_name. Currently, I have this SQL which returns a resultset showing the name of each shelf along with the number of products within each shelf: What I am trying to ac…
Oracle SQL query efficiency Improvement
I have a query which is never finishing (left running for over 24 hours and was still going). Now there isn’t a huge amount of data in each table so I can only assume it is the efficiency of the …
How to format a SQL string into a readable block of code that is well formatted and more easy to read
When I am writing code that builds a dynamic SQL statement I often use a query builder tool such as that provided by MS Access to generate the basis of the statement that I will then use in my code. …
Table description in Sqlite expert database
How to get the table description in Sqlite Expert Professional? I tried: Desc Table_name exec sp_help Table_name sp_columns Table_name sp_help Table_name Execute sp_help Table_name All commands …