shortening query result values

Results 1 to 2 of 2

Thread: shortening query result values

  1. #1
    Join Date
    Dec 1969

    Default shortening query result values

    Is it possible to shorten a text value result from a database query displayed in an asp page in order to restrict the width of a results table?<BR><BR>for example a hyperlinked filename in each record in a search result list to be limited to say 10 characters so instead of being displayed as:<BR><BR>this_is_a_very_long_filename.jpg<BR><BR >it would be displayed as: thisisa...<BR><BR>(the full filename only being shown by the title property in the hyperlink when the user moves their mouse over it)

  2. #2
    Join Date
    Dec 1969

    Default RE: shortening query result values

    Yes, but it will depend on how you want to shorten it and whether you have control over the names of the files you are shortening.<BR><BR>E.g by shortening this_is_a_very_long_filename.jpg to thisisa... you will need to know the format of each the files always uses this naming convention.<BR><BR>What you are wanting to do you will need to get to grips with String Functions using the Replace function firstly, then to display the name on screen you will need to us something like the Right function to count a specific number of letters from the right to then display the name appropriately.<BR><BR>Have a search on the FAQ&#039;s stuff like this is fairly well documented <BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts