Search Results

Search found 886 results on 36 pages for 'duplicates'.

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

  • SQL Duplicates Issue

    - by jeff
    I have two tables : Product and ProductRateDetail. The parent table is Product. I have duplicate records in the product table which need to be unique. There are entries in the ProductRateDetail table which correspond to duplicate records in the product table. Somehow I need to update the ProductRateDetail table to match the original (older) ID from the Product table and then remove the duplicates from the product table. I would do this manually but there are 100's of records. I.e. something like UPDATE tbl_productRateDetail SET productID = (originalID from tbl_product) then something like DELETE from tbl_product WHERE duplicate ID and only delete the recently added ID data example: (sorry can't work out this formatting thing) select * from dbo.Product where ProductCode = '10003' tbl_product ProductID ProductTypeID ProductDescription ProductCode ProductSize 365 1 BEND DOUBLE FLANGED 10003 80mmX90deg 1354 1 BEND DOUBLE FLANGED 10003 80mmX90deg SELECT * FROM [MSTS2].[dbo].[ProductRateDetail] WHERE ProductID in (365,1354) tbl_productratedetail ProductRateDetailID ProductRateID ProductID UnitRate 365 1 365 16.87 1032 5 365 16.87 2187 10 365 16.87 2689 11 365 16.87 3191 12 365 16.87 7354 21 1354 21.30 7917 22 1354 21.30 8480 23 1354 21.30 9328 25 1354 21.30 9890 26 1354 21.30 10452 27 1354 21.30 Please help!

    Read the article

  • Finding duplicates in a list using recursion?

    - by user1760892
    I'm suppose to find if there is duplicates in a list and return true or false using recursion only (no loops). So if ArrayList of char is used, [a,b,c,d,e] should return false. [a,a,b,c,d] or [a,b,b,c,c,d] should return true. I've tried and tested different ways and it worked for some cases but not all. I changed my code around and this is what I have now. (Has problem at the last if statement) Can anyone give me some hints? Thanks. public static <T> boolean duplicate(List<T> list) throws NullPointerException { return duplicateHelper(list, list.get(0)); } public static <T> boolean duplicateHelper(List<T> list, T t){ if (list == null) throw new NullPointerException(); if(list.isEmpty()) return false; if(list.size() > 1){ if(t.equals(list.get(1))) return true; } if(list.size() == 1) return false; if(!duplicateHelper(list.subList(1,list.size()), t)){ return duplicate(list.subList(1,list.size())); } return false; }

    Read the article

  • Top n items in a List ( including duplicates )

    - by Krishnan
    Trying to find an efficient way to obtain the top N items in a very large list, possibly containing duplicates. I first tried sorting & slicing, which works. But this seems unnnecessary. You shouldn't need to sort a very large list if you just want the top 20 members. So I wrote a recursive routine which builds the top-n list. This also works, but is very much slower than the non-recursive one! Question: Which is my second routine (elite2) so much slower than elite, and how do I make it faster ? My code is attached below. Thanks. import scala.collection.SeqView import scala.math.min object X { def elite(s: SeqView[Int, List[Int]], k:Int):List[Int] = { s.sorted.reverse.force.slice(0,min(k,s.size)) } def elite2(s: SeqView[Int, List[Int]], k:Int, s2:List[Int]=Nil):List[Int] = { if( k == 0 || s.size == 0) s2.reverse else { val m = s.max val parts = s.force.partition(_==m) val whole = if( parts._1.size > 1) parts._1.tail:::parts._2 else parts._2 elite2( whole.view, k-1, m::s2 ) } } def main(args:Array[String]) = { val N = 1000000/3 val x = List(N to 1 by -1).flatten.map(x=>List(x,x,x)).flatten.view println(elite2(x,20)) println(elite(x,20)) } }

    Read the article

  • Distinct() to return List<> returning Duplicates

    - by KDM
    I have a list of Filters that are passed into a webservice and I iterate over the collection and do Linq query and then add to the list of products but when I do a GroupBy and Distinct() it doesn't remove the duplicates. I am using a IEnumerable because when you use Disinct it converts it to IEnumerable. If you know how to construct this better and make my function return a type of List<Product> that would be appreciated thanks. Here is my code in C#: if (Tab == "All-Items") { List<Product> temp = new List<Product>(); List<Product> Products2 = new List<Product>(); foreach (Filter filter in Filters) { List<Product> products = (from p in db.Products where p.Discontinued == false && p.DepartmentId == qDepartment.Id join f in db.Filters on p.Id equals f.ProductId join x in db.ProductImages on p.Id equals x.ProductId where x.Dimension == "180X180" && f.Name == filter.Name /*Filter*/ select new Product { Id = p.Id, Title = p.Title, ShortDescription = p.ShortDescription, Brand = p.Brand, Model = p.Model, Image = x.Path, FriendlyUrl = p.FriendlyUrl, SellPrice = p.SellPrice, DiscountPercentage = p.DiscountPercentage, Votes = p.Votes, TotalRating = p.TotalRating }).ToList<Product>(); foreach (Product p in products) { temp.Add(p); } IEnumerable temp2 = temp.GroupBy(x => x.Id).Distinct(); IEnumerator e = temp.GetEnumerator(); while (e.MoveNext()) { Product c = e.Current as Product; Products2.Add(c); } } pf.Products = Products2;// return type must be List<Product> }

    Read the article

  • How do I delete duplicates between two excel sheets quickly vba

    - by MainTank
    I am using vba and I have two sheets one is named "Do Not Call" and has about 800,000 rows of data in column A. I want to use this data to check column I in the second sheet, named "Sheet1". If it finds a match I want it to delete the whole row in "Sheet1". I have tailored the code I have found from a similar question here: Excel formula to Cross reference 2 sheets, remove duplicates from one sheet and ran it but nothing happens. I am not getting any errors but it is not functioning. Here is the code I am currently trying and have no idea why it is not working Option Explicit Sub CleanDupes() Dim wsA As Worksheet Dim wsB As Worksheet Dim keyColA As String Dim keyColB As String Dim rngA As Range Dim rngB As Range Dim intRowCounterA As Integer Dim intRowCounterB As Integer Dim strValueA As String keyColA = "A" keyColB = "I" intRowCounterA = 1 intRowCounterB = 1 Set wsA = Worksheets("Do Not Call") Set wsB = Worksheets("Sheet1") Dim dict As Object Set dict = CreateObject("Scripting.Dictionary") Do While Not IsEmpty(wsA.Range(keyColA & intRowCounterA).Value) Set rngA = wsA.Range(keyColA & intRowCounterA) strValueA = rngA.Value If Not dict.Exists(strValueA) Then dict.Add strValueA, 1 End If intRowCounterA = intRowCounterA + 1 Loop intRowCounterB = 1 Do While Not IsEmpty(wsB.Range(keyColB & intRowCounterB).Value) Set rngB = wsB.Range(keyColB & intRowCounterB) If dict.Exists(rngB.Value) Then wsB.Rows(intRowCounterB).delete intRowCounterB = intRowCounterB - 1 End If intRowCounterB = intRowCounterB + 1 Loop End Sub I apologize if the above code is not in a code tag. This is my first time posting code online and I have no idea if I did it correctly.

    Read the article

  • Remove duplicates in a linked list before adding - C

    - by DesperateCoders
    Hi, My question is about removing duplicates from a linked list. But i want to do it before adding to linked list. struct myStr{int number; mystr *next;} void append(mystr **q,int item) { myStr *temp; temp = *q; myStr *newone; if(*q==NULL)// There should be control of previous elements. Call of keysearch function. { temp = (myStr *)malloc(sizeof(myStr)); temp->number =size; temp->next=NULL; *q=temp; } else //And also here { temp = *q; while(temp->next !=NULL) { temp=temp->next; } newone = (myStr *)malloc(sizeof(myStr)); newone->count = size; newone->next=NULL; temp->next=newone; } } int keysearch (myStr *p) { struct myStr *temp = p; int found = 0; int key= p->number; while (temp->number != NULL) { if(temp->number == key) { found = 1; } temp = temp->next; } return found; } My problem is in keySearch. I don't know what is wrong? Or is there another way for doing this.

    Read the article

  • limiting mysql results by range of a specific key INCLUDING DUPLICATES

    - by aVC
    I have a query SELECT p.*, m.*, (SELECT COUNT(*) FROM newPhotoonAlert n WHERE n.userIDfor='$id' AND n.threadID=p.threadID and n.seen='0') AS unReadCount FROM posts p JOIN myMembers m ON m.id = p.user_id LEFT JOIN following f ON (p.user_id = f.user_id AND f.follower_id='$id' AND f.request='0' AND f.status='1') JOIN myMembers searcher ON searcher.id = '$id' WHERE ((f.follower_id = searcher.id) OR m.id='$id') AND p.flagged <'5' ORDER BY p.threadID DESC,p.positionID It brings result as expected but I want to add Another CLAUSE to limit the results. Say a sample (minimal shown) set of data looks like this with the above query. threadID postID positionID url 564 1254 2 a.com 564 1245 1 a1.com 541 1215 3 b1.com 541 1212 2 b2.com 541 1210 1 b3.com 523 745 1 c1.com 435 689 2 d2.com 435 688 1 a4.com 256 345 1 s3.com 164 316 1 f1.com . . I want to get ROWS corresponding to 2 DISTINCT threadIDs starting from MAX, but I want to include duplicates as well. Something like AND p.threadID IN (Select just Two of all threadIDs currently selected, but include duplicate rows) So my result should be threadID postID positionID url 564 1254 2 a.com 564 1245 1 a1.com 541 1215 3 b1.com 541 1212 2 b2.com 541 1210 1 b3.com

    Read the article

  • How to eliminate duplicate rows?

    - by Odette
    hi guys im back with my original query and i just have one question please (ps: I know i have to vote and regsiter and I promise I will do that today) With the following query (t-sql) I am getting the correct results, except that there are duplicates now. I have been reading up and think I can use the PARTITION BY syntax - can you please show me how to incorporate the PARTITION BY syntax? WITH CALC1 AS (SELECT OTQUOT, OTIT01 AS ITEMS, ROUND(OQCQ01 * OVRC01,2) AS COST FROM @[email protected] WHERE OTIT01 < '' UNION ALL ... SELECT OTQUOT, OTIT10 AS ITEMS, ROUND(OQCQ10 * OVRC10,2) AS COST FROM @[email protected] WHERE OTIT10 < '' ) SELECT OTQUOT, DESC, ITEMS, RN FROM ( SELECT OTQUOT, ITEMS, B.IXRPGP AS GROUP, C.OTRDSC AS DESC, COST, ROW_NUMBER() OVER (PARTITION BY OTQUOT ORDER BY COST DESC) AS RN FROM CALC1 AS A INNER JOIN @[email protected] AS B ON (A.ITEMS = B.IKITMC) INNER JOIN DATAGRP.GDSGRP AS C ON (B.IXRPGP = C.OKRPGP) ) T RESULTS: 60408169 FENCING GNCPDCTP18BGBG 1 60408169 FENCING CGIFESHPD1795BG 2 60408169 FENCING GTTCGIBG 3 60408169 FENCING GBTCGIBG 4 How do I get rid of the duplicates? thanks Bill and all the others for your help (I am still learning!)

    Read the article

  • unix tool to remove duplicate lines from a file

    - by Nathan Fellman
    I have a tool that generates tests and predicts the output. The idea is that if I have a failure I can compare the prediction to the actual output and see where they diverged. The problem is the actual output contains some lines twice, which confuses diff. I want to remove the duplicates, so that I can compare them easily. Basically, something like sort -u but without the sorting. Is there any unix commandline tool that can do this?

    Read the article

  • SQL to delete duplicate records in a table [closed]

    - by oo
    Possible Duplicate: Delete duplicate records from a SQL table without a primary key I have a table with the columns person_ID firstname lastname and I somehow ended up with a bunch of duplicates. Is there any way to look at all columns where firstname and lastname are the same and delete all except one of them (it doesn't matter which one is left as they are all the same.) EDIT: I just found a duplicate question and perfect answer: http://stackoverflow.com/questions/985384/delete-duplicate-records-from-a-sql-table-without-a-primary-key

    Read the article

  • Removing duplicates without overriding hash method

    - by Javi
    Hello, I have a List which contains a list of objects and I want to remove from this list all the elements which have the same values in two of their attributes. I had though about doing something like this: List<Class1> myList; .... Set<Class1> mySet = new HashSet<Class1>(); mySet.addAll(myList); and overriding hash method in Class1 so it returns a number which depends only in the attributes I want to consider. The problem is that I need to do a different filtering in another part of the application so I can't override hash method in this way (I would need two different hash methods). What's the most efficient way of doing this filtering without overriding hash method? Thanks

    Read the article

  • Sql Server - INSERT INTO SELECT to avoid duplicates

    - by Ashish Gupta
    I have following two tables:- Table1 ------------- ID Name 1 A 2 B 3 C Table2 -------- ID Name 1 Z I need to insert data from Table1 to Table2 and I can use following sytax for the same:- INSERT INTO Table2(Id, Name) SELECT Id, Name FROM Table1 However, In my case duplicate Ids might exist in Table2 (In my case Its Just "1") and I dont want to copy that again as that would throw an error. I can write something like this:- IF NOT EXISTS(SELECT 1 FROM Table2 WHERE Id=1) INSERT INTO Table2 (Id, name) SELECT Id, name FROM Table1 ELSE INSERT INTO Table2 (Id, name) SELECT Id, name FROM Table1 WHERE Table1.Id<>1 Is there a better way to do this without using IF - ELSE? I want to avoid two INSERT INTO-SELECT statements based on some condition. Any help is appreciated.

    Read the article

  • Rails preventing duplicates in polymorphic has_many :through associations

    - by seaneshbaugh
    Is there an easy or at least elegant way to prevent duplicate entries in polymorphic has_many through associations? I've got two models, stories and links that can be tagged. I'm making a conscious decision to not use a plugin here. I want to actually understand everything that's going on and not be dependent on someone else's code that I don't fully grasp. To see what my question is getting at, if I run the following in the console (assuming the story and tag objects exist in the database already) s = Story.find_by_id(1) t = Tag.find_by_id(1) s.tags << t s.tags << t My taggings join table will have two entries added to it, each with the same exact data (tag_id = 1, taggable_id = 1, taggable_type = "Story"). That just doesn't seem very proper to me. So in an attempt to prevent this from happening I added the following to my Tagging model: before_validation :validate_uniqueness def validate_uniqueness taggings = Tagging.find(:all, :conditions => { :tag_id => self.tag_id, :taggable_id => self.taggable_id, :taggable_type => self.taggable_type }) if !taggings.empty? return false end return true end And it works almost as intended, but if I attempt to add a duplicate tag to a story or link I get an ActiveRecord::RecordInvalid: Validation failed exception. It seems that when you add an association to a list it calls the save! (rather than save sans !) method which raises exceptions if something goes wrong rather than just returning false. That isn't quite what I want to happen. I suppose I can surround any attempts to add new tags with a try/catch but that goes against the idea that you shouldn't expect your exceptions and this is something I fully expect to happen. Is there a better way of doing this that won't raise exceptions when all I want to do is just silently not save the object to the database because a duplicate exists?

    Read the article

  • php - sort and delete duplicates?

    - by c41122ino
    I've got an array that looks like this: Array ( [0] => Array ( num => 09989, dis => 20 ) [1] => Array ( num => 09989, dis => 10 ) [2] => Array ( num => 56676, dis => 15 ) [3] => Array ( num => 44533, dis => 20 ) [4] => Array ( num => 44533, dis => 50 ) ) First, I'm trying to sort them by num, and can't seem to get the usort example from php.net working here. It simply doesn't appear to be sorting... I'm also trying to delete the array element if it's a duplicate and whose dis value is higher than the other one. So, based on the example above, I'm trying to create: Array ( [0] => Array ( num => 09989, dis => 10 ) [1] => Array ( num => 44533, dis => 20 ) [2] => Array ( num => 56676, dis => 15 ) ) This is the code from php.net: function cmp($a, $b) { if ($a == $b) { return 0; } return ($a < $b) ? -1 : 1; }

    Read the article

  • C# SQLite file import prevent duplicates

    - by jakesankey
    Hi, I am attempting to get a directory (which is ever-growing) full of .txt comma delimited files to import into my SQLite db. I now have all of the files importing ok, however I need to have some way of excluding the files that have been previously added to db. I have a column in the db called FileName where the name and extension are stored next to each record from each file. Now I need to say 'If the code finds XXX.txt and XXX.txt is already in db, then skip this file'. Can I somehow add this logic to the getfiles command or is there another easy way? using (SQLiteCommand insertCommand = con.CreateCommand()) { SQLiteCommand cmdd = con.CreateCommand(); string[] files = Directory.GetFiles(@"C:\Documents and Settings\js91162\Desktop\", "R303717*.txt*", SearchOption.AllDirectories); foreach (string file in files) { string FileNameExt1 = Path.GetFileName(file); cmdd.CommandText = @" SELECT COUNT(*) FROM Import WHERE FileName = @FileExt;"; cmdd.Parameters.Add(new SQLiteParameter("@FileExt", FileNameExt1)); int count = Convert.ToInt32(cmdd.ExecuteScalar()); //int count = ((IConvertible)insertCommand.ExecuteScalar().ToInt32(null)); if (count == 0) { Console.WriteLine("Parsing CMM data for SQL database... Please wait."); insertCommand.CommandText = @" INSERT INTO Import (FeatType, FeatName, Value, Actual, Nominal, Dev, TolMin, TolPlus, OutOfTol, PartNumber, CMMNumber, Date, FileName) VALUES (@FeatType, @FeatName, @Value, @Actual, @Nominal, @Dev, @TolMin, @TolPlus, @OutOfTol, @PartNumber, @CMMNumber, @Date, @FileName);"; insertCommand.Parameters.Add(new SQLiteParameter("@FeatType", DbType.String)); insertCommand.Parameters.Add(new SQLiteParameter("@FeatName", DbType.String)); insertCommand.Parameters.Add(new SQLiteParameter("@Value", DbType.String)); insertCommand.Parameters.Add(new SQLiteParameter("@Actual", DbType.Decimal)); insertCommand.Parameters.Add(new SQLiteParameter("@Nominal", DbType.Decimal)); insertCommand.Parameters.Add(new SQLiteParameter("@Dev", DbType.Decimal)); insertCommand.Parameters.Add(new SQLiteParameter("@TolMin", DbType.Decimal)); insertCommand.Parameters.Add(new SQLiteParameter("@TolPlus", DbType.Decimal)); insertCommand.Parameters.Add(new SQLiteParameter("@OutOfTol", DbType.Decimal)); insertCommand.Parameters.Add(new SQLiteParameter("@Comment", DbType.String)); string FileNameExt = Path.GetFileName(file); string RNumber = Path.GetFileNameWithoutExtension(file); string RNumberE = RNumber.Split('_')[0]; string RNumberD = RNumber.Split('_')[1]; string RNumberDate = RNumber.Split('_')[2]; DateTime dateTime = DateTime.ParseExact(RNumberDate, "yyyyMMdd", Thread.CurrentThread.CurrentCulture); string cmmDate = dateTime.ToString("dd-MMM-yyyy"); string[] lines = File.ReadAllLines(file); bool parse = false; foreach (string tmpLine in lines) { string line = tmpLine.Trim(); if (!parse && line.StartsWith("Feat. Type,")) { parse = true; continue; } if (!parse || string.IsNullOrEmpty(line)) { continue; } Console.WriteLine(tmpLine); foreach (SQLiteParameter parameter in insertCommand.Parameters) { parameter.Value = null; } string[] values = line.Split(new[] { ',' }); for (int i = 0; i < values.Length - 1; i++) { SQLiteParameter param = insertCommand.Parameters[i]; if (param.DbType == DbType.Decimal) { decimal value; param.Value = decimal.TryParse(values[i], out value) ? value : 0; } else { param.Value = values[i]; } } insertCommand.Parameters.Add(new SQLiteParameter("@PartNumber", RNumberE)); insertCommand.Parameters.Add(new SQLiteParameter("@CMMNumber", RNumberD)); insertCommand.Parameters.Add(new SQLiteParameter("@Date", cmmDate)); insertCommand.Parameters.Add(new SQLiteParameter("@FileName", FileNameExt)); // insertCommand.ExecuteNonQuery(); } } } Console.WriteLine("CMM data successfully imported to SQL database..."); } con.Close(); }

    Read the article

  • Select count / duplicates

    - by mike
    Hello! I have a table with all U.S. zip codes. each row contains the city and state name for the zip code. I'm trying to get a list of cities that show up in multiple states. This wouldn't be a problem if there weren't X amount of zip codes in the same city... So basically, I just want to the city in a state to count as 1 instead of it counting the city/state 7 times because there are 2+ zip codes in that city/state... I'm not really sure how to do this. I know I need to use count but how do I tell the mysql to only count a given city/state combo as 1?

    Read the article

  • Check for Duplicates in a Database Before Entering Data

    - by gamerzfuse
    Before Entering data into a database, I just want to check that the database doesn't have the same username in the database already. I have the username in SQL set as a key, so it can't be duplicated on that end, but I am looking at finding a more user-friendly error message then "KEY already exists". Is there are simple way to check if the variable value already exists in a row? Thanks!

    Read the article

  • How do I prevent duplicates, in XSL?

    - by LOlliffe
    How do I prevent duplicate entries into a list, and then ideally, sort that list? What I'm doing, is when information at one level is missing, taking the information from a level below it, to building the missing list, in the level above. Currently, I have XML similar to this: <c03 id="ref6488" level="file"> <did> <unittitle>Clinic Building</unittitle> <unitdate era="ce" calendar="gregorian">1947</unitdate> </did> <c04 id="ref34582" level="file"> <did> <container label="Box" type="Box">156</container> <container label="Folder" type="Folder">3</container> </did> </c04> <c04 id="ref6540" level="file"> <did> <container label="Box" type="Box">156</container> <unittitle>Contact prints</unittitle> </did> </c04> <c04 id="ref6606" level="file"> <did> <container label="Box" type="Box">154</container> <unittitle>Negatives</unittitle> </did> </c04> </c03> I then apply the following XSL: <xsl:template match="c03/did"> <xsl:choose> <xsl:when test="not(container)"> <did> <!-- If no c03 container item is found, look in the c04 level for one --> <xsl:if test="../c04/did/container"> <!-- If a c04 container item is found, use the info to build a c03 version --> <!-- Skip c03 container item, if still no c04 items found --> <container label="Box" type="Box"> <!-- Build container list --> <!-- Test for more than one item, and if so, list them, --> <!-- separated by commas and a space --> <xsl:for-each select="../c04/did"> <xsl:if test="position() &gt; 1">, </xsl:if> <xsl:value-of select="container"/> </xsl:for-each> </container> </did> </xsl:when> <!-- If there is a c03 container item(s), list it normally --> <xsl:otherwise> <xsl:copy-of select="."/> </xsl:otherwise> </xsl:choose> </xsl:template> But I'm getting the "container" result of <container label="Box" type="Box">156, 156, 154</container> when what I want is <container label="Box" type="Box">154, 156</container> Below is the full result that I'm trying to get: <c03 id="ref6488" level="file"> <did> <container label="Box" type="Box">154, 156</container> <unittitle>Clinic Building</unittitle> <unitdate era="ce" calendar="gregorian">1947</unitdate> </did> <c04 id="ref34582" level="file"> <did> <container label="Box" type="Box">156</container> <container label="Folder" type="Folder">3</container> </did> </c04> <c04 id="ref6540" level="file"> <did> <container label="Box" type="Box">156</container> <unittitle>Contact prints</unittitle> </did> </c04> <c04 id="ref6606" level="file"> <did> <container label="Box" type="Box">154</container> <unittitle>Negatives</unittitle> </did> </c04> </c03> Thanks in advance for any help!

    Read the article

  • SQL Query to find duplicates not returning any results

    - by TheDudeAbides
    I know there are duplicate account numbers in this table, but this query returns no results. SELECT [CARD NUMBER],[CUSTOMER NAME],[ACCT NBR 1],[ACCT NBR 2], COUNT([ACCT NBR 1]) AS NumOccurences FROM DebitCardData.dbo.['ATM Checking Accts - Active$'] GROUP BY [CARD NUMBER],[CUSTOMER NAME],[ACCT NBR 1],[ACCT NBR 2] HAVING (COUNT([ACCT NBR 1])1)

    Read the article

  • Using LINQ to remove dupicates in dictionary and the count of those duplicates

    - by Robert
    I have some code that returns unique elements in my dictionary, but I would also like to return the count of the duplicate elements. Basically change dictionary[key, uniqueelement] to dictionary[uniqueelement, count]. Here is my code that just returns the unique elements. var uniqueItems = deviceInstances.Children.GroupBy(pair => pair.Value.Information.UnderlyingDeviceType) .Select(group => group.First()) .ToDictionary(pair => pair.Key, pair => pair.Value.Information.UnderlyingDeviceType.ToString());

    Read the article

  • Deleting Duplicates in MySQL

    - by elmaso
    Query was this: CREATE TABLE `query` ( `id` int(11) NOT NULL auto_increment, `searchquery` varchar(255) NOT NULL default '', `datetime` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM first I want to drop the table with: ALTER TABLE `querynew` DROP `id` and then delete the double entries.. I tried it with: INSERT INTO `querynew` SELECT DISTINCT * FROM `query` but with no success.. :( and with ALTER TABLE query ADD UNIQUE ( searchquery ) - is it possible to save the queries only one time?

    Read the article

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