ASP code to remove all letters except the first

This is a discussion on "ASP code to remove all letters except the first" within the Classic ASP section. This forum, and the thread "ASP code to remove all letters except the first are both part of the Program Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > Classic ASP

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old Feb 4th, 2006, 01:57
New Member
Join Date: Jan 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Cool ASP code to remove all letters except the first

Does anyone know any ASP code that would remove all letters except for the first letter of the results from a DB list result.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Feb 4th, 2006, 02:40
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ASP code to remove all letters except the first

moved to asp forum
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Feb 6th, 2006, 13:53
Reputable Member
Join Date: Sep 2003
Location: USA
Posts: 112
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ASP code to remove all letters except the first

Well you could loop the recordset and do left(rs(0), 1) on each one.
Or you could just do it in the SQL so the recordset only returns the first letter. Unless there's some extenuating circumstance I would do it in the SQL.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Feb 15th, 2006, 22:58
Up'n'Coming Member
Join Date: Feb 2004
Location: Woodbridge, UK
Age: 27
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Re: ASP code to remove all letters except the first

... as SELECT [MyFirstChar] = LEFT(myColName, 1) FROM table
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
asp, code, remove, letters, except, first

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to remove frames camarun20 Web Page Design 6 Mar 26th, 2008 14:11
Remove white from around edges? rxsid Graphics and 3D 7 Dec 13th, 2006 09:57
Remove UL spacing problem relph2 Web Page Design 3 Jan 3rd, 2006 17:22
remove redirection expressweb Implemented Suggestions 6 Jul 21st, 2005 22:24
Remove page number malambing57 Classic ASP 1 Oct 14th, 2004 08:47


All times are GMT. The time now is 01:43.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42