Search Results

Search found 7706 results on 309 pages for 'inner join'.

Page 5/309 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • iPhone SDK: path and Inner Shadow

    - by JustMe
    Take a look of this image: http://imagebin.ca/img/b-W91wDU.png I have some CGPath like the image 1 and I would like to know how I can create an inner shadow effect like the image 2 I'm working with objective-c and Core Graphics iPhone SDK: 3.2

    Read the article

  • inner class within Interface

    - by harigm
    is that possible to create a inner class within an interface? If yes, why do we create like that? Anyways we are not going to create any interface objects? Do they help in any Development process?

    Read the article

  • INNER JOIN Returns Too Many Results

    - by Alon
    I have the following SQL: SELECT * FROM [Database].dbo.[TagsPerItem] INNER JOIN [Database].dbo.[Tag] ON [Tag].Id = [TagsPerItem].TagId WHERE [Tag].Name IN ('home', 'car') and it returns: Id TagId ItemId ItemTable Id Name SiteId 1 1 1 Content 1 home 1 2 1 2 Content 1 home 1 3 1 3 Content 1 home 1 4 2 4 Content 2 car 1 5 2 5 Content 2 car 1 6 2 12 Content 2 car 1 instead of just two records, which these names are "home" and "car". How can I fix it? Thanks.

    Read the article

  • Why is the ( ) mandatory in the SQL statement select * from gifts INNER JOIN sentgifts using (giftID

    - by Jian Lin
    Why is the ( ) mandatory in the SQL statement select * from gifts INNER JOIN sentgifts using (giftID); ? The ( ) usually is for specifying grouping of something. But in this case, are we supposed to be able to use 2 or more field names... in the example above, it can be all clear that it is 1 field, is it just that the parser is not made to bypass the ( ) when it is all clear? (such as in the language Ruby).

    Read the article

  • Php INNER JOING jqGrid help

    - by yanike
    I'm trying to get INNER JOIN to work with JQGRID, but I can't get it working. I want the code to get the first_name and last_name from members using the "efrom" from messages that matches the "id" from members. $col = array(); $col["title"] = "From"; $col["name"] = "messages.efrom"; $col["width"] = "70"; $col["hidden"] = false; $col["editable"] = false; $col["sortable"] = true; $col["search"] = true; $cols[] = $col; $col = array(); $col["title"] = "First Name"; $col["name"] = "members.first_name"; $col["width"] = "80"; $col["hidden"] = false; $col["editable"] = false; $col["sortable"] = true; $col["search"] = true; $cols[] = $col; $col = array(); $col["title"] = "Last Name"; $col["name"] = "members.last_name"; $col["width"] = "80"; $col["hidden"] = false; $col["editable"] = false; $col["sortable"] = true; $col["search"] = true; $cols[] = $col; $col = array(); $col["title"] = "Subject"; $col["name"] = "messages.esubject"; $col["width"] = "300"; $col["hidden"] = false; $col["editable"] = false; $col["sortable"] = true; $col["search"] = true; $cols[] = $col; $col = array(); $col["title"] = "Date"; $col["name"] = "messages.edatetime"; $col["width"] = "150"; $col["hidden"] = false; $col["editable"] = false; $col["sortable"] = true; $col["search"] = true; $cols[] = $col; $g = new jqgrid(); $grid["sortname"] = 'messages.edatetime'; $g->select_command = "SELECT messages.efrom, messages.esubject, messages.edatetime, members.first_name, members.last_name FROM messages INNER JOIN members ON messages.efrom = members.id";

    Read the article

  • Java "this" and inner class

    - by llm
    Is it possible to get a reference to this from within a Java inner class? i.e. Class outer { void aMethod() { NewClass newClass = new NewClass() { void bMethod() { // How to I get access to "this" (pointing to outer) from here? } }; } }

    Read the article

  • inner join in sql

    - by vini
    SELECT TotalItems.Total_Items ,TotalItems.No_Items_Present ,ItemsTable.No_Of_Items_Ret FROM TotalItems INNER JOIN ItemsTable ON ItemsTable.Item_Name= '" + DropItemName.SelectedValue + "'" this is my SQL query what I want is to retrieve two column values corresponding to the item I enter in my dropdown list from one table and the no_of_items_ret from another table satisfying the condition of the dropdownlist I'm getting all the values corresponding to any item I enter what should i do?

    Read the article

  • SQL SERVER – Subquery or Join – Various Options – SQL Server Engine Knows the Best – Part 2

    - by pinaldave
    This blog post is part 2 of the earlier written article SQL SERVER – Subquery or Join – Various Options – SQL Server Engine knows the Best by Paulo R. Pereira. Paulo has left excellent comment to earlier article once again proving the point that SQL Server Engine is smart enough to figure out the best plan itself and uses the same for the query. Let us go over his comment as he has posted. “I think IN or EXISTS is the best choice, because there is a little difference between ‘Merge Join’ of query with JOIN (Inner Join) and the others options (Left Semi Join), and JOIN can give more results than IN or EXISTS if the relationship is 1:0..N and not 1:0..1. And if I try use NOT IN and NOT EXISTS the query plan is different from LEFT JOIN too (Left Anti Semi Join vs. Left Outer Join + Filter). So, I found a case where EXISTS has a different query plan than IN or ANY/SOME:” USE AdventureWorks GO -- use of SOME SELECT * FROM HumanResources.Employee E WHERE E.EmployeeID = SOME ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddress EA UNION ALL SELECT EA.EmployeeID FROM HumanResources.EmployeeDepartmentHistory EA ) -- use of IN SELECT * FROM HumanResources.Employee E WHERE E.EmployeeID IN ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddress EA UNION ALL SELECT EA.EmployeeID FROM HumanResources.EmployeeDepartmentHistory EA ) -- use of EXISTS SELECT * FROM HumanResources.Employee E WHERE EXISTS ( SELECT EA.EmployeeID FROM HumanResources.EmployeeAddress EA UNION ALL SELECT EA.EmployeeID FROM HumanResources.EmployeeDepartmentHistory EA ) When looked into execution plan of the queries listed above indeed we do get different plans for queries and SQL Server Engines creates the best (least cost) plan for each query. Click on image to see larger images. Thanks Paulo for your wonderful contribution. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: Pinal Dave, Readers Contribution, SQL, SQL Authority, SQL Joins, SQL Optimization, SQL Performance, SQL Query, SQL Scripts, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • How to access "overridden" inner class in Scala?

    - by doom2.wad
    I have two traits, one extending the other, each with an inner class, one extending the other, with the same names: trait A { class X { def x() = doSomething() } } trait B extends A { class X extends super.X { override def x() = doSomethingElse() } } class C extends B { val x = new X() // here B.X is instantiated val y = new A.X() // does not compile val z = new A.this.X() // does not compile } How do I access A.X class in the C class's body? Renaming B.X not to hide A.X is not a preferred way. To make things a bit complicated, in the situation I have encountered this problem the traits have type parameters (not shown in this example).

    Read the article

  • Selecting the first row out of many sql joins

    - by IcedDante
    Alright, so I'm putting together a path to select a revision of a particular novel: SELECT Catalog.WbsId, Catalog.Revision, NovelRevision.Revision FROM Catalog, BookInCatalog INNER JOIN NovelMaster INNER JOIN HasNovelRevision INNER JOIN NovelRevision ON HasNovelRevision.right = NovelRevision.obid ON HasNovelRevision.Left=NovelMaster.obid ON NovelMaster.obid = BookInCatalog.Right WHERE Catalog.obid = BookInCatalog.Left; This returns all revisions that are in the Novel Master for each Novel Master that is in the catalog. The problem is, I only want the FIRST revision of each novel master in the catalog. How do I go about doing that? Oh, and btw: my flavor of sql is hobbled, as many others are, in that it does not support the LIMIT Function.

    Read the article

  • MYSQL: How to limit inner join?

    - by Sergii Rechmp
    I need some help with my query. I have 2 tables: all: art|serie sootv: name|art|foo I need to get result like name|serie. My query is: SELECT t2.NAME, t1.serie FROM ( SELECT * FROM `all` WHERE `serie` LIKE '$serie' ) t1 INNER JOIN sootv t2 ON t1.art = t2.art; it works, but sootv table contains data like name|art|foo abc | 1 | 5 abc | 1 | 6 i get 2 same results. Its not what i need. Help me please - how i can get only one result: abc|1 Thanks.

    Read the article

  • Constructors in Inner classes (implementing Interfaces)

    - by thepandaatemyface
    Hi, How would I go about writing a constructor for an inner class which is implementing an interface? I know I could make a whole new class, but I figure there's got to be a way to do something along the line of this: JButton b = new JButton(new AbstractAction() { public AbstractAction() { super("This is a button"); } public void actionPerformed(ActionEvent e) { System.out.println("button clicked"); } }); When I enter this it doesn't recognize the AbstractAction method as a constructor (compiler asks for return type). Anyone have an idea? Thanks

    Read the article

  • Count, inner join

    - by Urosh
    I have two tables: DRIVER (Driver_Id,First name,Last name,...) PARTICIPANT IN CAR ACCIDENT (Participant_Id,Driver_Id-foreign key,responsibility-yes or no,...) Now, I need to find out which driver participated in accident where responsibility is 'YES', and how many times. I did this: Select Driver_ID, COUNT (Participant.Driver_ID)as 'Number of accidents' from Participant in car accident where responsibility='YES' group by Driver_ID order by COUNT (Participant.Driver_ID) desc But, I need to add drivers first and last name from the first table(using inner join, I suppose). I don't know how, because it is not contained in either an aggregate function or the GROUP BY clause. Please help :)

    Read the article

  • Join .doc files into one .doc (with keeping the original format of every document)

    - by Shiki
    I have about ~50 .doc files, that look perfect (they are extracted with Able2Extract). Now I want to join these 50 files into one huge .doc. I've tried using Word's in-built "Insert" feature, but that messed up the whole format. I want to keep everything I have. Like just document1 - document2 - document3. Nothing "intelligent" or "smart" needed during the conversion, just the capability of joining them. (Thus making them all searchable, that's the ultimate aim.) I don't mind if the method/solution applies a single blank page at every document end either.

    Read the article

  • subquery in join with doctrine dql

    - by Martijn de Munnik
    I want to use DQL to create a query which looks like this in SQL: select e.* from e inner join ( select uuid, max(locale) as locale from e where locale = 'nl_NL' or locale = 'nl' group by uuid ) as e_ on e.uuid = e_.uuid and e.locale = e_.locale I tried to use QueryBuilder to generate the query and subquery. I think they do the right thing by them selves but I can't combine them in the join statement. Does anybody now if this is possible with DQL? I can't use native SQL because I want to return real objects and I don't know for which object this query is run (I only know the base class which have the uuid and locale property). $subQueryBuilder = $this->_em->createQueryBuilder(); $subQueryBuilder ->addSelect('e.uuid, max(e.locale) as locale') ->from($this->_entityName, 'e') ->where($subQueryBuilder->expr()->in('e.locale', $localeCriteria)) ->groupBy('e.uuid'); $queryBuilder = $this->_em->createQueryBuilder(); $queryBuilder ->addSelect('e') ->from($this->_entityName, 'e') ->join('('.$subQueryBuilder.') as', 'e_')->join ->where('e.uuid = e_.uuid') ->andWhere('e.locale = e_.locale');

    Read the article

  • Left Outer Join - SQL2005

    - by Dan beadle
    I thought I knew enough SQL, but I am having problem with a left outer join. I have an expense detail record that needs to link to a table by dept and account_code. The query looks something like this: select Detail.Spend, Budget.BudgetAmt from detail left outer join budget on detail.dept = budget.dept AND dept.account_code = budget.account_code This works great as long as there is a record that exactly matches the join conditions. But sometimes, there is no matching budget item. I want to get back the Detail.Spend from the details table with nulls for the budgetAmt. Instead, I don't get this record at all. Isn't Left Outer Join supposed to return the left (detail) table when there is no match? Is there something different when multiple criteria are used as I do here? Thanks

    Read the article

  • problem with a join

    - by Luca Romagnoli
    I have this code: int se = (int) settings.GruppoSegreteria; var acc = db.USR_Accounts.Where( p => p.ID_Gruppo == se); var segreterie = from s in db.USR_Utenti join h in acc on s.ID equals h.USR_UtentiReference select s; And this error: The type of one of the expressions in the join clause is incorrect. Type inference failed in the call to 'Join' I don't understand it. Can you help me? thanks

    Read the article

  • mysql join Two tables to get records

    - by Saranya
    Hai guys, I have two tables Incharge and property. My property table has three fields 1stIncharge,2ndIncharge and 3rdIncharge. InchargeId is set as foreign key for all the above fields in the property table.. How to write a select statement that joins both the table.. I ve tried a bit but no result select P.Id,P.Name,P.1stIncharge,P.2ndIncharge,P.3rdIncharge,I.Id from Property as P join Incharge as I where (\\How to give condition here \\) Guys 3 fields P.1stIncharge, P.2ndIncharge, P.3rdIncharge has foreign key I.Id Edit: select P.Id,P.Name,P.1stIncharge,P.2ndIncharge,P.3rdIncharge,I1.Id from Property as P inner join Incharge as I1 on I1.Id=P.1stIncharge inner join Incharge as I2 on I2.Id=P.2ndIncharge inner join Incharge as I3 on I3.Id=P.3rdIncharge and this query working

    Read the article

  • Left Join Returning Extra Rows T-SQL?

    - by davemackey
    I have the following query: select * from ACADEMIC a left join RESIDENCY r on a.PEOPLE_CODE_ID = r.PEOPLE_CODE_ID where a.ACADEMIC_TERM='Fall' and r.ACADEMIC_TERM='Fall' and a.ACADEMIC_SESSION='' and a.ACADEMIC_YEAR = (Select Year(GetDate())) and r.ACADEMIC_YEAR = (Select Year(GetDate())) and (CLASS_LEVEL LIKE 'FR%' OR a.CLASS_LEVEL LIKE 'SO' OR a.CLASS_LEVEL LIKE 'JR' OR a.CLASS_LEVEL LIKE 'SR%') and r.RESIDENT_COMMUTER='R' For each person in the database it returns two rows with identical information. Yet, when I do the same query without the left join: select * from ACADEMIC a where a.ACADEMIC_TERM='Fall' and a.ACADEMIC_SESSION='' and a.ACADEMIC_YEAR = (Select Year(GetDate())) and (CLASS_LEVEL LIKE 'FR%' OR a.CLASS_LEVEL LIKE 'SO' OR a.CLASS_LEVEL LIKE 'JR' OR a.CLASS_LEVEL LIKE 'SR%') ORDER BY PEOPLE_ID It returns only one row for each person. I'm doing a left join - why is it adding an extra row? Shouldn't it only do that if I add a right join?

    Read the article

  • Deleting rows with MySQL LEFT JOIN

    - by fabrik
    Hello! I have two tables, one for job deadlines, one for describe a job. Each job can take a status and some statuses means the jobs' deadlines must be deleted from the other table. I can easily SELECT the jobs/deadlines that meets my criteria with a LEFT JOIN: SELECT * FROM `deadline` LEFT JOIN `job` ON deadline.job_id = job.job_id WHERE `status` = 'szamlazva' OR `status` = 'szamlazhato' OR `status` = 'fizetve' OR `status` = 'szallitva' OR `status` = 'storno' (status belongs to job table not deadline) But when i'd like to delete these rows from deadline, MySQL throws an error. My query is: DELETE FROM `deadline` LEFT JOIN `job` ON deadline.job_id = job.job_id WHERE `status` = 'szamlazva' OR `status` = 'szamlazhato' OR `status` = 'fizetve' OR `status` = 'szallitva' OR `status` = 'storno' MySQL error says nothing: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN `job` ON deadline.job_id = job.job_id WHERE `status` = 'szaml' at line 1 How can i turn my SELECT into a working DELETE query? Thanks, fabrik

    Read the article

  • SQL - Multiple join conditions using OR?

    - by Brandi
    I have a query that is using multiple joins. The goal is to say "Out of table A, give me all the customer numbers in which you can match table A's EmailAddress with either email_to or email_from of table B. Ignore nulls, internal emails, etc.". It seems like it would be better to use an or condition in the join than multiple joins since it is the same table. When I try to use AND/OR it does not give the behaviour I expect... AND finishes in a reasonable time, but yields no results (I know that there are matches, so it must be some flaw in my logic) and OR never finishes (I have to kill it). Here is example code to illustrate the question: --my original query SELECT DISTINCT a.CustomerNo FROM A a WITH (NOLOCK) LEFT JOIN B e WITH (NOLOCK) ON a.EmailAddress = e.email_from RIGHT JOIN B f WITH (NOLOCK) ON a.EmailAddress = f.email_to WHERE a.EmailAddress NOT LIKE '%@mydomain.___' AND a.EmailAddress IS NOT NULL AND (e.email_from IS NOT NULL OR f.email_to IS NOT NULL) Here is what I tried, (I am attempting logical equivalence): SELECT DISTINCT a.CustomerNo FROM A a WITH (NOLOCK) LEFT JOIN B e WITH (NOLOCK) ON a.EmailAddress = e.email_from OR a.EmailAddress = e.email_to WHERE a.EmailAddress NOT LIKE '%@mydomain.___' AND a.EmailAddress IS NOT NULL AND (e.email_from IS NOT NULL OR e.email_to IS NOT NULL) So my question is two-fold: Why does having AND in the above query work in a few seconds and OR goes for minutes and never completes? What am I missing to make a logically equivalent statement that has only one join?

    Read the article

  • Join two tables with same # of row but sorted for NULL

    - by VISQL
    I need to join two tables with the same number of rows. Each table has 1 column. There is NO CONNECTING COLUMN to reference for a join. I need to join them side by side because each table was sorted separately so that numeric values are at the top in descinding order. The Table Earners has income values from say 200K down to 0. I cannot just select using 2 cases, because then I will have my first row with Incomes above 100K, but the first 20 or so entries in the second row are NULL. I want the second row to also be sorted descending. I looked up using ORDER BY within CASE but there is no such thing. I have tried to read about row_number() but none of the examples seem to match or make sense. drop table #20plus select case when Income >= 20000 AND Income < 100000 then Income end as 'mula' into #20plus from Earners order by mula desc drop table #100plus select case when Income >= 100000 then Income end as 'dinero' into #100plus from Earners order by dinero desc Select A.dinero, B.mula FROM #100plus as A JOIN #20plus as B ON A.????? = B.????? Since both A and B are sorted descending, moving all NULL to the bottom, what can I reference to join the two tables? Previous output using one SELECT statement with 2 CASE statements dinero mula 2.12688e+007 NULL 1.80031e+007 NULL 1.92415e+006 NULL … … NULL 93530.7 NULL 91000 NULL 84500 Desired output using one SELECT statement after creating two temp TABLES dinero mula 2.12688e+007 93530.7 1.80031e+007 91000 1.92415e+006 84500 … 82500 NULL 82000 NULL … NULL NULL This is Microsoft SQL Server 2008. I'm super new to this, so please give an answer as clear and simplified as possible. Thank you.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >