Hi,
I'd like to join on 2 fields(see image below: child name and produce name 1). i need a case statement to join on green brussels after the semicolon and if there's no semicolon, join on brussels sprouts before the semicolon.
Here's my sql syntax so far:
inner join [srp].[ProduceChildItems] as pci
on c.produce=
SUBSTRING(pci.ChildName, 0, charindex(':', pci.ChildName, 0))--before character
Any help will be appreciated.
,Hi,
I'd like to join on 2 fields(see image below: child name and produce name 1). i need a case statement to join on green brussels after the semicolon and if there's no semicolon, join on brussels sprouts before the semicolon.
Here's my sql syntax so far:
inner join [srp].[ProduceChildItems] as pci
on c.produce=
SUBSTRING(pci.ChildName, 0, charindex(':', pci.ChildName, 0))--before character
Any help will be appreciated.