I am using Apache Derby DB (SQL) version 10.14 and this is the Derby Reference Manual: https://db.apache.org/derby/docs/10.14/ref/refderby.pdf I am trying to create a star schema and am currently …
Tag: sql-update
SQL – remove trailing “/” in url with querystring
I have table with 2 columns where in one of them an url is stored. Now I would need to update the table to remove all trailing slashes from the urls, including urls that have a query string. …
Execute two UPDATEs on complementary data at once in Oracle
I have the following table that I need to update: USER: | ID | ACTIVE | REF_COL | COL_2 | COL_3 | |—-|——–|———|——-|——-| | 1 | 1 | value | value | value | | 2 | 0 | …
How to update last record with second lat results [SQLServer]
I want to update the last entry of the table with Pass/Fail result from the second last row. And the query need to didnt fail if only one row is in the table. Here is the code what i have, but ist …
Add column moving average in mysql
I am currently adding crypto market data to my mysql database. I have the following data per minute : I would like to add the simple moving average of different time periods to the mysql database. I tried to do this calculation in python but this took to much time. Therefore, I calculated the SMA of a 50 day time
Passing a column name as parameter to a stored procedure in mySQL
I’m creating some stored procedures to manage my DB. In particular, i want to create a stored procedore to edit a column, of a specific row, but i want to do it dinamically, passing the column name as an argument. That’s what i want to do Using the parameter keyi find the specific row in myTablethat i want to edit,
How to update a database table letting two fields be empty/not filled/null
On a blog I’m coding I want admins to be able to edit a comment. This works just fine, but there’s a problem with writing a new comment because of two fields in the table that should be empty then. …
How to add a character to specific index in string
I have a db with email-addresses which are 15 characters in total. Some are 14 characters long and they have the same in common, they miss a 0 in their name at the 3th index. I had a what similar …
SQL statement: how can I pick a value only once from a table to update another table?
I wish to update table1 with any distinct value of table2 matching the same code, no matter which one or the order (value from table2 can’t be picked more than once) +——————-+ +——…
MS SQL Server Update or Clear based on matching values
I need some help in a scenario that I am working on. I have two tables Product_Staging and Product. The contents of the table are below. Product_Staging: Account_No Product_No …