A request to retrieve information from a database or other information system. This tag can be used to refer to SQL queries against a database (SQL-Server, Oracle, MySQL, etc.) or for filtering and manipulation of memory data structures (jQuery, Linq).
0
votes
2answers
12 views
Checking value of YES/NO datatype in Access
In one of of table, I have field that stores the value in YES/NO data type.
I am trying to check the value of the field using the following query but receiving error as shown in the picture below.
...
1
vote
3answers
20 views
Searching multiple columns in MySQL for automplete results
I'm using the following code along with Jquery autocomplete to populate the search suggestions on my site..
$results = mysql_query('SELECT DISTINCT artist FROM mm_albums WHERE artist LIKE "'. ...
0
votes
2answers
23 views
count data from multiple year and group by month
I want to make chart, here's my table;
mrp
+------------+
| date |
+------------+
| 2011-10-xx |
| 2011-12-xx |
| 2012-01-xx |
| 2012-05-xx |
| 2013-01-xx |
| 2013-02-xx |
+------------+
I ...
0
votes
1answer
21 views
PHP: index operations inside query possible?
I have an array ($updateInputs) with 6 elements, 6 / 2 which each 3 belong to a single row in a database table. What I'm trying to do is put a query in a while loop so that every iteration, the index ...
1
vote
1answer
18 views
Split the field value in a mysql JOIN query
I've got a column "code" which may have a string of multiple values e.g. "CODE1&CODE2"... I just need the first one for my JOIN ... kind of like code.split("&")[0]
SELECT myTable.*, ...
1
vote
1answer
12 views
Solr Date Regex Query
I want to use solr's regular expression capabilities to query a date field.
I'm trying to make a simple query like the following, but I get 0 results and no errors.
...
0
votes
2answers
31 views
How to order by this query?
I have table of likes/dislikes on game: id, game_id, type(like/dislike), time
Table example: Image Link
This code gives me the last week games the had likes, order by their likes count:
$limit = ...
1
vote
2answers
31 views
Display all records even if NULL
I have a view below that has everything I want to display, however it will only display if everything is added for a particular movie in every table(if that makes since). Like if movie is added, the ...
2
votes
1answer
23 views
How to pick a value that exists only between range of data entries?
I have a database containing specific dates data like:
Date Event
----------------------------------
1st January 1980: Time of the Moon
21st January 1980: Celebration of Columbus
...
0
votes
1answer
8 views
How can I set a query result in a ComboBox in microsoft access?
I have a form where I added two combo Box named 'Pname' and 'CompanyNameComboBox'. When I change or update the value of 'Pname' then 'CompanyNameComboBox' will be populated with the following query ...
0
votes
0answers
4 views
SQLAlchemy hybrid_method - Passing Obvious Argument
I am working with python and sqlalchemy. I have one table named Team and another named Game. The Game table has columns "away_id" and "home_id" and the Team table has the column "team_id". I just ...
0
votes
3answers
18 views
MySQL: Substract Timestamp for Different IDs
Let's say I have one table with an ID, timestamp and an event.
For example: I habe a Book with the ID 1, another with ID 2. Both are lent at a specific timestamp, marked in the table by event 1.
...
1
vote
2answers
27 views
Counting Instances For Each Combination of Another Field
I have a table with the following fields:
OfficeID
PropertyState
PropertyAddress
PropertyCity
I want to find all of the properties where more than 1 OfficeID opened a file for a specific address ...
0
votes
1answer
13 views
count unique for field in crosstab query
I've searched for an answer to this, but can't seem to find anything that works to do a unique count in crosstabs. The closest I could find was: select count(myField) from (select distinct myField ...
0
votes
1answer
47 views
Using a variable ColumnName
I wrote this:
IEnumerable<DataRow> query =
from user in ObjDT_usuario.AsEnumerable()
where user.Field<string>("Name").StartsWith(query,true,null)
...