I’ve built different get methods using body request to select an id (with raw json). However, as I learned that get methods doesn’t support body request, I would like to change so that I can use params in postman insted. However, when I do it now, I get an 415 Unsupported Media Type. Here’s …
Tag: sql
Add OR in WHERE
I have SQL query: And I want to adjust it so it looks for p.post_status = ‘publish’ OR p.post_status = ‘t_active’. I tried: But it didn’t work. How do you achieve this? This is an entry level question – SQL is not my jazz. Answer You need to use brackets to make clear what …
Using HAVING COUNT(column name) NOT working as expected
I have the SQL statement, working in SQL Server 2016, below where I’m getting records from an INNER SELECT UNION ALL statement and in the OUTER SELECT I’m trying to extract those records that meet the HAVING COUNT code however, my code is bringing back no records. Here are the records from my INNE…
Database in WPF and Windowformapps
I’m developing applications using either WPF or WindowFormApps that can store and manage database. The question is that how can i create an in-app database or which kind of database should I use that can run whenever I install it on other devices. My application cannot run on other devices since there i…
how to iterate through geojson elements
i want to execute the code in this question https://gis.stackexchange.com/questions/142391/storing-geojson-featurecollection-to-postgresql-with-postgis/142479#142479 but when i run the app i receive the following error: please let me know how to fix it. code: attempts: Answer From the database perspective the…
How to connect a Spring Boot service from Google Cloud Run to SQL cloud instance?
I have created an SQL instance. It is working. Then, I have uploaded the docker image for my Spring Boot app on Container Registry. My goal is to run the app on Google Cloud Run, but in order for it to work, it has to connect to the database. Thus, when creating the service I give it the image and
How to use wm_concat one a column that already exists in the query?
So… I am currently using Oracle 11.1g and I need to create a query that uses the ID and CusCODE from Table_with_value and checks Table_with_status using the ID to find active CO_status but on different CusCODE. This is what I have so far – obviously does not work as it should unless CusCODE and ID…
Oracle SQL: Case statement
I am not sure where to put the case statement whether in select or where clause. I am trying to get data from table c when cnt_subj = MEPC_PL then metric_id will be equal to 6135 from table m. Can anyone help? Thank you in advance! 🙂 Answer I think this is the query you are looking for: Do you
SQL – Using CASE statement with multiple IS NULL, IS NOT NULL
I’m having difficulties writing a case statement with multiple IS NULL, NOT NULL conditions. I have the case statement below, however the third condition (WHEN ID IS NOT NULL AND LABEL IS NULL THEN TITLE) does not seem to be recognised. When Label is null, the statement does not pick up title. Is there …
Having trouble creating set-based query to create table data instead of doing it procedurally
Given table settings with unique key of id+appId id appId name 1 app1 setting1 2 app1 setting2 I have created new entries and the table looks like so id appId name 1 app1 setting1 2 app1 setting2 3 app2 setting1 4 app2 setting2 Then given table user_settings that connects settings to a user userId settingsId …