Answer In your code you are missing the semicolon in insert statement & radius value assignment statement – Demo.
Tag: sql
Use column references in Oracle SQL select query to avoid re-calculation
I want to create a summarised database backup report, which includes data from multiple database tables which has no relation to each other. For example, I want to include the name of the database from v$database view: And the size of the database: And consider there is no common column between those two view…
Remove specific value in a string with SQL or grafana
Displaying some data using free version of grafana. The string that has to be displayed looks like this: 5555.7777, but I only want to display 5555. Are there any functions to remove .7777 in SQL or grafana, so that the value that will be displayed only looks like this: 5555. Thanks in advance. Answer You sho…
Compare date of input type datetime with date in SQL using flask
I use this .html page to get input type datetime: And my .py code: my DB: DB Example I want to show only all data of ‘sessioncreate’ when only date of ‘sdate’ equal of today date How can i achieve that? Answer Use the DATE() function. This way you can convert the DATETIME in your datab…
Present URI in database as clickable link
I have a table in a SQL Server 2019 that stores URI’s like this: These values are stored as nvarchar. Is there a way to make these clickable? So that, when this table is for example read by PowerQuery users only have to click the link to open the file? It is assumed that only those filetypes are allowed…
Pivot monthly data from the past years
Here’s the data from my original query: Store Name Month Transaction Count 0001 – Loc1 2018December 245 0002 – Loc2 2018December 261 0001 – Loc1 2018November 232 0002 – Loc2 2018November 218 0001 – Loc1 2018October 123 0002 – Loc2 2018October 144 0001 – Loc1 201…
GROUP CONCAT and LEFT OUTER JOIN to split
I’m working with SQL Workbench. This is an example of the tables I have: I have not created this DB and can’t modify it. Each building corresponds to a site, so it contains a KEY to such site. Same with levels and buildings. I am trying to get this result the first two columns are easy, but I̵…
Updating Date in Access
I want to simply update a date column within a table where a status exists. Here’s what I have I have tried the following Nothing has gone through, no errors, just not updating. I can update the field manually. Answer Answers were correct, silly issue about the Trust Center ‘enable’ bar not showing, therefore…
How to write an optional condition in SQL Join
I have two tables. One is the Transaction table and the other is the PriceBook table. I want to select the price from the PriceBook table, matching with the ItemID, Assortment and UnitID with Transaction table. But the UnitID match is optional, so if there is no match with UnitID, I want to have the matching …
How to check the current row with next row and update the current row not using while loop and cursor
Is there any way other than using the cursor or while loop to check the current row with the next row and update the current row and do this through all rows in the data set? For example, this is the table we have: This while loop go through each row and update @new_value based on some conditions and then