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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

If field is not "xld"-how can I show as Blank? 1

Status
Not open for further replies.

netrusher

Technical User
Feb 13, 2005
952
US
Below is the SQL I have for a query. One of the Fields is
Replaces. I need this field and here is my question.
If this field has anything but xld I would like for
it to show as blank. Can this be done? If so, how can I
accomplish this?

Code:
SELECT
ECNPartstbl.[Part #], ECNPartstbl.Resp, ECNPartstbl.Replaces
FROM 
ECNBCNVIPtbl 
INNER JOIN (ECNDetailtbl INNER JOIN ECNPartstbl ON ECNDetailtbl.[ECNBCNVIP ID] = ECNPartstbl.[ECNBCNVIP ID]) ON (ECNBCNVIPtbl.[ECNBCNVIP ID] = ECNPartstbl.[ECNBCNVIP ID]) 
AND 
(ECNBCNVIPtbl.[ECNBCNVIP ID] = ECNDetailtbl.[ECNBCNVIP ID])
WHERE 
(((ECNPartstbl.[Rev Lev])="n" Or (ECNPartstbl.[Rev Lev])="NEW") 
AND 
((ECNPartstbl.Resp)="PUR") 
AND 
((ECNDetailtbl.[Revised Planned Implementation Date])=[Enter Bucket Date-2nd Monday of Month-Format MM/DD/YY:])) 
OR 
(((ECNPartstbl.[Rev Lev])="n" 
Or 
(ECNPartstbl.[Rev Lev])="NEW") 
AND 
((ECNPartstbl.Resp)="mfg") 
AND 
((ECNDetailtbl.[Revised Planned Implementation Date])=[Enter Bucket Date-2nd Monday of Month-Format MM/DD/YY:])) 
OR 
(((ECNPartstbl.[Rev Lev])="n" Or (ECNPartstbl.[Rev Lev])="NEW") 
AND 
((ECNPartstbl.Resp)="mfgj") 
AND 
((ECNDetailtbl.[Revised Planned Implementation Date])=[Enter Bucket Date-2nd Monday of Month-Format MM/DD/YY:]));
 
SELECT ECNPartstbl.[Part #], ECNPartstbl.Resp, IIf(ECNPartstbl.Replaces='xld','xld',' ') AS myReplaces

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top