Jump to content
  • 0

Need help using Text255 Zipcodes in a triggered action


DarkRangerEX

Question

Hello,

I am trying to make a triggered action that inserts records that have certain zip codes into a different table. The zip codes are stored as the Text 255 data type. The records that I want to send to the new table are ones with the zipcodes 00001 - 29999; 32000 - 34999; 40000 to 71599; and 73000 - 99999. I have been trying to use "SELECT WHERE #inserted.zip is greater than/less than" to filter the data, but I am getting weird results. For example, a zip code of 90210 gets shot to the other table, but 99876 does not, even though they both should be "greater than" 73000 in an alphanumeric sense because they both begin with 9. Does anyone know of a way to make triggered actions work with this. I don't see a way in triggered actions to cast the zipcodes as numerical values for the comparison either.

I have included a screenshot of the triggered action I am setting up. Hopefully it helps you see what I am doing wrong lol.

Question-Screenshot.png

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

NEVER MIND. I figured it out. Fun fact, not all zip codes exist. Since I was doing an INNER join using a Zipcode/Latitiude/Longitude table, my triggered action would exclude data that didn't have a matching zip code in the joined table. Some of the random zip codes I came up with to test with simply weren't needed when allocating zip codes for the United States. Because of this, they were getting excluded from the join. So, there was, in fact, nothing wrong with the WHERE clauses or the triggered action, just the data I was using.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...