No, there shouldnt be. charindex just returns the position of a
character.. the name doesnt imply that it works with varchar only.
And yes you'd use it within the select statement..
Select name, substring(mycol, charindex( '~',description), len(mycol -
charindex( '~',description)) as descr from items

something like that would work. Try it and see.

On 4/27/05, Che Vilnonis <[EMAIL PROTECTED]> wrote:
> would this be done in the select statement? the field type for the column is
> 'text' and not 'varchar'.
> i think there would be issues with using charindex on a 'text' field. ugh
> again...
> 
> Che
> 
> -----Original Message-----
> From: Greg Morphis [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 27, 2005 10:28 AM
> To: CF-Talk
> Subject: Re: ListGetAt in a SQL Select Statement... is this possible?
> 
> I think you could use pretty much the same thing.. SQLServer has the
> substring funstion but uses the Charindex (I think) to find the start
> position..
> So you might want to try something like :
> substring(mycol, charindex(mycol, '~'), len(mycol - charindex(mycol, '~'))
> this hasnt been tested, so it may need some tweaking
> 
> On 4/27/05, Aaron Rouse <[EMAIL PROTECTED]> wrote:
> > I was once told that dealing with a list of data in MSSQL was easier than
> in
> > Oracle. Perhaps someone well versed in MSSQL could chime in with a
> solution.
> > It probably is not as hard as you think it will be to get done.
> >
> > On 4/27/05, Che Vilnonis <[EMAIL PROTECTED]> wrote:
> > >
> > > Aaron/Greg... I have M$ SQL Server 2000. I understand the premise of
> what
> > > you say... unfortunately, my CF skills are much better than my MS SQL
> > > skills.
> > >
> > >
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204681
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to