N
Nick hfrupn
I am trying to set up a query where the selection criterion comes from a
list. The list has records that contain wild cards eg.
NP-CS-PT1-CYSYS1-CP*-CHUTE*
NP-CS-PT1-CYSYS1-TPRP03-CHUTE*
NP-ST-CY6-CP*-CHUTE*
If I remove the wild cards eg NP-CS-PT1-CYSYS1-TPRP03-CHUTE or
NP-CS-PT1-CYSYS1, I get a result from the query. I need the query to be able
to recognise the wild card otherwise I would have to type in excessive number
of records for each list with the possibility of missing some.
Is there any way I can achieve this with the use of wild cards?
I have included the SQL from my query.
Regards
Nick
SELECT qyBacklog.FunctLocation, qyBacklog.Description, qyBacklog.Order,
qyBacklog.[Oper#/Act#], qyBacklog.[Order Type], qyBacklog.[Control key],
qyBacklog.[Work Center], qyBacklog.Description_wc, qyBacklog.[Planner group],
qyBacklog.Description_pg, qyBacklog.Res_Person, qyBacklog.[Opr# short text],
qyBacklog.[Normal duration], qyBacklog.Number, qyBacklog.Work,
qyBacklog.SystemCondition, qyBacklog.[Purch#req#], qyBacklog.[Earl#start
date], qyBacklog.Priority, qyBacklog.[System Status], qyBacklog.Equipment,
qyBacklog.Recipient, qyBacklog.[Std text key], [Forms]![Backlog
Selection2]!
list. The list has records that contain wild cards eg.
NP-CS-PT1-CYSYS1-CP*-CHUTE*
NP-CS-PT1-CYSYS1-TPRP03-CHUTE*
NP-ST-CY6-CP*-CHUTE*
If I remove the wild cards eg NP-CS-PT1-CYSYS1-TPRP03-CHUTE or
NP-CS-PT1-CYSYS1, I get a result from the query. I need the query to be able
to recognise the wild card otherwise I would have to type in excessive number
of records for each list with the possibility of missing some.
Is there any way I can achieve this with the use of wild cards?
I have included the SQL from my query.
Regards
Nick
SELECT qyBacklog.FunctLocation, qyBacklog.Description, qyBacklog.Order,
qyBacklog.[Oper#/Act#], qyBacklog.[Order Type], qyBacklog.[Control key],
qyBacklog.[Work Center], qyBacklog.Description_wc, qyBacklog.[Planner group],
qyBacklog.Description_pg, qyBacklog.Res_Person, qyBacklog.[Opr# short text],
qyBacklog.[Normal duration], qyBacklog.Number, qyBacklog.Work,
qyBacklog.SystemCondition, qyBacklog.[Purch#req#], qyBacklog.[Earl#start
date], qyBacklog.Priority, qyBacklog.[System Status], qyBacklog.Equipment,
qyBacklog.Recipient, qyBacklog.[Std text key], [Forms]![Backlog
Selection2]!
- AS List
FROM [qyBacklog 1], qyBacklog
WHERE (((qyBacklog.FunctLocation) In (SELECT [Floc] FROM [qyBacklog 1]))) OR
((([Forms]![Backlog Selection2]!- ) Is Null))
ORDER BY qyBacklog.FunctLocation, qyBacklog.Order, qyBacklog.[Oper#/Act#];
- ) Is Null))