MarkSmith99
Technical User
Hi,
I was wondering if anyone would be able to help with a issue I am having.
I have 2 tables set-up as below, both tables contain NumID and I need a statement that will take select the distinct NumID's (as it maybe in there more than once) from table1 then count how many times the same NumID appears in Table2.
I also need the statement to show the rest of the columns in table1 to in the results if possible.
I have spent several hours trying to get this to work but being new to t-sql I'm struggling.
Any help would be great thanks in advance.
Mark
I was wondering if anyone would be able to help with a issue I am having.
I have 2 tables set-up as below, both tables contain NumID and I need a statement that will take select the distinct NumID's (as it maybe in there more than once) from table1 then count how many times the same NumID appears in Table2.
I also need the statement to show the rest of the columns in table1 to in the results if possible.
Code:
[b]Table1 Table2[/b]
NumID NumID
Date
Item
Item2
I have spent several hours trying to get this to work but being new to t-sql I'm struggling.
Any help would be great thanks in advance.
Mark