Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Sub Groups

$
0
0

I have a table called bom10500 that looks like the first table below.  What kind of query can I create from this table that gives me a fifth column called "top level" as shown in the second table below?  I am not sure what kind of TSQL query that will give me this...

Part Component Group Sub Unit
878-00 878-01 A 1
878-00 878-02 A 0
878-00 878-03 A 0
878-00 878-04 A 0
878-00 878-05 B 1
878-00 878-06 B 0
878-00 878-07 C 1
878-00 878-08 C 0
878-00 878-09 C 0
Part Component Group Sub Unit Top Level
878-00 878-01 A 1 878-01
878-00 878-02 A 0 878-01
878-00 878-03 A 0 878-01
878-00 878-04 A 0 878-01
878-00 878-05 B 1 878-05
878-00 878-06 B 0 878-05
878-00 878-07 C 1 878-07
878-00 878-08 C 0 878-07
878-00 878-09 C 0 878-07


http://www.isolutionspartners.com/


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>