Jump to content

 
Photo

Integer to String "on-the-fly" conversion in ArcGIS

- - - - -

  • Please log in to reply
4 replies to this topic

#1
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 679 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

Hi!

I'd like to query an integer field in Arc to find some "numeric" characters...

I'd like to use this query (from MapInfo) into ArcGIS : RIGHT$(Str$(Field),2)

The "Right" part is basic, but I can't find the equivalent of the Str$ command in Arc...

Thanks!

#2
Crischan

Crischan

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 199 posts
  • Gender:Male
  • Location:Eberswalde, Germany
  • Interests:Spatial Information Design
  • Germany

That would be CStr in VBA...

Crischan
Crischan Wygoda
http://wygoda.net

#3
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 679 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

That would be CStr in VBA...

Crischan


Is that working for a definition query too? I can't find the right syntax, but I'll keep working on it...

Thanks!

#4
Crischan

Crischan

    Master Contributor

  • Validated Member
  • PipPipPipPip
  • 199 posts
  • Gender:Male
  • Location:Eberswalde, Germany
  • Interests:Spatial Information Design
  • Germany

AFAIK there's no VBA support in SQL queries in ArcGIS. You would have to derive a new field with the computed values first.

Crischan
Crischan Wygoda
http://wygoda.net

#5
François Goulet

François Goulet

    Ultimate Contributor

  • Validated Member
  • PipPipPipPipPipPip
  • 679 posts
  • Gender:Male
  • Location:Mille-Isles, Qc
  • Interests:Cartography, History, Graphic Design and almost everything else...
  • Canada

AFAIK there's no VBA support in SQL queries in ArcGIS. You would have to derive a new field with the computed values first.

Crischan


Oh yeah, you're right!!!

Is there a way to do this directly in SQL?

Thanks!!!!




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

-->