I’m accessing a Microsoft Access database using ODBC. According to the w3schools SQL tutorial, the ANSI-92 wildcard for “any character not in brackets” should be ^. However, their own …
Postgres – how to displays data for the previous year?
I have sql select name, tanggal, status from tbl_person where status = ‘PROSES’ and date_part(‘year’, tanggal) = 2021 – INTERVAL ‘1 YEAR’ tanggal is date 2021-01-01 I want to …
Javascript won’t work properly with my form
So I am currently doing a project for our class, in which I have to display something that I previously stored in a database on a separate page. I chose to display every dataset, as it is the easiest to do. With PHP I implemented a foreach loop which is supposed to show each dataset with a button “EDIT&…
SQL Statment fails to run with Syntax errors using Flutter/Dart and PostgreSql 12, even though exact same query runs to the same db from python
Hi Flutter/Dart/PostgreSQL noob here; I have an SQL statement which is running fine from a python/Flask application, I am using some variables within it which are added in at runtime to the statement before it is sent to the db.This is the python version; As I said this works fine apologises if I have not add…
Calculate share of value per day per country
DB-Fiddle Expected Result: I want to calculate the sales share per country per day as it is done in the question here. However, since I added the column channel in the database I am not getting the right shares anymore using this query: How do I need to modify this query to get the expected results? Answer he…
Column name is ambiguous on UPSERT action
I am trying to run an UPSERT query string on a postgres db – insert into business_data_test (select * from business_data_tmp) on conflict(phone_number) do update set average_expense=(…
What does the “i” stand for in this SQL query?
I’m looking at a bunch of SQL query’s made by another individual and am trying to interpret how they were made. I’m fairly new to SQL so its involved a lot of Googling, its also my first time posting …
Upload data into sql table
this is the code given to me: protected void btnAdd_Click(object sender, EventArgs e) { divTempForm.Visible = true; rptMailTemplate.Visible = false; …
SQL query filter down to only applicable rows
How would I select a query like this? I am a bit confused because this would return nothing since any of the rows do not fulfill any of the “where clauses”.. What I would like is the answer …
How to merge different rows in SQL
I have a table with playid, userid, created, and stopped. I want to merge certain rows by keeping the earliest created and the latest stopped within 120 minutes from the earliest created. See the …