Solved MID Function (1 Viewer)

KINGOFCHAOS17

Member
Local time
Today, 16:29
Joined
Mar 20, 2020
Messages
31
Hello all. Need some assistance with using MID in query. I've been using the MID function to split out down the data in column 'PartNbr' this works fine for the most part, however is there a way to only invoke the MID function if column 'CAGE' shows ABC12?

If there's a better function to use than MID I'm open to ideas.
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:29
Joined
May 21, 2018
Messages
8,525
iif([SomeField] = "ABC12", mid([SomeOtherField],x),[SomeOtherField]))
Guess.
 

KINGOFCHAOS17

Member
Local time
Today, 16:29
Joined
Mar 20, 2020
Messages
31
iif([SomeField] = "ABC12", mid([SomeOtherField],x),[SomeOtherField]))
Guess.
Thank you, I modified it slightly and is working perfectly

Code:
NSC: IIf([CAGE]="ABC12",Mid([PartNbr],1,4))
 

MajP

You've got your good things, and you've got mine.
Local time
Today, 11:29
Joined
May 21, 2018
Messages
8,525
I do not think what you posted works. As far as I know the iiF needs a True part and False part (required)


I would think you need a false part
NSC: IIf([CAGE]="ABC12",Mid([PartNbr],1,4),SomeValueIfFalse)
 

Users who are viewing this thread

Top Bottom