Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2004
    Posts
    56

    Unanswered: Help in importing text

    Hi,

    I have to export data in a table in one database through to another. I have to use .HTML to do this to make it easier. I have written code to import the HTML table into a temporary table in the recieving database. I then use queries to update the temp table before an append query finally updates that data into the master receiving table.

    Now i've explained that - here's my problem.

    I use a duplicate query to find duplicates in one of the fields in the master receiving table. However some of the records have blank fields in the fields that are being searched for duplicates. The duplicate query is finding these as duplicates even though they are blank.

    How can I stop the query treating these empty fields as duplicates?

    Many thanks in anticipation that someone actually understood all of that !!!

  2. #2
    Join Date
    Feb 2005
    Posts
    20
    can you please post your query's sql

  3. #3
    Join Date
    Jul 2004
    Posts
    56

    Here you go

    Here it is

    SELECT [Tbl Name].[Number], [Tbl Name].[Last Name], [Tbl Name].[First Name], [Tbl Name].DOB, [Tbl Name].SSN, [Tbl Jobs Table].[EM Job Name]
    FROM [Tbl Name] INNER JOIN [Tbl Jobs Table] ON [Tbl Name].Job = [Tbl Jobs Table].[Unique Number]
    WHERE ((([Tbl Name].[Number]) In (SELECT [Number] FROM [Tbl Name] As Tmp GROUP BY [Number] HAVING Count(*)>1 )))
    ORDER BY [Tbl Name].[Number];

  4. #4
    Join Date
    Feb 2005
    Posts
    20
    what about extending your sql with a condition "[Tbl Name].[Number] Is Not Null"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •