Sunday, February 19, 2012

Convert INT value to STRING so I can add it to another STRING

I'm trying to figure out how to convert an INT so that I can add it to another string in a statement like
SELECT '<a href="http://links.10026.com/?link=http://mydomain.com/' + [IntValue] + '">' + [LinkName]
Where [IntValue] is an INT field containing a folder number. I tried:

TO_CHAR([IntValue, '999')
but it didn't work. And I tried to find a TO_STRING function, but had no luck.
Any advice to someone who is savy, but new to SQL Queries?

SELECT '<a href="http://links.10026.com/?link=http://mydomain.com/' + STR([IntValue]) + '">' + [LinkName]
HTH
regards

|||Bingo! I had to restrict the function to 3 digits for my purposes, but it worked like a charm.
Thanks a bunch!

No comments:

Post a Comment