Giles,
You need to use the "Run Command" syntax to add this variable into an SQL
statement, e.g.
Dim i As Integer
i=1000
Run Command "Select "& i &" + 2 From <table>"
Hope this helps
Chris Perry
Manager Mapping Systems
Parks Victoria
Ph: 613 9816 6800
Fax: 613 9816 7222
Email:[EMAIL PROTECTED]
-----Original Message-----
From: Kennedy, Giles (NMPO3) [mailto:[EMAIL PROTECTED]]
Sent: Monday, 25 January 1999 22:19
To: 'MapInfo-L'
Subject: MI MB SQL Select: using variables in Select clause
I'm trying to use a MapBasic variable in a select expression but I can't
seem to get the MapBasic application to pass the value of the variable over
to MapInfo. However it works fine from the MapBasic window.
Example:
Dim i As Integer
i=1000
Select i + 2 From <table>
If I do this from the MapBasic window I get a column called _var_+2 filled
with value 1002. Fine. If I do it from a MapBasic application I get a
column of the same name which is blank. Not so fine.
Help!
What I am trying to do is use a Select statement to find the maximum
distance from a given point to all the line segments in a table.
Thanks
Giles Kennedy
Technical Consultant
CORDA Ltd (Centre for Operational Research and Defence Analysis)
7 High St
New Malden, UK
[EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]