SQL functions in the expression builder?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

SQL functions in the expression builder?

Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: SQL functions in the expression builder?

Kori Maleski-2
I need to be able to run some sort of FORMAT function.

If I try to label with a decimal column, it is displaying 6 zeroes after the
decimal - annoying when you try to label contours...




Kori Maleski  BSc.
Senior Technical Consultant
 


Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL
403.770.1917
 
 
FAX
877.691.9149
 TOL
877.691.9171
www.pat.ca

________________________________________
From: Jason Birch [mailto:[hidden email]]
Sent: March 21, 2006 11:16 AM
To: [hidden email]
Subject: [mapguide-users] SQL functions in the expression builder?

Is there a reference available for what SQL expressions are available in the
expression builder?
 
For tooltips, I'd like to be able to use something like ISNULL() or IIF() to
display "UNKNOWN" when an attribute value is null or blank.
 
Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: SQL functions in the expression builder?

Traian Stanev
In reply to this post by Jason Birch

Kori,

In this particular case you can set the label to an expression of the form:

 0 + Property_Name

The 0 will be treated as an integer and therefore the whole expression will evaluate as an integer, resulting in the value displying as integer. This is a trick that exploits the behavior of the expression engine, since there is currently no FORMAT function.

Jason, there is a NULL check, the syntax for which is:

Property_Name NULL

You can also use the filter expression builder to set up NULL comparisons.

Traian
 

-----Original Message-----
From: Kori Maleski [mailto:[hidden email]]
Sent: Tuesday, March 21, 2006 1:50 PM
To: [hidden email]
Subject: RE: [mapguide-users] SQL functions in the expression builder?

I need to be able to run some sort of FORMAT function.

If I try to label with a decimal column, it is displaying 6 zeroes after the
decimal - annoying when you try to label contours...




Kori Maleski  BSc.
Senior Technical Consultant
 


Suite 400 - 534 17 Ave. SW Calgary, AB CANADA T2S 0B1
TEL
403.770.1917
 
 
FAX
877.691.9149
 TOL
877.691.9171
www.pat.ca

________________________________________
From: Jason Birch [mailto:[hidden email]]
Sent: March 21, 2006 11:16 AM
To: [hidden email]
Subject: [mapguide-users] SQL functions in the expression builder?

Is there a reference available for what SQL expressions are available in the
expression builder?
 
For tooltips, I'd like to be able to use something like ISNULL() or IIF() to
display "UNKNOWN" when an attribute value is null or blank.
 
Jason


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: SQL functions in the expression builder?

James Card
In reply to this post by Kori Maleski-2
On Tue, 21 Mar 2006 10:50:05 -0800, Kori Maleski <[hidden email]> wrote:

> If I try to label with a decimal column, it is displaying 6 zeroes after  
> the decimal - annoying when you try to label contours...

For contours I am using the expression "0+ELEVATION". By adding the value  
to zero you force the type to be integer. Note that there must be no  
spaces in the expression, and that it must have the zero first  
(ELEVATION+0 does not work).

--
James Card
California CAD Solutions, Inc.
209 578-5580 Voice
209 521-6493 FAX

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]