Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 16th, 2004, 12:11 PM
Authorized User
 
Join Date: Dec 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to datagram Send a message via AIM to datagram
Default Need to grab middle data from field

I have a phone number field, and I need the nxx, or the 3 numbers after the area code. How do I grab the middle part of the data in the field? I can get just the area code by using the "LEFT" command, but that doesnt work on the next 3. :(

 
Old December 16th, 2004, 12:16 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

Does your db support MID?

Cheers,

Chris

 
Old December 16th, 2004, 12:19 PM
Authorized User
 
Join Date: Dec 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to datagram Send a message via AIM to datagram
Default

Im not sure, its a SQL 2003 server

 
Old December 16th, 2004, 12:27 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

You should be able to use SUBSTRING...
http://msdn.microsoft.com/library/de...u-sus_6btz.asp

HTH,

Chris

 
Old December 16th, 2004, 12:37 PM
Authorized User
 
Join Date: Dec 2004
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to datagram Send a message via AIM to datagram
Default

Cool, thank you very much :)






Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing UTF_8 Middle Dot using translate vinayan3 XSLT 1 July 26th, 2007 12:34 PM
Repeating image in middle of a page ychange Javascript How-To 1 March 11th, 2007 03:45 AM
Appending to the middle of a file monuindia2002 XML 4 March 8th, 2006 05:21 AM
How to Insert additional column in the Middle of a ramk_1978 BOOK: Beginning ASP 3.0 0 November 6th, 2004 09:20 AM
Insert new Record to MIDDLE of existing recordset? PanzarPaw Classic ASP Databases 5 September 11th, 2004 07:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.