Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 13th, 2007, 03:52 PM
Authorized User
Join Date: Jul 2006
Location: Pukekohe, , New Zealand.
Posts: 38
Thanks: 0
Thanked 0 Times in 0 Posts
Default T-SQl Extract

I am wanting to extract data from a column either by specifying the length of the data or when the data ends with ????



Reply With Quote
  #2 (permalink)  
Old March 13th, 2007, 04:56 PM
Friend of Wrox
Join Date: Jun 2004
Location: Chennai, Tamil Nadu, India.
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76

You can use RIGHT and LEN methods to get the right most charecters and the total length of the string.

Find your solution here...
Reply With Quote
  #3 (permalink)  
Old March 14th, 2007, 12:59 AM
Friend of Wrox
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

You can use SUBSTRING function of SQL. Also look for String functions in Books online to choose the one that fits your requirement the most.
Select Substring(col1, 1, 15) from Table_Name

- Vijay G
Strive for Perfection
Reply With Quote

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 Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to extract a spreadsheet ravee39 SQL Server 2005 1 April 23rd, 2007 09:20 AM
how to extract from a string fraijo SQL Server 2000 3 October 25th, 2006 09:55 PM
extract querystring marclena .NET Web Services 2 May 16th, 2005 06:20 AM
Extract Field Value maha Access 2 June 25th, 2003 12:05 AM

All times are GMT -4. The time now is 10:12 PM.

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