query

Oracle 8i Query Help

Hi all, I have a table that looks something like this: ID | STATUS | TYPE ---------------------------------------- x123 | A | High School x122 | I | High School x124 | F | High School x125 | A | College x126 | I | College x127 ...

Lists and MySQL queries

Would it be possible to run a MySQL query pulling the names of locations from a table, inserting them into a dropdown menu and then automatically generating a URL for each one e.g. blablabla.bla/index.php?location=blablabla every time the page loads? Any help is appreciated. ...

how to sort query result in php?

Hi, I am trying to sort query result into an array. I have following query. "select s.*, a.* from students left join addresses as a"; it returns s.id s.name a.id a.student_id a.address I would like to make above result into an array with s and a keys. array( "s"=>array("id"=>"value","name"=>"value") ,"a"=>array("id"=>"value...

Subsonic dynamic query expression

Hi all, I am having a few issues with trying to live in a subsonic world and being a subsonic girl when it comes to subsonic expressions.... after reading http://stackoverflow.com/questions/765896/subsonic-query-conditiona-or-conditionb-and-conditionc it would appear i am not the only one with this sort of issue but hopefully someone (...

NHibernate query for matching all tags

Here are my relevant classes: public class Item { public virtual int Id { get; protected set; } public virtual IList<Tag> Tags { get; set; } } public class Tags { public virtual int Id { get; protected set; } public virtual string Name { get; set; } public virtual IList<Item> Items { get; set; } } These are mapped...

Lucene BooleanQuery

How to use booleanQuery with StandardAnalyzer in Lucene Search? ...

sql server 2005 - select records from tbl A contained WITHIN a text field of tbl B

Hi, I'm trying to work out a SQL Select in MS SQL 2005, to do the following: TABLE_A contains a list of keywords... asparagus, beetroot, beans, egg plant etc (x200). TABLE_B contains a record with some long free text (approx 4000 chars)... I know what record within TABLE_B I am selecting (byID). However I need to get a shortlist of ...

Sharepoint Lists.asmx: query returns deleted items?

Hello All, While running caml query's against the sharepoint list.asmx service, I have this strange behaviour that the GetListItems method also returns deleted items; found item: test found item: already done found item: recurring found item: recurring event 3-4 found item: Deleted: recurring event 3-4 found item: Deleted: recurring ev...

Selecting a joined entity with an ICriteria in NHibernate

Hi, In HQL I can do something like this: select roleHeldByOwner.TargetPerson from Person roleOwner join roleOwner.RolesOnPeople roleHeldByOwner where roleOwner.Id = :roleOwnerId How can I achieve the same thing in a Criteria query? Specifically the selecting of something that isn't the first entity in the From clause. Thanks, Matt ...

SQL Server truncation and 8192 limitation

Hello, In SQL Server 2005 I am trying to query a varchar(MAX) column which has some rows with text data that exceed the 8192. Yet, In Management Studio I have under Tools --> Options --> Query Results --> Results to Text --> Max numbers of characters displayed in each column = 8192, which is a maximum. Accordingly, it seems the trunca...

Sql: search column that starts with digits

I'm having trouble with the sql below. Basically I have rows that contains strings according to the format: 129&c=cars. I only want the digits part, e.g. 129. The sql query is: $result = mysql_query("SELECT * FROM " . $db_table . " WHERE id LIKE '" . $id . "%'"); Why doesn't % work? I can't use %...% because it catches too much. ...

load data into text file from oracle database views.

Hi, I want to load data into text file that is generated after executing "views" in Oracle?How can I achieve this in oracle using UNIX.for example- I want the same in Oracle on unix box.Please help me out as it alredy cosume lots of time. your early response is highly appreciated!! ...

Getting output in flat file using oracle on UNIX

How to get the output of a query into a flat file using Oracle on UNIX? For example: I have a TEST table; I want to get the content of the TEST table into a flat file and then store the output in some other folder in .txt format. ...

SQL: Find rows where field value differs

I have a database table structured like this (irrelevant fields omitted for brevity): rankings ------------------ (PK) indicator_id (PK) alternative_id (PK) analysis_id rank All fields are integers; the first three (labeled "(PK)") are a composite primary key. A given "analysis" has multiple "alternatives", each of which will have a "...

Dynamic LINQ query on List with complex data type (collections)

Hi, I have a situation where I would like to create a dynamic LINQ query where the fields are generated on the fly. following code snippet show what I am trying to achieve. First query is a standard LINQ query on objects. Second query is a Dynamic LINQ query on objects. Second query fail at "Selected = false", and "(string)rb.User...

[Reloaded] Error while sorting filtered data from a GridView

Hello guys, I have an error I cannot solve, on a ASP.NET website. One of its pages - Countries.aspx, has the following controls: a CheckBox called "CheckBoxNAME": } Also, this is the main onload event of the page: protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) ...

How do I count the number of rows returned in my SQLite reader (in C#)?

I'm working in Microsoft Visual C# 2008 Express and with SQLite. I'm querying my database with something like this: SQLiteCommand cmd = new SQLiteCommand(conn); cmd.CommandText = "select id from myTable where word = '" + word + "';"; cmd.CommandType = CommandType.Text; SQLiteDataReader reader = cmd.ExecuteReader(); Then I do somethi...

PHP MySQL query with %s and %d

SELECT COUNT(*) AS test FROM %s WHERE id = %d AND tmp_mail <> '' What are %s and %d for? ...

SPARQL Query problem -> wrong answer

I want to select a triple using SPARQL. To do it, i'm using following query: SELECT count (*) WHERE {?s ?p ?o} FILTER (?s=http://kjkhlsa.net && ?p=http://lkasdjlkjas.com && ?o=Test) As answer i get fully wrong triple :( subject ist not equal to "http://kjkhlsa.net", predicate is not equal to "http://lkasdjlkjas.com" and object ist als...

SQL QUERY FOR COUNT

HOW TO DISPLAY FIRST AND LAST ROW VALUE FROM THE TABLE BY USING COUNT EXAMPLE: ID TIME DATE 001 10.00 02:10:2009 001 02.00 02:10:2009 001 23.00 02:10:2009 002 04.00 03:10:2009 002 12.00 03:10:2009 002 22.00 03:10:2009 SELECT ID, COUNT(*) AS TIME FROM TABLE OUTPUT IS ID date TIME 001 02:10:2009 ...