Search Results

Search found 8340 results on 334 pages for 'merge join'.

Page 11/334 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • awk/sed/bash to merge/concatenate data

    - by Kyle
    Trying to merge some data that I have. The input would look like so: foo bar foo baz boo abc def abc ghi And I would like the output to look like: foo bar baz boo abc def ghi I have some ideas using some arrays in a shell script, but I was looking for a more elegant or quicker solution.

    Read the article

  • join two table for insert data in database in android

    - by shadi
    I have two table(t1,t2) in android, t1 has a primary key that it is foreign key for t2,i want to insert data to this tables,is it necessary to join these two table?if yes, what is code for join these table? i insert data in one of them like this: public long insertQuote(String Quote,int Count1 ) { ContentValues initialValues = new ContentValues(); initialValues.put(GoodName, Quote); initialValues.put(CartID, Count1); return db.insert(DATABASE_TABLE, null, initialValues); }

    Read the article

  • web application , join event on facebook using php api

    - by Mohammed Al-shareif
    enter code herei created my events on facebook throw php api (form my website) ...every thing its fine with me and the events appear 100% on FB calendar , i got the FB event id and save to my db , enter code here my users can join the same event on my website i need them to join the same event on facebook also i have the facebook event id , and user accept my permission to access his/here calendar please anybody help!!!

    Read the article

  • entity framework join

    - by Luca Romagnoli
    Hi, i have 2 table (user, user_profile) without a explicit relationship in the sql db. and i can't add it to the db. so, i can't do this: db.user.include("user_profile") the attribute in for the join is user_id is possible do anything like this? db.user.join("user_profile On user.id = user_profile.user_id") How can i do that? thanks

    Read the article

  • Appending a prefix when using join in Perl

    - by syker
    I have an array of strings that I would like to use the join function on. However, I would like to prefix each string with the same string. Can I do this in one line as opposed to iterating through the array first and changing each value before using join?

    Read the article

  • linq to entites left outer join

    - by parminder
    I am struggling linq to entities left outer join. I have two entities (tables): Listings { ListingID, MakeID (nullable) } Makes { MakeID, Description } I want to write something like this in LINQ: select listings.listingID ,listings.makeid , IsNull(makes.Description, 'NA') from listings left outer join makes on listings.makeid = makes.makeid

    Read the article

  • Data retrieval and Join operations with cluster db server

    - by Goerge
    If any database spreads across multiple servers (ex. Microsoft Sql Server), how can we do join or filter operations. In my scenario, if suppose: A single table spreads across multiple servers how can we filter rows based on user input? If master table is there on one db server and transaction table is at another db server, how can we do join operations? Please let me know how can we achieve this and where can I get more details about this?

    Read the article

  • LINQ 2 SQL:Left outer join for my SQL statement

    - by Shyju
    Can any one tell me the LINQ 2 SQL version (in vb.net) of the below Left outer join query.I am trying to get all Employees with name "Shyju" and their address line 1 if it exist in the address table SELECT E.EMPLOYEE_NAME, E.AGE,A.ADRESS_LINE1 FROM EMPLOYEE_MASTER E LEFT OUTER JOIN ADDRESS_MASTER A ON E.ID=A.EMPLOYEE_ID WHERE E.EMPLOYEE_NAME='Shyju' Thanks in advance

    Read the article

  • Python: Split, strip, and join in one line

    - by PandemoniumSyndicate
    I'm curious if their is some python magic I may not know to accomplish a bit of frivolity given the line: csvData.append(','.join([line.split(":").strip() for x in L])) I'm attempting to split a line on :, trim whitespace around it, and join on , problem is, since the array is returned from line.split(":"), the for x in L #<== L doesn't exist! causes issues since I have no name for the array returned by line.split(":") So I'm curious if there is a sexy piece of syntax I could use to accomplish this in one shot? Cheers!

    Read the article

  • How can I merge 2 branches in my local repository

    - by michael
    Hi, I have 2 branches in my hg repository: 1. default 2. new-feature I tried following this: http://mercurial.selenic.com/wiki/NamedBranches, I switch back to default by 'hg update -c default' but how can I merge my commits in 'new-feature' to 'default'. I did "hg pull new-feature", it said "repository new-feature not found"! Thank you.

    Read the article

  • Merge Function In Entity FrameWork?

    - by Ahmed
    In NHibernate there is a merge function that does the following: if there is a persistent instance with the same identifier currently associated with the session, copy the state of the given object onto the persistent instance if there is no persistent instance currently associated with the session, try to load it from the database, or create a new persistent instance the persistent instance is returned Is this possible in EF? I mean this part : copy the state of the given object onto the persistent instance. And if i used ApplyCurrentValues it seemes to be as update behavior or not?

    Read the article

  • How to merge code on svn

    - by London
    I'm using subeclipse plugin for eclipse for SVN. My project looks like this : ProjectName\ - branches - special_ - tags - trunk I have currently checked out project from special_ and I've modified and added one class, how can I merge the code which I updated/added to trunk ? I'll take anything into consideration

    Read the article

  • Using a regex pattern to find revision numbers from a svn merge

    - by zyzy
    svn diff -rXX:HEAD Will give me a format like this, if there has been a merge between those revisions: Merged /<branch>:rXXX,XXX-XXX or Merged /<branch>:rXXX I'm not very familiar with regex and am trying to put together a pattern which will match all the numbers (merged revision numbers) AFTER matching the "Merged /branch:r" part. So far I have this to match the first part: [Mm]erged.*[a-zA-Z]:r Thanks in adv. for the help :)

    Read the article

  • MySQL: Use CASE/ELSE value as join parameter

    - by DRJ
    I'm trying to join the NAME and PHOTO from USERS table to the TRANSACTIONS table based on who is the payer or payee. It keeps telling me can't find the table this -- What am I doing wrong? SELECT name,photo,amount,comment, ( CASE payer_id WHEN 72823 THEN payee_id ELSE payer_id END ) AS this FROM transactions RIGHT JOIN users ON (users.id=this) WHERE payee_id=72823 OR payer_id=72823

    Read the article

  • Join two results in Powershell

    - by Hinek
    I've got two CMDlets that return lists of objects. One returns objects of the type SPSolution, which contains the property Id, the other returns objects of the type SPFeature with a property SolutionId. Now I want to join/merge this data something like this: $f = Get-Feature $s = Get-Solution $result = <JOIN> $f $s <ON> $f.SolutionId = $s.Id <SELECT> FeatureName = $f.DisplayName, SolutionName = $s.Name

    Read the article

  • Complex multiple join query across 3 tables

    - by Keir Simmons
    I have 3 tables: shops, PRIMARY KEY cid,zbid shop_items, PRIMARY KEY id shop_inventory, PRIMARY KEY id shops a is related to shop_items b by the following: a.cid=b.cid AND a.zbid=b.szbid shops is not directly related to shop_inventory shop_items b is related to shop_inventory c by the following: b.cid=c.cid AND b.id=c.iid Now, I would like to run a query which returns a.* (all columns from shops). That would be: SELECT a.* FROM shops a WHERE a.cid=1 AND a.zbid!=0 Note that the WHERE clause is necessary. Next, I want to return the number of items in each shop: SELECT a.*, COUNT(b.id) items FROM shops a LEFT JOIN shop_items b ON b.cid=a.cid AND b.szbid=a.zbid WHERE a.cid=1 GROUP BY b.szbid,b.cid As you can see, I have added a GROUP BY clause for this to work. Next, I want to return the average price of each item in the shop. This isn't too hard: SELECT a.*, COUNT(b.id) items, AVG(COALESCE(b.price,0)) average_price FROM shops a LEFT JOIN shop_items b ON b.cid=a.cid AND b.szbid=a.zbid WHERE a.cid=1 GROUP BY b.szbid,b.cid My next criteria is where it gets complicated. I also want to return the unique buyers for each shop. This can be done by querying shop_inventory c, getting the COUNT(DISTINCT c.zbid). Now remember how these tables are related; this should only be done for the rows in c which relate to an item in b which is owned by the respective shop, a. I tried doing the following: SELECT a.*, COUNT(b.id) items, AVG(COALESCE(b.price,0)) average_price, COUNT(DISTINCT c.zbid) FROM shops a LEFT JOIN shop_items b ON b.cid=a.cid AND b.szbid=a.zbid LEFT JOIN shop_inventory c ON c.cid=b.cid AND c.iid=b.id WHERE a.cid=1 GROUP BY b.szbid,b.cid However, this did not work as it messed up the items value. What is the proper way to achieve this result? I also want to be able to return the total number of purchases made in each shop. This would be done by looking at shop_inventory c and adding up the c.quantity value for each shop. How would I add that in as well?

    Read the article

  • Determining an Oracle SQL MERGE statement result

    - by petejamd
    Follow up to this question This (similar version from old link) works in SQL Server 2008, however, Oracle is giving me trouble: MERGE INTO wdm_test USING ( select '10000000000000000000000000000000' Guid from DUAL ) val ON ( wdm_test.Guid = val.Guid ) WHEN MATCHED THEN UPDATE SET test_column = null WHEN NOT MATCHED THEN INSERT (Guid, test_column) VALUES ('10000000000000000000000000000000', null) OUTPUT $action; SQL Error: ORA-00933: SQL command not properly ended Does Oracle not support OUTPUT $action;? If not, is there an alternative?

    Read the article

  • Hot to merge code on svn

    - by London
    I'm using subeclipse plugin for eclipse for SVN. My project looks like this : ProjectName\ - branches - special_ - tags - trunk I have currently checked out project from special_ and I've modified and added one class, how can I merge the code which I updated/added to trunk ? I'll take anything into consideration

    Read the article

  • LINQ Joins - Performance

    - by Meiscooldude
    I am curious on how exactly LINQ (not LINQ to SQL) is performing is joins behind the scenes in relation to how Sql Server performs joins. Sql Server before executing a query, generates an Execution Plan. The Execution Plan is basically an Expression Tree on what it believes is the best way to execute the query. Each node provides information on whether to do a Sort, Scan, Select, Join, ect. On a 'Join' node in our execution plan, we can see three possible algorithms; Hash Join, Merge Join, and Nested Loops Join. Sql Server will choose which algorithm to for each Join operation based on expected number of rows in Inner and Outer tables, what type of join we are doing (some algorithms don't support all types of joins), whether we need data ordered, and probably many other factors. Join Algorithms: Nested Loop Join: Best for small inputs, can be optimized with ordered inner table. Merge Join: Best for medium to large inputs sorted inputs, or an output that needs to be ordered. Hash Join: Best for medium to large inputs, can be parallelized to scale linearly. LINQ Query: DataTable firstTable, secondTable; ... var rows = from firstRow in firstTable.AsEnumerable () join secondRow in secondTable.AsEnumerable () on firstRow.Field<object> (randomObject.Property) equals secondRow.Field<object> (randomObject.Property) select new {firstRow, secondRow}; SQL Query: SELECT * FROM firstTable fT INNER JOIN secondTable sT ON fT.Property = sT.Property Sql Server might use a Nested Loop Join if it knows there are a small number of rows from each table, a merge join if it knows one of the tables has an index, and Hash join if it knows there are a lot of rows on either table and neither has an index. Does Linq choose its algorithm for joins? or does it always use one?

    Read the article

  • Merge XML files with configurable rules (context: Maven POMs, Java)

    - by Patrick Bergner
    Hi, I'm currently writing some kind of a Maven POM preprocessor that assembles a POM for a project from multiple input files (basically a template and a module specific file). The files are hierarchically ordered (template = most general, module specific = least general). The problem is now to merge these files into a single POM file. Long story short or if you're not familiar with Maven: a POM looks like this (shortened): <project> <modelVersion>4.0.0</modelVersion> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> </dependency> </dependencies> </project> Basically the merger shall replace all values of the more general file with the values of the more specific file (i.e. singletons, e.g. the <modelVersion> above) but there are certain elements where the merger shall add the more certain element to a parent (i.e. collections, e.g. <dependency> elements shall always be added to the <dependencies> element and no <dependency> element shall be replaced by another). A more detailed example with definition of desired output: File A: <project> <modelVersion>A</modelVersion> <dependencies> <dependency> <groupId>groupIdA</groupId> <artifactId>artifactIdA</artifactId> </dependency> </dependencies> </project> File B: <project> <modelVersion>B</modelVersion> <dependencies> <dependency> <groupId>groupIdB</groupId> <artifactId>artifactIdB</artifactId> </dependency> </dependencies> </project> Desired output: <project> <modelVersion>B</modelVersion> <dependencies> <dependency> <groupId>groupIdA</groupId> <artifactId>artifactIdA</artifactId> </dependency> <dependency> <groupId>groupIdB</groupId> <artifactId>artifactIdB</artifactId> </dependency> </dependencies> </project> The set of collection type elements are known and should be configurable (preferably via a set of XPath expressions). A Java based solution is appreciated. What looked most promising so far was the tool mentioned here but the MERGE action produces something like <dependency> <groupId>groupIdAgroupIdB</groupId> <artifactId>artifactIdAartifactIdB</artifactId> </dependency> when merging, which is not what I need. Any ideas? Thanks for your help!

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >