--I need to return all the columns for detail and apply the Identifier from @Customer where the @CustomerDetail record with the > 0 or positive CurrencyType
Declare @Customer Table ( CustomerCode varchar(50), CustomerDate date, CurrencyType varchar(50), Identifier int ) Insert into @Customer values ('ABC', '3/15/2017', 'CAD', 1234), ('ABC', '3/15/2017', 'USD', 5678); Declare @CustomerDetail Table ( CustomerCode varchar(50), CustomerDate date, CurrencyType varchar(50), CustomerAmount int ) Insert into @CustomerDetail values ('ABC', '3/15/2017', 'CAD', -100), ('ABC', '3/15/2017', 'USD', 300) SELECT * FROM @Customer SELECT * FROM @CustomerDetail
Gain unlimited access to on-demand training courses with an Experts Exchange subscription.Get Access
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE
Connect with Certified Experts to gain insight and support on specific technology challenges including: