I'm stuck on a SQL statement and am admittedly not a SQL expert. I'm accessing an Oracle DB with MS Access.
I want to write a SQL statement to display partners according to the following categories:
Preferred: those with whom we have established long standing relationships
Standard: Good partners but not frequently used
New: Relatively little information known about them- last resort
OK. Now, my issue is that I have these stored in the DB with a Y/N indicator in two fields.
pref_part_indic = Y or N
strd_part_indic= Y or N
so I want to write a statement that will look at these two fields and do the following:
If pref_part_indic is Y display "Preferred"
if strd_part_indic is Y display "Standard"
if both are fields are N display "New"
Not being a SQL expert I thought this looked easy, then discovered that I can't just write a simple If Then Else statement because I have to look at the contents of two fields.
Help...?
Joseph
I want to write a SQL statement to display partners according to the following categories:
Preferred: those with whom we have established long standing relationships
Standard: Good partners but not frequently used
New: Relatively little information known about them- last resort
OK. Now, my issue is that I have these stored in the DB with a Y/N indicator in two fields.
pref_part_indic = Y or N
strd_part_indic= Y or N
so I want to write a statement that will look at these two fields and do the following:
If pref_part_indic is Y display "Preferred"
if strd_part_indic is Y display "Standard"
if both are fields are N display "New"
Not being a SQL expert I thought this looked easy, then discovered that I can't just write a simple If Then Else statement because I have to look at the contents of two fields.
Help...?
Joseph