I am using Microsoft SQL Server Management Studio 2018 for my queries and I am trying to get the total quantity of ‘Cavity’ part types for each order and I have notice some anomaly for 1 order. I am 99% sure that it has been properly added to the SQL database as each order is first created in Acce…
How to bring columns to a table from another table by the Id?
I have this tables People, Ticket, and Report. I would like to replace the ForeingKey idPeople with columns Name and Age from People table. In the Report table replace the Foreing Key idTicket with ticketCol2, Name, Age from the previous table Ticket with replaced columns (idPeople by Name, Age). And I the re…
For loop in Jinja2 splitting the chars in nested list, instead of returning whole of nested list
My doubts list is [[‘a’,’b’,’This is a sentence’]] My HTML (Jinja) is My Flask is :- x is giving a,b,T,h,i,s,i,s,a,s,e,n,t,e,n,c,e [Each char one iteration] I expected a,b,This is a sentence. [Only one iteration] How do I resolve this? Thanks in advance! Answer You have dum…
How to create new rows courresponding to current rows in table by changing column value
My Table is emp_activity id emp_id date time status —|——|————-|———-|——— 1 | 1122 | 20-08-2019 | 09:30 AM | login 2 | 1123 | 20-08-2019 | 09:30 AM | login …
How to create Seq No for repeating rows from Select query?
I have a table called Test with some repeating rows with column called Col1. The Sequence will reset to 0 when hit A. I want to create a sequence no as Result something like below: Col1: A B B B A B …
how to insert data using trigger
I got question about using trigger to insert data, for instance, I do have two tables, and second table has attributes and records with table, except additional two attributes, like below: CREATE …
Oracle APEX – Download hidden SQL query into CSV
I am trying to create a button on a page in my application that will download the full table I am referencing as a CSV file. I cannot use interactive reports > actions > download CSV because the interactive reports have hidden columns. I need all columns to populate in the CSV file. Is there a way to cr…
Case statement in where clause oracle
In where clause i have two option 1) status = ‘N’ and type = ‘1’ and 2) status = ‘Y’ and type = ‘1’ based on parameter I need execute one option: where case when (carName = :…
How to verify if array list is empty in SQL
I have a multilist field returning a list of values. My query is filtering the list using IN (list), but if the user do not select anything is list, it returns an empty list, or null (I can’t see). …
Postgres FOR loop syntax error at or near
I’m trying to write rows into an array from table_a and table_b and insert it into a table. This is my function def: CREATE OR REPLACE FUNCTION format() RETURNS void LANGUAGE ‘sql’ VOLATILE COST 100 …