Skip to main content
Answer

Unidata select statement returning rows that don't match select criteria

  • November 20, 2025
  • 3 replies
  • 41 views

Tom Teuber

Is there a limit to the value length in a select statement?

When I run:   SELECT OP.MANIFESTED.HIST WITH TRACK.NBR = "420015859261290986498138210077"

I get multiple rows back with TRACK.NBR different from above. 

For example:

420015859261290986498136795170

420015859261290986498151260165

420015859261290986498151221500

Is there a limit to how many characters it’s comparing in the select value?

Other explanations?

I removed the indexes off a copy of the file and I still get the same result, so it’s not a bad index issue.

Best answer by Jonathan Smith

Tom,

 

You are seeing a limit in UniData’s ability to do a numeric comparison, as it’s applying a numeric test to the query.

Now to get round it, I would suggest adding the indexes back and look at UDT.OPTIONS 22. I have attached the description of UDT.OPTIONS 22.

Thanks,

 

3 replies

Jonathan Smith
Forum|alt.badge.img+4
  • Rocketeer
  • Answer
  • November 20, 2025

Tom,

 

You are seeing a limit in UniData’s ability to do a numeric comparison, as it’s applying a numeric test to the query.

Now to get round it, I would suggest adding the indexes back and look at UDT.OPTIONS 22. I have attached the description of UDT.OPTIONS 22.

Thanks,

 


Jonathan Smith
Forum|alt.badge.img+4

Let me know, if this gives you the information you need to force a text based search rather than a numeric one.

 


Tom Teuber
  • Author
  • New Participant
  • November 20, 2025

 

That worked!

 

Thanks Jonathan!