|
Posted by Ed Murphy on 05/23/07 19:22
jknaty wrote:
> I'm trying to create a function that splits up a column by spaces, and
> I thought creating a function that finds the spaces with CHARINDEX and
> then SUBSTRING on those values would an approach. I get an error
> saying that the I have an Invalid column 'Course_Number'. Not sure
> why but I am very new to User Defined Functions. Here is what I have
> so far:
Please don't multi-post (post to each of several newsgroups separately),
but rather cross-post (post to all of them in a single go). But only do
that if it's truly relevant to all of them.
> SET @Ind1 = CHARINDEX(' ', Course_Number, 4)
> SET @Ind2 = CHARINDEX(' ',Course_Number, (CHARINDEX(' ',
> Course_Number, 4)+1))
This is your problem. See microsoft.public.sqlserver for details.
[Back to original message]
|