Structured Query Language (SQL) is a language for querying databases. Questions should include code examples and table structure. This tag refers to the standard language, not for questions about specific vendor extensions, like MySQL or Microsoft SQL Server, so if you think your question relates to ...
0
votes
0answers
21 views
Sum returning null
I am having a problem with a Ruby SQL look up function: it always returns a null.
Here is the terminal output:
SELECT COUNT("point_store_items"."point_cost")
FROM "point_store_items"
INNER JOIN ...
0
votes
0answers
8 views
perform 2 way sync between online and offline databases
I'm building a webapp that has a mobile app companion. The mobile app can be used in offline mode.
What is the best way to keep the central database and the local database on the client apps in ...
0
votes
1answer
16 views
How to move data between 2 tables / with different columns in different databases with multiple values
INSERT INTO a2.cat (id, img) SELECT category_id, category_id FROM topshop.category;
all I need to insert plus values in the column img from the category_-id
INSERT INTO a2.cat (id, 'c'+img+'.jpg') ...
1
vote
3answers
25 views
SQL Select Entries with same Column Values
Imagine that I have a column like this:
Var: 1, 1, , 3, 2
-
Name: Ben, John, Josh, Bill
How can I select Entries with the same VAR column Value? Like, if I want entries with value 1 in the VAR ...
0
votes
0answers
12 views
Update another table with the newly created foreign key
Could somebody advise what code should be added in order to ensure that the created new id for a one table will be updated in the table from where the ID is used ( the id from table Appointments has ...
0
votes
0answers
24 views
Building graphical output from data on SQL database
Hi there I'm looking for a solution to build a series of charts/graphs from data stored on mySQL DB. The data is being pushed to DB by an iPad application.
I am proposing to build a web based ...
1
vote
1answer
38 views
SQL/MySQL Query Assitance
I'm writing a query to list the first and last names of all staff who have ever taught any of the same course as Kim (Staff_Fname) Cox (Staff_Lname) or have ever taught in the same room (Loc_id) as ...
-1
votes
0answers
9 views
SQLite: Importing csv with large number of columns
I am just starting out with SQL and SQLite. I am aware that one can import a csv as a table by (1) creating a table with the necessary columns, (2) designating the delimiter/separator, and (3) ...
0
votes
0answers
22 views
Access Query Visual Basic
I am trying to run a query in my VB program that will get the contents of a column. Basically I'm trying to search a column to see if it equals something and if it does, return the value. The way I ...
0
votes
0answers
7 views
Returning multiple resultsets with dataentity framework 5
I am using ef5 and am trying to return multiple result sets with the method GetNextResult<>() however it doesn't seem to be working.
My sql sproc is:
select * from Questions
select * from Skills
...
0
votes
0answers
20 views
How can I specify arbitrary filters on sql queries?
I'm building a rest interface using dropwizard which comes with, among other things, Jersey and JDBI. Jersey allows me to specify URI endpoints as java methods:
@GET
@Path("/path/to/resource")
...
0
votes
0answers
13 views
What type of SQL does Red Query Builder generate?
I have been trying to use Red Query Builder visual query builder on a project, but we are finding that the SQL output is not consistent with the SQL our database (SQLite) expects. That makes me wonder ...
0
votes
2answers
24 views
TSql LIKE search on comma delimited data
Quick question on LIKE searches. If I have a column with a value 'Analyst,Trainer' and another column 'Workflow,Analyst,Tester,Trainer', I want to check if the values in the first column are in the ...
0
votes
1answer
25 views
Not able to get matching values from database
I have a database with two tables outdomain(domain) and uploaddata(username,domain). I have stored the values in them directly from a txt file. Now I want to select the matching data from the two ...
0
votes
1answer
26 views
How to extract the higher values in sql query
I have a question about sql. If i have a table with some information like that:
City Code
New York | 10A
New York | 10A
New York | 20A
L.A | 20A
L.A | ...