SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Truncate...

  1. #1
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Truncate...

    Hi,

    I am having a total mental blank here, Trucating a bunch of text at (x)Characters?

    Thanks in advance
    .NET Code Monkey

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure which database your using, but I only found a couple of references to it in my handy SQL pocket guide from O'Riely.

    As a SQL command-
    "A non-ansi supported command that removes all records from a table... not supported in MySQL"
    TRUNCATE TABLE tablename

    As a function for MySQL-
    truncate(X,D) - "Returns the number X, truncated to D decimals."
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  3. #3
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    thanks for that, but unfortunatly that wasn't really what I'm after, I want to grab a bunch of text from a database field and only display x characters.

    ie text text text text text text text text text text text text text text text text text text [More Info...]

    the more info link would go to the full text.
    .NET Code Monkey

  4. #4
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    SQL Server :
    substring(string, start, length)

    VBScript :
    Left(string, length)

    I'm not sure what the Access equivalent of Substring is though.
    Last edited by shane; Jun 19, 2001 at 04:01.

  5. #5
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you thinking of the LIMIT keyword?
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com


Bookmarks

Posting Permissions

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