invalid SQL expression

115
1
08-01-2019 08:02 AM
Highlighted
New Contributor

fromaddr_l<> 0 and MOD (" fromaddr_l ",  2)  = 1 AND toaddr_l <> 0 and MOD (" toaddr_l",  2)  = 1. Field type is Text.

Tags (1)
Reply
0 Kudos
1 Reply
Highlighted
MVP Regular Contributor

Hi Nicholas,

Sounds reasonable doesn't it? The modulo operator (MOD) can only be applied to integer values.

  • MOD returns the remainder of integer_exp1 divided by integer_exp2.
  • Maybe you should use the CAST function to converts your input values to integers first. The syntax is as follows:

    CAST(exp AS data_type)

See: SQL reference for query expressions used in ArcGIS—ArcGIS Pro | ArcGIS Desktop 

HTH,

Egge-Jan

Reply
0 Kudos