-2

Can anyone tell me how I can get my URL text to show up as the the "IMAGE NAME" in my query? I am using Toad Data Point SQL Builder and this is what I have so far

SELECT
    ast.location,
    ast.assetnum,
    ast.description,
    own.alnvalue AS "OWNED BY",
    di.description AS "IMAGE NAME",
    concat ('http://link_here', substr(di.URLNAME, 25)) as Link

I then get the Image name and Link in two different columns, but would like to have the Link text show as the "Image Name". Also once I export the query results to an excel instance can I have the Link display as a Hyperlink without having to do one by one?

SS0309
  • 3
  • 2
  • The code seems to be incomplete. I see the query but don't see how you're reading the results into variables in the program (or script or whatever you're building). Please indicate what technologies are involved, and reveal enough information that someone who has no knowledge of your specifics can understand (and help you solve) the problem. – Dennis Mar 27 '21 at 20:46

1 Answers1

0

You're only 50% lucky, which is quite a lot in this case.

Don't bother about displaying "Image name" as the result - it just won't happen. Result of a SQL statement is pure text, unless you use some tool which lets you format data (such as Oracle Apex).

However, your 50% luck comes with exporting data to Excel, with working URLs. Here's how:

  1. run a query which uses Excel's hyperlink function
  2. see the result; right-click it, choose "Export dataset"
  3. export to "Excel instance"; make sure to set options just like I did.
  4. pay attention to "Treat string fields as strings" that option should NOT be checked
  5. the result is as you wanted it - clickable URLs
Littlefoot
  • 131,892
  • 15
  • 35
  • 57