I have a table that looks like below after performing certain joins: create table test(id varchar(10), sub varchar(20)); insert into test values(1,’a’) insert into test values(1,’b’) insert into …
Tag: sql
Why do I fail to save data in my application?
I am a student and started working on android studio recently. I don’t know about it much. I am working on an application where I save the item name and its amount in the database and display toast …
Merge two tables in one SQL query and make the date values unique
I have the following two tables which you can also find in the SQL fiddle here: CREATE TABLE Inbound ( Inbound_Date DATE, Product TEXT, InboundType TEXT, Quantity VARCHAR(255) ); …
LinqToSql OrderBy has no Effect
I am using a LinqToSql-DataSource for a GridView in this way: Now i want to order the Selection. At first the “stammVerein”-Column of Table “mitgliedschaft” descending AND the Column “eintritt” of Table “mitgliedschaft”. I have tried several ways: AND: AND: But …
One column in a table referring to another column where there are duplicate data in SQL
I want to build simple database system about bike (or bicycle) rental store. Here are the tables, and columns in parantheses: (MNr stands for model number, CNr stands for customer number). Models are bike models, Bike table shows data on each particular bike. There can be several bikes of each model, to disti…
Need to copy all fields value of specific item on table to another item in SQL Server
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 (…
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
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̵…