The Problem Running an UPDATE query with pattern matching is not updating all the values on the desired table. This is using Office 365 with the defaults for Access, so no split tables or SQL backend …
Display all data grouped by date in a particular timeframe
Currently I have 2 tables, a listing table and a logs table. With the following query I’m trying to get the listings of a product on a particular day, and it returns the right output. with X as ( …
What is this SQL query doing?
I wish there was a more general language question here, but the whole query feels specifically confusing. 😛 I’ve never seen one SQL statement followed by a comma (rather than semicolon), followed by …
Databricks error when change type column from string to numeric
I have a error like: com.databricks.backend.common.rpc.DatabricksExceptions$SQLExecutionException: org.apache.spark.sql.catalyst.parser.ParseException: no viable alternative at input ‘alter table x9concsheet5 Add netto_resultaat'(line 1, pos 29)* when i run this sql command in databricks: %sql alter tab…
Delete duplicate records on SQL Server
I have a table with duplicate records, where I’ve already created a script to summarize the duplicate records with the original ones, but I’m not able to delete the duplicate records. I’m trying this way: The idea was to take the last record of each COD_PLANO_PAGAMENTO and delete it, but thi…
How can I print the connected database information (such as db name) in PHP?
I am trying to execute an SQL query in PHP but even though the DB has been connected it returns 0 rows, but when I try to execute the same query in MSSQL it returns a row. I have tried the one below but it returns just Boolean false: Here is how I execute my query: I just want to
Insert multiple values from ListBox with stored procedure
I have two related tables, the first called postaDip (IDpostaDip, CODdip, CODposta, from) and the second called cassPosta (IDposta, Desc). I am trying to insert multiple rows into the postaDip table through a listbox that loads the table cassPosta. For example I would like to insert multiple lines of as many …
SQL result dense Rank in revolving group pattern
Say I have a table like store date is_open Bay 1/1/2022 true Bay 1/2/2022 true Bay 1/3/2022 true Bay 1/4/2022 false Bay 1/5/2022 false Bay 1/6/2022 false Bay 1/7/2022 true Bay 1/8/2022 true Bay 1/9/2022 true Walmart 1/7/2022 true Walmart 1/8/2022 false Walmart 1/9/2022 true I want them to use partition by and…
Updating HTML Table Every 60 Seconds
I am trying to use an ajax call to update an HTML table every 60 seconds on a flask app. I am very new to flask and jquery, and followed this similar stackoverflow question: Python Flask Refresh table every 60 seconds However my table isn’t displaying any data. Currently my app.py file is setup as below…
Pagination with grouping
I have a table with over 800K records. This table needs to be “grouped by” a certain column. An example would be: However, with pagination, things get complicated. I want to show 50 rows for every group. This means that if I have the following data: Id Color Name 1 Red Paper #1 2 Red Paper #2 3 Re…