I have a specific query with joins and aliases, and I need to retrieve columns name for a REST request in Talend. I’m using Talend Open Studio for Data Integration 6.2 and I’ve got an Oracle 11g …
Foreign Key Refers the Primary Key Columns of Same Table
I have two tables like this: Table 1 – CivilOffices Table 2 – Offices I want to query all the offices with their respective parent office name. But when I tried to query this, the query returns the parent office id instead of parent office name. Here is the query I used. Here is the result Instead…
Errors when trying to push to OCI db
Trying to post to OCI db based on data from an error log. Get the ORA-24374 error when trying to execute. “Warning: oci_fetch_array(): ORA-24374: define not done before fetch or execute and fetch …
What is the impact of altering a table and making an Identity column the Primary key?
I am fixing issues on a new database, set up by a third party. SIDE NOTE: I have just joined the company that originally hired the third party. The new database is less than two weeks old and was …
How to join these tables for a full result set from all tables?
I have table A of Entities I have table B of Items I have Table C of Entity-Items, and their associated configured values. I’m looking to write a view that will return me a row with each …
C# – How to perform a SUM() / SUM() in Linq
I’m trying to perform this SQL SELECT in my C# Application: SELECT SUM( a.VALUE_A) / SUM( a.VALUE_B) FROM “TABLE” a WHERE DATE_COLUMN = to_date(’12/05/2018′, ‘DD/MM/YYYY’); Using this C# …
SQL Query to find the next staus and get time between them
Im arguing with a sql query in bigquery, i have a table with multiple ticket numbers along with all the rest of the data from the tickets. Im trying to find out who long a ticket sits in a particular …
Subtracting values of columns from two different tables
I would like to take values from one table column and subtract those values from another column from another table. I was able to achieve this by joining those tables and then subtracting both …
How to check if a string in one field exist in every element of a comma separated field
I have a table which contains two fields. The first is name of type string. The second contains one or more strings separated by comma (but it can contain a single string with no commas at all) I …
Fetching data from XML document into SQL table, empty table when using OPENROWSET for retrieving attribute from XML
I need to insert attributes from a XML file into a SQL table. I have roamed Stackoverflow to find a solution but nothing I tried seems to work. I have tried with and without defining and using the …