If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Just selecting the part of a text field?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-30-04, 10:23
Nixies Nixies is offline
Registered User
 
Join Date: Jul 2003
Posts: 100
Exclamation Just selecting the part of a text field?

I have a select statment that select from a table with a large text field however I would quite like to only select the first 40 characters, is this possible as part of the select statement.
Reply With Quote
  #2 (permalink)  
Old 04-30-04, 10:45
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
You can use:
Code:
SELECT Left(textColumn, 40) -- yada, yada, yada
-PatP
Reply With Quote
  #3 (permalink)  
Old 04-30-04, 11:34
Nixies Nixies is offline
Registered User
 
Join Date: Jul 2003
Posts: 100
Great thanks a lot!
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On