Search Results

Search found 34207 results on 1369 pages for 'query output'.

Page 25/1369 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • Sql query to get the GrandFather name by doing a self join

    - by mahesh
    Hello all , Can any one please give me the query to get the child name and his grand fathers name For eg - if i have a table Relationships in the i have childid and fatherid columns so how will i get the grandfather, i can easily get the father name by using a join but for grandfather i need to do joins 2 times so can any one help me with this D.Mahesh

    Read the article

  • parametrized query jqgrid

    - by user300657
    Hey, I have this mysql tables I want to display with jqgrid. The problem appears when I want to display a parametrized query. For example lets say I want to display all students older than 21. I have this variable named age which I want to pass to server.php file where I can construct the XML or JSON. On server I see some variables like $examp = $_REQUEST["q"]; but I dont know where to put $age to be accesed in server.php Thanks

    Read the article

  • Retrieve data using Dynamic Query and Linq to SQL

    - by GigaPr
    Hi I have a really complicated dynamic query that i want to use to retrieve data from the database I am working in .net 3.5 sql server 2008 i created a stored procedure that accepts a varchar(max) as input parameter and does execute (@SqlQuery) it executes but does not return anything I really would like to use LINQ as all my project is implemented using linq Any Idea how to do it what is the problem?

    Read the article

  • hiberate named query variable schema name

    - by Sandeep Jindal
    Hi, Other than default schema, for some SQL queries I need to access a particular schema. The issue is that the name of that particular schema is different for different environments. After goggling I found that using this link I am able to specify the schema name in variable. If that’s true that I have following questions: Will that would for SQL queries in the named query? How to set the value for the variable names? Thanks in advance.

    Read the article

  • mysql query for getting all messages that belong to user's contacts

    - by aharon
    So I have a database that is setup sort of like this (simplified, and in terms of the tables, all are InnoDBs): Users: contains based user authentication information (uid, username, encrypted password, et cetera) Contacts: contains two rows per relationship that exists between users as (uid1, uid2), (uid2, uid1) to allow for a good 1:1 relationship (must be mutual) between users Messages: has messages that consist of a blob, owner-id, message-id (auto_increment) So my question is, what's the best MySQL query to get all messages that belong to all the contacts of a specific user? Is there an efficient way to do this?

    Read the article

  • MYSQL update query php

    - by bell
    I am trying to use an update query to change values held in a database, the new values I am trying to store are held in php variables. I'm not sure what it is I'm doing wrong. mysql_query("UPDATE user SET status='full' WHERE user_id = '$user_id'")or die(mysql_error()); thanks in advance

    Read the article

  • how to use the order by and aggregate function together in sql query

    - by Ranjana
    SELECT count(distinct req.requirementid), req.requirementid, org.organizationid,req. locationofposting,org.registereddate FROM OrganizationRegisteredDetails AS org, RequirementsDetailsforOrganization AS req WHERE org.organizationid =req.requirementid order by org.RegisteredDate desc this shows me the error : Column 'RequirementsDetailsforOrganization.RequirementID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. how to do the 'order by org.RegisteredDate desc' in this Query ....

    Read the article

  • Why is postgresql update query so slow sometimes, even with index

    - by Matija
    i have a simple update query (foo column type is BOOLEAN (default false)): update tablename set foo = true where id = 234; which "id" is set to (primary) key, and if i run "explain analyze" i got: Index Cond: (id = 234) Total runtime: 0.358 ms but still, i have plenty of unexplained queries at slow log (pgfouine), which took more than 200s (?!): Times executed: 99, Av. duration (s): 70 can anyone please explain, whats the reason for that? (1.5 mio rows in table, postgresql 8.4)

    Read the article

  • SQL query through an intermediate table

    - by Bryan
    Given the following tables: Recipes | id | name | 1 | 'chocolate cream pie' | 2 | 'banana cream pie' | 3 | 'chocolate banana surprise' Ingredients | id | name | 1 | 'banana' | 2 | 'cream' | 3 | 'chocolate' RecipeIngredients | recipe_id | ingredient_id | 1 | 2 | 1 | 3 | 2 | 1 | 2 | 2 | 3 | 1 | 3 | 3 How do I construct a SQL query to find recipes where ingredients.name = 'chocolate' and ingredients.name = 'cream'?

    Read the article

  • SQL Server query replace for MySQL Instruction

    - by pojomx
    Hi, I'm new to SQL Server, and used mysql for a while now... SELECT A.acol, IF(A.acol<0,"Neg","Pos") as Column2 From Table I want to do something like that on SQL Server, but there doesn't exist the IF instruction. How do I replace that if, in a SQL Server 2008 Query?

    Read the article

  • Java Shoutcast Query

    - by John
    Hi there, I have a Java IRC bot which i would like to query a shoutcast server and return basic information (song playing etc). Can someone guide me in the right direction? Thank you.

    Read the article

  • Meaning of parameters in a Google query?

    - by blinry
    Are there any ressources on what the parameters in a Google query mean? Any analysis how the Google search pages work internally? Examples would be http://www.google.com/#hl=en&source=hp&q=lol&aq=f&aqi=&aql=&oq=&fp=45675624562456 or http://www.google.com/url?sa=t&source=web&ct=res&cd=11&ved=KJSGHFKSDJF&url=sfdgagasdgasdgasgasg&rct=j&q=fghthwrteghedgf&ei=asdfasdfsa&usg=asdfasdfasf

    Read the article

  • LINQ query null reference exception

    - by user289082
    Hi! I have the next query: var bPermisos = from b in ruc.Permisos where b.IdUsuario == cu.Id select new Permisos(){ Id=b.Id, IdUsuario=b.Id, IdPerfil=b.Id, Estatus=b.Estatus }; var qSisPer = from perm in bPermisos select new { perm.IdPerfil,perm.Cat_Perfil.Nivel,perm.Cat_Perfil.Nombre,Nombre_Sistem=perm.Cat_Perfil.Cat_Sistema.Nombre}; And is throwing me an exception, plz help!

    Read the article

  • MySQL - query to return CSV in a field?

    - by StackOverflowNewbie
    Assume I have the following tables: TABLE: foo - foo_id (PK) TABLE: tag - tag_id (PK) - name TABLE: foo_tag - foo_tag_id (PK) - foo_id (FK) - tag_id (FK) How do I query this so that I get a result like this: ========================== | foo_id | tags | ========================== | 1 | foo, bar | | 2 | foo | | 3 | bar | -------------------------- Basically, I need all of foo's tags in one column, comma separated. Possible in MySQL?

    Read the article

  • Kohana 3 - Query builder gives 0 rows

    - by pigfox
    The following query returns one row as expected when run from phpmyadmin. SELECT units . * , locations . * FROM units, locations WHERE units.id = '1' AND units.location_id = locations.id LIMIT 0 , 30 But when I try to do it in Kohana 3: $unit = DB::select('units.*', 'locations.*') ->from('units', 'locations') ->where('units.id', '=', $id)->and_where('units.location_id', '=', 'locations.id') ->execute()->as_array(); var_dump($unit); It prints array(0) { } What am I doing wrong?

    Read the article

  • mySQL - One large query vs Ajax indivdual queries

    - by Mark
    Hi guys, I guess no one will have a definative answer to this but considered predictions would be appriciated. I am in the process of developing a mySQL database for a web application and my question is: Is it more efficient to make a single query that returns a single row using AJAX or To request 100 - 700 rows when the user will likely only ever use the results of two or three? Really I am asking what is heavier for the server 2-3 requests with one result or 1 request with 100 - 700 results? Thanks, Mark

    Read the article

  • how to add WHERE clause to Query on android

    - by Brian
    I would like to limit the results to those whose KEY_HOMEID is equal to journalId. I've been on this for a couple days any help would be appreciated. public Cursor fetchAllNotes(String journalId) { return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_HEIGHT, KEY_BODY, KEY_HOMEID},"FROM DATABASE_TABLE WHERE KEY_HOMEID = journalId",null, null, null, null,null); }

    Read the article

  • translating specifications into query predicates

    - by Jeroen
    I'm trying to find a nice and elegant way to query database content based on DDD "specifications". In domain driven design, a specification is used to check if some object, also known as the candidate, is compliant to a (domain specific) requirement. For example, the specification 'IsTaskDone' goes like: class IsTaskDone extends Specification<Task> { boolean isSatisfiedBy(Task candidate) { return candidate.isDone(); } } The above specification can be used for many purposes, e.g. it can be used to validate if a task has been completed, or to filter all completed tasks from a collection. However, I want to re-use this, nice, domain related specification to query on the database. Of course, the easiest solution would be to retrieve all entities of our desired type from the database, and filter that list in-memory by looping and removing non-matching entities. But clearly that would not be optimal for performance, especially when the entity count in our db increases. Proposal So my idea is to create a 'ConversionManager' that translates my specification into a persistence technique specific criteria, think of the JPA predicate class. The services looks as follows: public interface JpaSpecificationConversionManager { <T> Predicate getPredicateFor(Specification<T> specification, Root<T> root, CriteriaQuery<?> cq, CriteriaBuilder cb); JpaSpecificationConversionManager registerConverter(JpaSpecificationConverter<?, ?> converter); } By using our manager, the users can register their own conversion logic, isolating the domain related specification from persistence specific logic. To minimize the configuration of our manager, I want to use annotations on my converter classes, allowing the manager to automatically register those converters. JPA repository implementations could then use my manager, via dependency injection, to offer a find by specification method. Providing a find by specification should drastically reduce the number of methods on our repository interface. In theory, this all sounds decent, but I feel like I'm missing something critical. What do you guys think of my proposal, does it comply to the DDD way of thinking? Or is there already a framework that does something identical to what I just described?

    Read the article

  • Can I do this in one Mysql query?

    - by bsandrabr
    Hi I have a table with two columns: column A column B 1 2 1 2 2 1 I want to return total of ones = 3 total of twos = 3 The best I can come up with is two queries like so: SELECT sum( CASE WHEN columnA =1 THEN 1 ELSE 0 END ) + sum(CASE WHEN columnB =1 THEN 1 ELSE 0 END ) SELECT sum( CASE WHEN columnA =2 THEN 1 ELSE 0 END ) + sum(CASE WHEN columnB =2 THEN 1 ELSE 0 END ) Can this be done in one query? Thanks

    Read the article

  • Performance tune my sql query removing OR statements

    - by SmartestVEGA
    I need to performance tune following SQL query by removing "OR" statements Please help ... SELECT a.id, a.fileType, a.uploadTime, a.filename, a.userId, a.CID, ui.username, company.name companyName, a.screenName FROM TM_transactionLog a, TM_userInfo ui, TM_company company, TM_airlineCompany ac WHERE ( a.CID = 3049 ) OR ( a.CID = company.ID AND ac.SERVICECID = 3049 AND company.SPECIFICCID = ac.ID ) OR ( a.USERID = ui.ID AND ui.CID = 3049 );

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >