Professional Web Applications Themes

Cross-checking data in 2 tables - ASP Database

Dear All I have 2 SQL tables called STOCK and STOCKDESCS. The common field is STOCKID. In the STOCK table I have all of the rows that I have posted, but my STOCKDESCS table is short of the same rows. Do you know of a quick query I could use that basically lists the following (table STOCK) (table STOCKDESCS) (field STOCKID) (field STOCKID) IVP IVP STP STP JVC2 JVC2 TOSH4 <blank and therefore a missing row> MJB MJB V566 <blank and therefore a missing row> KBG KBG etc.... etc.... Many thanks for any help you can give. Rgds Robbie...

  1. #1

    Default Cross-checking data in 2 tables

    Dear All

    I have 2 SQL tables called STOCK and STOCKDESCS.

    The common field is STOCKID.

    In the STOCK table I have all of the rows that I have posted, but my
    STOCKDESCS table is short of the same rows.

    Do you know of a quick query I could use that basically lists the following

    (table STOCK) (table STOCKDESCS)
    (field STOCKID) (field STOCKID)
    IVP IVP
    STP STP
    JVC2 JVC2
    TOSH4 <blank and therefore a missing row>
    MJB MJB
    V566 <blank and therefore a missing row>
    KBG KBG
    etc.... etc....

    Many thanks for any help you can give.

    Rgds

    Robbie


    Astra Guest

  2. #2

    Default Re: Cross-checking data in 2 tables

    Astra wrote: 

    Select s.STOCKID
    FROM STOCK s left join STOCKDESCS d
    ON s.STOCKID = d.STOCKID
    WHERE d.STOCKID Is Null

    Bpb Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Guest

  3. #3

    Default Re: Cross-checking data in 2 tables

    genius bob

    i owe you yet again.

    don't suppose there is a tech book or site that explains these kind of
    things so that I can stop bugging you - is there?

    Rgds Robbie

    Bob Barrows [MVP] <SPAMcom> wrote in message
    news:#phx.gbl...
    Astra wrote: 

    Select s.STOCKID
    FROM STOCK s left join STOCKDESCS d
    ON s.STOCKID = d.STOCKID
    WHERE d.STOCKID Is Null

    Bpb Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.




    Laphan Guest

  4. #4

    Default Re: Cross-checking data in 2 tables

    Laphan wrote: 

    There are many books out there about sql. You should find one that
    concentrates on your database - is it Access?

    I learned most of what I know from the Help files, so I really can't
    recommend a book.

    Bob Barrows
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.


    Bob Guest

Similar Threads

  1. Replies: 1
    Last Post: October 5th, 06:53 AM
  2. checking whether fileNames are same as data
    By joonstar in forum Macromedia ColdFusion
    Replies: 0
    Last Post: April 7th, 02:29 PM
  3. entering data by using wsdl(cross)
    By Savas Ates in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 22nd, 06:38 PM
  4. checking mysql tables
    By Rusty Wright in forum PHP Development
    Replies: 2
    Last Post: September 20th, 05:09 AM
  5. Replies: 1
    Last Post: July 10th, 08:29 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139