Skipif

N

New

Trying to figure out skipif Why does this yield NO RECORDS

{SKIPIF { COMPARE "1" = "2" } }

When without it I have 50 records?
 
P

Peter Jamieson

It's because SKIPIF needs the following syntax

{ SKIPIF expression1 comparison-operator expression2 }

so e.g.

{ SKIPIF "1" = "2" }

or

{ SKIPIF { COMPARE "1" = "2" } = 1 }

should yield all the records,

{ SKIPIF "1" = "1" }

or

{ SKIPIF { COMPARE "1" = "1" } = 1 }

should yield no records.

As far as I know you cannot replace

expression1 comparison-operator expression2

by a scalar value of any type and have SKIPIF do anything except SKIP
everything, e.g.

{ SKIPIF 1 }

{ SKIPIF 0 }

{ SKIPIF -1 }

{ SKIPIF "A" }

will all yield no records, and by doing

{SKIPIF { COMPARE "1" = "2" } }

you are in effect doing

{ SKIPIF 0 }
 
G

grep

Because "1" and "2" are strings and will NEVER match. Since they never
match, all records are skipped.

grep
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top