Forum Replies Created

Viewing 15 posts - 31 through 45 (of 61 total)

  • RE: Get file names from directory??

    Yeah, the photo names are actually in various sub-directories. There are 2005 sub-directories containnig photo names for over a million photos. Yes, the path is same + a subdirectory. This...

  • RE: Get file names from directory??

    Yeah, I also came up with that solution from talking to a co-worker, but now another issue. First, following is my syntax, which works fine:

    Exec master..xp_cmdShell 'dir \\web-jnn-iisjnn1\mn\public\106-jnn\jnn_ID_PHOTOS /s...

  • RE: INNER JOIN brings a duplicate record

    I figured it out! There was another table that I had to JOIN on and now I get only one record. The value that was different for the identical record...

  • RE: INNER JOIN brings a duplicate record

    Also, there are no duplicate or bogus records in  PSM table. Each record is unique with a unique PGUID.

  • RE: INNER JOIN brings a duplicate record

    Following values are returned by the query:

    PGUID: BA9687DC-C465-428A-A49E-5927F592JLC0

    LISTAID: 240509

    LISTOID: 03396

    LISTANBR: 240509

    PRID: 3520

    LISTOLSNBR: 03396

    OfficeID: 26

    PGUID: BA9687DC-C465-428A-A49E-5927F592JLC0

    LISTAID: 240509

    LISTOID: 03396

    LISTANBR: 240509

    PRID: 3520

    LISTOLSNBR: 03396

    OfficeID: 26

    PSM table has records with agentID and OfficeID. I want...

  • RE: INSERT Question

    Just FYI, table referenced as A doesn't have a field UserID at all so I am joining on table referenced as B, which does have a UserID field.

    Thanks.

  • RE: INSERT Question

    Thanks, Ryan! That was it!

    JN

  • RE: INSERT Question

    Hello,

    Well, it turns out I do need to import the UserID field, which is the only field that makes a record unique, though key fields are duplicated. If I wasn't importing...

  • RE: INSERT Question

    Never mind the previous post... I was working with wrong statement so DISTINCT wasn't working. Anyway, I opened my original statement and added back the DISTINCT and it worked!! I...

  • RE: INSERT Question

    I think I might have confused you. Yes, I do have multiple unique combination per primary key. See below:

    ID1   ID2   ID3   Adress         City   Zip

    1      A      T     123 My St.    My    12345

    ID1   ID2   ID3  ...

  • RE: INSERT Question

    This is going to be tricky, it seems! The field that makes the duplicated record unique is a UserID, which I am not even importing, but if I need to I can,...

  • RE: INSERT Question

    SELECT  B.ListingID, B.SourceID, B.PropCID

    FROM  dbo.tmp_Listings B

    Inner Join dbo.PropR A

      On A.ListingID = B.MLSID AND A.SourceID = B.SourceID AND A.PropCID = B.PropCID

    Inner Join

    (

      Select MIN(A.ListingID) AS FirstListingID, MIN(A.SourceID) AS FirstSourceID,

     MIN(A.PropCID) AS...

  • RE: INSERT Question

    Yeah, the first occurance is arbitrary. It doesn't matter whether A is first or B is first, I just want to take whichever record the INSERT reads first.

    The records are...

  • RE: Insert INTO Fails ???

    Both IN clause and EXISTS clause are giving same error if I copy the statement the way it's written in the post. I will see if I need to modify...

  • RE: Insert INTO Fails ???

    Thanks, but I still get

    "Invalid Column Name" PropTID

    That column is found in tmp_Listings table.

    But if I use LEFT JOIN then I get no such error regarding columns not found and get all...

Viewing 15 posts - 31 through 45 (of 61 total)