SQL Server database snapshot: I need to copy this selected article data to another article. Need a query in SQL to solve this issue. Answer If I understand, you wan the IEDetails table to have the values for art_id = 7545 copied with a different art_id value while still retaining the original values? With the…
Any suggestion for optimizing BCP export from SQL Server using Python Subprocess
I’m studying BCP for export large amount of data (one time for initial and plan to do it in day-to-day job). Source data are in SQL Server tables, which consist of some small tables to larger ones (…
How to show the results as zero when there is no record
I have the 3 tables below with the following data create table model ( id int comment ‘The model id. Primary Key’, name varchar(50) comment ‘Models name’, price int comment ‘The price of the model’, …
left join in hive
would anyone kindly answer the question below? Is left join outer join or inner join in hive? (Do we need to type left “outer” join in order to do the outer join? or simply left join works as outer?) Answer Just like in most, if not all, databases, the outer word is optional in left [outer] join, …
How do I check if a variable is null and assign it a value if it is, in an Access query?
I’m not a big Access user, but I need to work with it from time to time. Now I have run into a, for me, completely new task with Access. I can solve this type of problem with SQL in MS SQL Server. But the SQL syntax in Access doesn’t recognise my SQL code at all so I guess it’s
MySQL request for combining and searching in 2 tables
I have 2 tables. One of my tables with users is: id name longitude latitutde —– —– ———– ———– 1 Mark -76.316528 40.036027 2 …
MySQL bulk insert on multiple tables
I have a MySQL database with 2 tables products and product_variants. A product has many product variants. Here a sample: products +—-+——+ | id | name | +—-+——+ | 1 | Foo | | 2 | Bar | …
Self-Joining across nested Records in BigQuery
I’m trying to do some joins/aggregations between nested fields in single table and running into both SQL problems and the “Correlated sub queries that reference other tables are not supported unless they can be de-correlated, such as by transforming them into an efficient JOIN” error. I̵…
Oracle SQL/PLSQL: Hierarchical recursive query
I have asked very similar questions before but still haven’t achieved the correct result… third times the charm but I now have a stable parent-child relationship to work with. Every row in the multi-level data set has a cost. For a specific row I need to find the lowest level and roll-up the cost.…
Spring JPA – Prepared Statement Queries?
I’m building a Spring REST server application and I’m doing some native queries to retrieve data from my database. From the teaching in school, they suggest to make all queries prepared statements, to stop the user entering harmful SQL into the input boxes. I’ve tried to do some research, bu…