I am trying write an alert email message for a custom poller that i have created. The custom poller is a GET TABLE and any one of the returned values could be alerted on. What i'm trying to do is list the poller label in the alert email. To do that I believe i need to write a sql variable that selects the CustomPollerID feild inthe CustomPollers table, then selects the matching rows in the CustomPollerAssignment table, grabs the CustomPollerAssignmentID field and uses that to match a row in the CustomPollerLabels table where it can then select the Label. The problem i'm running into is that the CustomPollerID and CustomPollerAssignmentID fields contain hyphens, so when the SQL query tries to act on the database it returns errors like this:
MACRO SQL ERROR - The floating point value '2e625700' is
out of the range of computer representation (8 bytes).
Incorrect syntax near 'bf0518d'.
Warning: the floating point value '859e-49910' is too
small. It will be interpreted as 0.
Is there any way to tell the SQL query to treat the data in these fields as text so that it doesn't try to do any operations with the feild data?