Re: searching through results

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Aaron Bertrand - MVP (aaron_at_TRASHaspfaq.com)
Date: 05/11/04


Date: Tue, 11 May 2004 13:26:04 -0400

So, look at the INSTR() function of VBScript...

-- 
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
"Joey Martin" <mart3939@bellsouth.net> wrote in message
news:9P7oc.101619$7a5.28866@bignews6.bellsouth.net...
> Let me be more clear so as not to be confusing.
>
> I am actually importing a text file. I am reading the lines and they are
> goin into "sections".
> For example section A may read: This is a test and it has a bold <b>
> right</b> here.
>
> It typically includes 10-20 lines of text.
> I just need to look through that Section A and if it has a bold, mark it
as
> such use sectionabold=Y
>
>
>
> "Aaron Bertrand - MVP" <aaron@TRASHaspfaq.com> wrote in message
> news:uiaBco3NEHA.3380@TK2MSFTNGP11.phx.gbl...
> > Why don't you do it from the query?
> >
> > It helps if you tell us which database you're using (see
> > http://www.aspfaq.com/5009), but for SQL Server:
> >
> > SELECT hasabold = CASE WHEN CHARINDEX('<b>', column)>0 THEN 'Y' ELSE 'N'
> > END,
> >     <otherstuff> FROM table
> >
> > -- 
> > Aaron Bertrand
> > SQL Server MVP
> > http://www.aspfaq.com/
> >
> >
> >
> >
> > "Joey Martin" <mart3939@bellsouth.net> wrote in message
> > news:Mu7oc.150349$Yw5.141631@bignews4.bellsouth.net...
> > >
> > > I know how to use the LIKE command in a query but how do I do it in
the
> > > results of a recordset?
> > >
> > > results="<b>Hello</b> World"
> > >
> > > I want to search the above result and if it has a <B> in it, I want
set
> > > hasabold="Y"
> > > I need to be able to search through a large amount of text so the BOLD
> > marks
> > > will not always be at the front of the results. They maybe be on line
50
> > > character 59, etc....
> > >
> > >
> > >
> > >
> >
> >
>
>


Relevant Pages