| Author |
SQL statement question
|
|
|
| Hello.
Thank you for reading this question.
Any ideas on how to determine if the relationship between two fields in a
table? As 1:1, 1:M or M:M? I'm spinning my wheels on how to get started
with this.
Thank you!
Diane
| |
| Kevin3NF 2005-10-27, 7:55 am |
| 2 fields in the same table is 1:1....or did you mean the join fields in two
different tables?
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
"Diane" <someone@example.com> wrote in message
news:3B9BF477-5F48-4924-BABC- BCD110A0D427@microso
ft.com...
> Hello.
>
> Thank you for reading this question.
>
> Any ideas on how to determine if the relationship between two fields in a
> table? As 1:1, 1:M or M:M? I'm spinning my wheels on how to get started
> with this.
>
> Thank you!
> Diane
| |
|
|
|
| The table is just a dump from another DB that we have no visibility into.
It's kind of like this -
Company Employee
XYZ Sue
BAC Bill
RTY Sue
XYZ Ted
..... ....
I need to group all the companies:employees that are 1:1, 1:M & M:M into
seperate catagories and then get a count of each.
HTH.
Thank you for your help!
Diane
"SQL" wrote:
> If I really understood your question correctly then do a self join on
> the 2 fields, group them and count them
>
> http://sqlservercode.blogspot.com/
>
>
| |
|
| Hi, Kevin.
They are in the same table.
The table is just a dump from another DB that we have no visibility into.
It's kind of like this -
Company Employee
XYZ Sue
BAC Bill
RTY Sue
XYZ Ted
..... ....
I need to group all the companies:employees that are 1:1, 1:M & M:M into
seperate catagories and then get a count of each.
HTH.
Thank you for your help!
Diane
"Kevin3NF" wrote:
> 2 fields in the same table is 1:1....or did you mean the join fields in two
> different tables?
>
> --
> Kevin Hill
> President
> 3NF Consulting
>
> www.3nf-inc.com/NewsGroups.htm
>
>
> "Diane" <someone@example.com> wrote in message
> news:3B9BF477-5F48-4924-BABC- BCD110A0D427@microso
ft.com...
>
>
>
|
|
|
|