473,385 Members | 1,620 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

SUBSTRING question

I am trying to find a way to dynamically retrieve the substring
starting point for an nText field.
My query looks something like

SELECT ID,Substring(DOCTEXT,0,200) from mytable where DOCTEXT like
'claim%'"

This query has substring starting point set to 0. Is there a way to
determine the starting point based on the first occurrence of the
search term? If first occurrence of 'claim' is at 25th character then
the query should start substring at 25th and end at 225th character. I
am trying to avoid usage of UDF. Is there a way to handle this through
plain a SQL statement? Any help would be appreciated. TIA.

Jul 23 '05 #1
0 3800

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sysindex | last post by:
I am trying to find a way to dynamically retrieve the substring starting point of an nText field. My query looks something like SELECT ID,Substring(DOCTEXT,0,200) from mytable where DOCTEXT...
6
by: dreamerbin | last post by:
Hi, I'm having trouble extracting substrings using regular expression. Here is my problem: Want to find the substring that is immediately before a given substring. For example: from "00...
2
by: Mike P | last post by:
If I want to get the last 4 characters of a string is this the right way to do it? int intCardLength = Convert.ToInt32(strCardNumberUnEnc.Length); strCardNumberUnEnc =...
3
by: colinhumber | last post by:
How can I use regular expressions to search for a substring within another substring? For example, if I have the string: "This is * some text <button id="123">Some * text</button>" and I only...
2
by: David Filion | last post by:
Hi, I have a question about substring(), when I run the following query: prepaid=# select substring('15148300', 0, 5); substring ----------- 1514 (1 row)
2
by: mallard134 | last post by:
Could someone please help a newbee vb programmer with a question that is driving me crazy. I am trying to understand a line of code that is supposed to return the domain portion of a valid email...
11
by: fniles | last post by:
In VB 6 I used to do like the following: if left(str,3) = "abc" then In VB.NET when I do the following sStr.Substring(0, 3), and the sStr has fewer than 3 characters, it will give me an error....
2
by: Daniel Reardon | last post by:
All, I'm sure that this is an old question, but I'm having problems getting a substring of a passed in variable. I can do other string manipulation with it such as concatonation, but I'm really...
3
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
Two part question: 1. Is Regex more efficient than manually comparing values using Substring? 2. I've never created a Regex expression. How would I use regex to do the equivalent of what I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.