Avatar of PeterBaileyUk
PeterBaileyUk
 asked on

sql server query

I have a table with chords and scale types. I would like to choose a chord for this explanation a "cmin" and return the rows where cmin appears in anyof the columns from 1 to dim7
not sure how to do that


here's example data

ID      ScaleType      i      ii      iii      iv      v      vi      vii      Dim7      Tonic      GridLength
1      Major      C maj      D min      E min      F maj      G maj      A min      B dim      -      C      7
2      Minor      C min      D min      D# maj      F min      G min      G# maj      A# maj      -      C      7
3      Dorian      C min      D min      D# maj      F maj      G min      A dim      A# maj      -      C      7
4      Mixolydian      C maj      D min      E dim      F maj      G min      A min      A# maj      -      C      7
5      Lydian      C maj      D maj      E min      F# dim      G maj      A min      B min      -      C      7
6      Phrygian      C min      C# maj      D# maj      F min      G dim      G# maj      A# min      -      C      7
7      Locrian      C dim      C# maj      D# min      F min      F# maj      G# maj      A# min      -      C      7
8      Diminished      C dim      C# dim      D# dim      E dim      F# dim      G dim      A dim      A# dim      C      8
9      Whole-half      C dim      D dim      D# dim      F dim      F# dim      G# dim      A dim      B dim      C      8
10      Whole Tone      C aug      D aug      E aug      F# aug      G# aug      A# aug      -      -      C      6
11      Minor Blues      C sus      D# min      F sus2      D# min      F sus2      D# min      -      -      C      6
12      Minor Pentatonic      A# sus2      C min      D# sus2      F sus2      D# maj      -      -      -      C      5
13      Major Pentatonic      A min      C sus2      D sus2      C maj      G sus2      -      -      -      C      5
14      Harmonic Minor      C min      D dim      D# Aug      F min      G maj      G# maj      B dim      -      C      7
ee.JPG
Microsoft SQL Server

Avatar of undefined
Last Comment
PortletPaul

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
PortletPaul

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PeterBaileyUk

ASKER
thank you
PortletPaul

a pleasure, thank you
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck