Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL String Array Command Code

Status
Not open for further replies.

ccding

MIS
Jul 10, 2007
41
US
SQL Server DB;

Hi all, can anyone help me with this SQL Select statement?

I have a Srring Array field named: Region.
(The array can contain up to 4 elements.)
What is the SQL code to select records that are IN a specific region?

Example of Current output:
CompName Region
CompA NA; Europe;
CompB Eastern Europe;
CompC Europe; Eastern Europe; Asia; Other
CompD Asia;
CompE Europe
CompF NA; Asia

If I wanted to retrieve companies that are IN region(s) of: Europe or Eastern Europe, what would the SQL code be?

Expected Output for Region(s) IN Europe or IN Eastern Europe
CompName
CompA
CompB
CompC
CompE

Thanks again for all of your time and thought on this one.

 
Please don't start new posts on the same topic just because you weren't satisfied with the results you got the first time around.

-LB
 
I am sorry about a second post. I thought of rephrasing the issue may get a clearer understanding.
Thank you for your responses in above though !!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top