Forum Replies Created

Viewing 15 posts - 1 through 15 (of 34 total)

  • RE: Look up duplicates

    I imported an Excel file, so I was looking at that. It's sorted by name, then by date (newest to oldest) so that the first occurrence of each customer is...

  • RE: Look up duplicates

    Hi Jared, Luis

    "...It is creating a derived table of minimum id's when grouped by name."

    Instead of creating the derived table sorted by...

  • RE: Look up duplicates

    Thanks Jared, that explains it.

  • RE: Look up duplicates

    Luis Cazares (7/30/2012)


    SELECT m.Master, t.ID FROM @tTable t

    JOIN ( SELECT MIN(ID) AS Master,

    name

    FROM @tTable

    GROUP BY name) M ON t.name = m.name AND m.Master <> t.ID;

    [/code]

    Would you mind explaining what is...

  • RE: Look up duplicates

    Thanks Luis, that works well.

  • RE: Look up duplicates

    That looks good, however I am using SQLite (www.sqlite.org) and it doesn't seem to work with it.

    Would I need MS SQL 2008 R2 Express to run it?

  • RE: Filter Large table using small one

    Yes, that's looking good. The actual file has 51 columns and 117,000 rows but it should be possible to apply the same procedures to it.

  • RE: Filter Large table using small one

    ...The "first occurrence" will be the lowest value of "Project_" in "Large". I hope that's clear!

    Tom

  • RE: Filter Large table using small one

    You are correct Journeyman. The data in this table got corrupted somehow. I will try to post the correct data.

    I'm not familiar with inserting Excel files into SQL so I'm...

  • RE: Filter Large table using small one

    Thanks for all the help so far.

    I still don't have a solution.

    If I run these queries:

    SELECT [Project Country Code], [Project Number], [Unique Number], [Old dwg number], [Reuse], [Drawing no. seq],...

  • RE: Filter Large table using small one

    OK, thanks for your help.

    So, with the 2 tables created details below, I want to create a third table that contains the fields from "Smalltable" and the corresponding record from...

  • RE: Filter Large table using small one

    Sorry but I'm not sure what this does. I ran the query and it says

    (28 row(s) affected)

    (100 row(s) affected)

    Tom

    Cadavre (12/1/2011)


    tmccar (12/1/2011)


    Yes, you are right - the drawing number should not...

  • RE: Filter Large table using small one

    Yes, you are right - the drawing number should not have the ".dwg" extension

    OK, here is what I've tried:

    SELECT Smalltable.[Drawing Number], "Path"

    FROM Smalltable

    INNER JOIN Largetable

    ON Smalltable.[Drawing Number]=Largetable.[Drawing Number]

    But I'm not...

  • RE: Filter excel file with single-column file.

    John Mitchell-245523 (11/29/2011)


    Now I'm confused, because your latest query contains a column (Project Number) that wasn't in the sample data you posted. This is why it's important for you...

  • RE: Filter excel file with single-column file.

    Here is the command that I'm using which gives me 2 columns, Drawing Number and Project Number.

    SELECT dbo.Largefile.[Drawing Number], MIN([Project Number])

    FROM dbo.Largefile

    JOIN dbo.Smallfile ON dbo.Largefile.[Drawing Number] =...

Viewing 15 posts - 1 through 15 (of 34 total)