Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!198.186.194.250.MISMATCH!news-xxxfer.readnews.com!news-out.readnews.com!transit4.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: srgebauer@gmail.com Newsgroups: comp.databases.ms-sqlserver Subject: One to many issue Date: Wed, 2 Nov 2011 13:15:30 -0700 (PDT) Organization: http://groups.google.com Lines: 26 Message-ID: <21551923.2109.1320264930406.JavaMail.geo-discussion-forums@yqgn17> Reply-To: comp.databases.ms-sqlserver@googlegroups.com NNTP-Posting-Host: 137.118.140.5 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1320265718 4080 127.0.0.1 (2 Nov 2011 20:28:38 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 2 Nov 2011 20:28:38 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=137.118.140.5; posting-account=JPdnBQoAAAD38nxCqKZPvvWXLnmPvrIa User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:777 I have a two tables, Stock and Bin, with Stock having one to Bin's many. St= ock has fields Number and Desc1 and Bin has Number, Warehouse, and Units. = I would like to join Stock and Bin on Number and use the value in Bin.wareh= ouse as a field name with Bin.units as the value.=20 For Example: Stock table Number....Desc1 100.....WidgetA 110.....WidgetB Bin Table Number...Warehouse...Units 100...NCWARE...10 100...PAWARE...15 100...OS1NC...100 110...NCWARE...20 110...PAWARE...30 Output would be: Number...Desc1...NCWARE...PAWARE...OS1NC 100...WidgetA...10...15...100 110...WidgetB...20...30...0 Is this possible? Thanks Shane