Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Parsing CSV Values Into Multiple Rows
 Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

Shivapdit
Starting Member

India
3 Posts

Posted - 09/24/2009 :  09:05:44  Show Profile  Reply with Quote
Hi All,

I am using Oracle 9i...

I am not able to CHARINDEX function in my SQL.

any other alternative...


Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22864 Posts

Posted - 09/24/2009 :  09:20:11  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
quote:
Originally posted by Shivapdit

Hi All,

I am using Oracle 9i...

I am not able to CHARINDEX function in my SQL.

any other alternative...





This forum is for MS SQL Server
Post your question at www.orafaq.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

ckumar
Starting Member

1 Posts

Posted - 11/17/2010 :  13:18:01  Show Profile  Reply with Quote
Thanks. It helped to solve a long pending issue in my domain.

Shiva
Go to Top of Page

poisonberry
Starting Member

1 Posts

Posted - 07/27/2011 :  15:06:44  Show Profile  Reply with Quote
quote:
Originally posted by psycotech

Here is the nastiest SQL code i have ever Writen.
It takes your CSV file as a parameter and you can well insert the outcome to wherever you like.



I would love it if this would return the column name as part of the temp table. I am just looking to get this to return that additional info and cant seem to get it. Any help would be appreciated. This article is saving my butt!
Go to Top of Page

psycotech
Starting Member

5 Posts

Posted - 07/28/2011 :  23:27:59  Show Profile  Visit psycotech's Homepage  Reply with Quote
quote:
Originally posted by poisonberry


I would love it if this would return the column name as part of the temp table. I am just looking to get this to return that additional info and cant seem to get it. Any help would be appreciated. This article is saving my butt!



Provided that column headings do not have commas or carriage returns you can simply place

DECLARE @err int
Declare @Columns varchar(max)
SET @Columns = SUBSTRING(@CSV, 0, CHARINDEX(CHAR(13), @CSV, 0))
EXEC @err = dbo.Mailing_CSV_Read @CSV, @Columns




Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000