I am trying to optimise the speed of a migration on a large table (250K objects). The goal is to add to each row a user field based on the user of an object related to this row: I tried using an F expression but sadly django won’t allow relations in them. Note that I am mostly a beginner in
Create temp table in HANA and put data using WITH clause
How to put the result of this to temp table in HANA? I’m new to HANA. Right now it return correct data, but I need to put that or insert that on a table to connect it to other tables. WITH monthss(“…
PostgreSQL escape characters when using Excel formula
I’d like to generate a query like this: select id, ‘=FKERES(B2;’D:nyunyuka[kotyog.xlsx]Munka1′!$A:$B;2;0)’ as excel_formula from table; I learned that I have to escape the ‘ character using E but …
Count based on multiple conditions using sqldf
Hi all I’m writing a sql query on R using sqldf and seem to hit a roadblock. I have a table with an Id column, two dates columns and a grouping by column. The query I’m writing is From this query the result I’m getting is Whichis correct based on the query. What I want to achieve is if my
Syntaxerror in CREATE TABLE without any table creation but in procedure creation
I’m using Microsoft Access 2003, new to SQL tho. I have no idea why this wouldn’t work, google won’t help me either. The table “K_Lehrer” exists, and the code I have here is the only thing I wrote. My code is Error (translated): syntax error in create table statement error with c…
sum of consecutive values
I have following data in a Teradata table. My requirement is a consecutive sum between OFFLOAD_SECONDS =…
Oracle SQL merge tables side by side
I have 3 select queries which i would like to merge side by side. The common column is name. I dont want to use UNION ALL solutions since my select queries might have many columns. name columna e1 1 name columnb h1 2 name columnc t1 3 The output i am looking for is: name columna columnb columnc e1 1
Condition on SQL Server query
The below SQL query is in a SQL Server 2017. I want when the value of UtenteCliente.CostoFatturazionePersonalizzato is 0 or null is configured with the value of Utente.CostoFatturazione, to do this I use the query below but the result always returns null. How can I do this? SQL Query: Answer You can use CASE …
manage reference table with foreign keys on new incoming data in other table
I have a reference table (in Postgres) and multiple other tables which can reference data in/from this table. It would make sense to use foreign keys to manage this, but I was wondering how one could manage updating the entries in the reference table in the best way when new values come in. I guess it could b…
Select count on Oracle Query based on distinct condition
I am newbie with oracle pl/sql, right now using oracle sqldeveloper, i need help for my homework, how to make the column number 2, 3, 4, 5, 6, … count based on first value column, the DISTINCT OWNER ? can anyone help me? or suggest me with some hint? this is wrong, i need the count n other column based