Results 1 to 3 of 3

Thread: limit chars ?

  1. #1
    Join Date
    Apr 2002
    Posts
    4

    Unanswered: limit chars ?

    hi everyone..

    i have slight a little problem..

    i can't remember how the string is to limit chars of a cell..

    lets say the cell "main" has the text "hi, thank u for your support!" as content.

    the general string herefor is:

    SELECT id, main FROM mytable;

    if i do that, i obtain the full text as result. i just want the first 15 chars..

    "hi, thank you f" <--

    thx for your help..

    greets, tRaX.

  2. #2
    Join Date
    May 2002
    Location
    Netherlands
    Posts
    1
    You can use SUBSTRING.

    SELECT id, SUBSTRING(main, 1, 15) AS txt FROM mytable

    txt = 15 chars from main starting at position 1

  3. #3
    Join Date
    Apr 2002
    Posts
    4
    heyaa.. thx to u !!


Posting Permissions

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