query

Lucene.NET query where field exists

How do a query lucene.NET to ask for all documents where the field 'fieldname' exists? ...

Search Problem in SQL Server

I need to search in a table for items which have all of my desired values in a column i.e. I have table : ID : 1 2 3 3 2 2 2 1 1 3 VALUE : 5 6 5 3 6 7 2 1 9 0 I want to give a StoredProc a list of values for example ("6,7,2") and it returns me all IDs that have all the given values in this case it would only returns 2 If I wanted ...

query syntax lucene.net (in asp.net)

hello, i have a question concerning the query syntax from lucene.net 1) when i'm searching for "test" it works. when i'm searchng for "test-t" there are results too, but when i'm searching for "test-t*" there are no results i read, that the "-" stands for NOT - but how does this works in one string?? [in two strings: test -t --> test ...

SQL query Help with OUTER JOIN ?

Hi, I have two tables like this. Table1 Column | Type | ---------+------------------+ cod | text | value99 | double precision | Table2 Column | Type | ---------+------------------+ cod | text | value06 | double precision | and i'd like to join them so i'd have somethi...

Basic SQL join query

I have a few tables: event_type (et), event (e), event_booking (eb), person (p), person_address (p) and address_country (ac) They are joined like so: et <- e <- eb -> p -> pa -> ac Every join has a one-to-one relationship, except the eb -> p link. A row in eb can have a null instead of an id from p. I want to get all bookings, regar...

Update Query Doesnt work ?

Hello, These are my table structures tblcomment - - - - - - - - - - - - - comment_id content_id user_id picture_id comment comment_time tblpictures - - - - - - - - - - - - - content_id title picture_id I am trying to update the content_id field on pictures using this but it doesnt seem to work ? UPDATE `comments` SET com...

Nested query in from clause

Hello, I wrote this LINQ code: from workTask in VwWorkTask.Where(e => e.TaskStateStr != "A" && e.TaskStateStr != "B") join workContext in TblWorkTOBProlongationWorkContexts on workTask.WorkContextId equals workContext.Id join client in VwClient on workContext.Client equals client....

Mysql WHERE statements priority during execution

Hello, SELECT * FROM articles WHERE title LIKE '%query%' AND user_id=123 The user_id column is index. How Mysql will execute this query? I think, that LIKE have lowest priority, right? Thank you. ...

Simple Thread Sample Delphi

Hi, I am new with this stuff of Threading in Delphi. so, I am trying to make a simple query aplication that make a bit call up for the database and take a bit of time, so I want to alert the user that there is a background process and have to be patient. I tried many samples, but none of them work for me, Please, could somebody show me ...

[PHP] Multiple database in single query is possible?

[PHP] How can I query a data from two database in one statement? Please give me the easy way. and How to connect 2 database to use it? Thank you ...

SQL Select With Multiple References to Single Table

I have a SQL DB that contains multiple relational tables. There are some fields in the master table that reference another table multiple times. For example, say I have a database of salesmen who are responsible of sales for multiple states. My database has fields for State1, State2, and State3 all of which map back to a States table....

Lucene QueryParser interprets 'AND OR' as a command?

I am calling Lucene using the following code (PyLucene, to be precise): analyzer = StandardAnalyzer(Version.LUCENE_30) queryparser = QueryParser(Version.LUCENE_30, "text", analyzer) query = queryparser.parse(queryparser.escape(querytext)) But consider if this is the content of querytext: querytext = "THE FOOD WAS HONESTLY NOT WORTH T...

How to write "WHERE foo = 'bar' OR foo = 'baz' OR ..." without repeating "foo" each time

I'm new to MySQL and was wondering; instead of doing SELECT fields FROM table WHERE name="tim" OR name="bob" OR name="nancy" OR name="john" If I could do something like SELECT fields FROM table WHERE (name="tim" OR "bob" OR "nancy" OR "john") ...

How to get list of email addresses from Contacts for autocomplete field in Android ?

Ive read through the docs and searched on here, but Im not quite understanding how all the pieces fit together. Was wondering if anyone has a clear explanation of how to grab a single column of data from Contacts and have it populate an autocomplete box. ...

How i should design database ER-Diagram for this problem.

Hello! i have some specific question to solve but i can not think. I have 5-6 statements that I need to store in my database. This system like a news feeds. Statement 1 : A installed this website. Statement 2 : A added store R in provinceX Statement 3 : B reviewed store R Statement 4 : A edited store R Statement 5 : A added product...

Querying for a value existing in a model's list property in AppEngine

A sample model: class Foo(db.Model): id = db.IntegerProperty() bar = db.ListProperty(int, required=True) How can I query using either Query or GqlQuery to return all Foo entities that have a given value in their bar property? If I have a list of ids, is there a single filter that will return all entities whose id property...

How many queries in one webpage?

How many queries in one webpage is good performance? If that page is home page that is viewed many times. and how about.... $sql1 = mysql_query("SELECT * FROM a", $db1); while($row = mysql_fetch_assoc($sql1)){ $sql2 = mysql_query("SELECT * FROM b WHERE aid='a'", $db2); $a = mysql_fetch_assoc($sql2); } is it good? acctually I can ...

how to sort data in ssrs for sharepoint list in query

I have sharepoint list query http://schemas.microsoft.com/sharepoint/soap/GetListItems {F17A7ACF-C419-45B0-B0B8-1788D7EC462E} * I want to sort data as per my requirnment in this query how can I do that? ...

SQL query with week days

Hi I would like to know what is the best way of creating a report that will be grouped by the last 7 days - but not every day i have data. for example: 08/01/10 | 0 08/02/10 | 5 08/03/10 | 6 08/04/10 | 10 08/05/10 | 0 08/06/10 | 11 08/07/10 | 1 is the only option is to create a dummy table with those days and join them altogether? th...

MySQL query for navigation CMS

I'm currently trying to work out a way to make my navigation items moveable via dynamic mysql/databases. Currently I have a table looking like this id menuText posId int random text 1-999 number The thing is, depending on the number in posId. The menuText will be sorted by it. What I'm trying to do is add a function to ded...