Cross-checking data in 2 tables
Cross-checking data in 2 tables
am 02.11.2004 19:01:04 von Astra
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
MJB MJB
V566
KBG KBG
etc.... etc....
Many thanks for any help you can give.
Rgds
Robbie
Re: Cross-checking data in 2 tables
am 02.11.2004 20:38:55 von reb01501
Astra wrote:
> 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
> MJB MJB
> V566
> KBG KBG
> etc.... etc....
>
> Many thanks for any help you can give.
>
> Rgds
>
> Robbie
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.
Re: Cross-checking data in 2 tables
am 03.11.2004 20:57:12 von Laphan
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] wrote in message
news:#DXOYORwEHA.1564@TK2MSFTNGP09.phx.gbl...
Astra wrote:
> 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
> MJB MJB
> V566
> KBG KBG
> etc.... etc....
>
> Many thanks for any help you can give.
>
> Rgds
>
> Robbie
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.
Re: Cross-checking data in 2 tables
am 03.11.2004 21:35:48 von reb01501
Laphan wrote:
> 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?
>
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.