Click here to Skip to main content
15,892,059 members
Home / Discussions / Database
   

Database

 
AnswerRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius5-Jan-09 10:25
mentorWendelius5-Jan-09 10:25 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
polishprogrammer5-Jan-09 10:38
polishprogrammer5-Jan-09 10:38 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius5-Jan-09 10:58
mentorWendelius5-Jan-09 10:58 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
polishprogrammer7-Jan-09 9:47
polishprogrammer7-Jan-09 9:47 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius7-Jan-09 10:00
mentorWendelius7-Jan-09 10:00 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
polishprogrammer8-Jan-09 10:56
polishprogrammer8-Jan-09 10:56 
GeneralRe: Import Data From Other Database and Eliminate Duplicates Pin
Wendelius8-Jan-09 11:06
mentorWendelius8-Jan-09 11:06 
QuestionSQL Server- Upload CSV file via Bulk Insert with double Quotation Issue? Pin
Tarini Singh5-Jan-09 4:21
Tarini Singh5-Jan-09 4:21 
Hi Team,

Needed functionality is upload csv file via bulk insert only.


1)I Created table structure

CREATE TABLE #Test_temp
(
Name	varchar(100),
Age	varchar(100),
Salary	varchar(100),
Dept	varchar(100)
)


2)
creating the format file (.fmt)
8.0
4
1	SQLCHAR	      0       100     ","			1       NAME		SQL_Latin1_General_CP1_CI_AS
2	SQLCHAR	      0	      100     ","			2	AGE		SQL_Latin1_General_CP1_CI_AS
3	SQLCHAR	      0	      100     ","			3	SALARY		SQL_Latin1_General_CP1_CI_AS
4	SQLCHAR	      0	      100     "\r\n"			4	DEPT		SQL_Latin1_General_CP1_CI_AS


3)
The comma delimited csv data file

Name,Age,Salary,Dept
Scott,21,2343,salary
Tiger,22,34343,acct


It was successfully uploaded but
the input changes is that

In csv file, some filed contains values within (")double quotes with (,) .
like in third row below


Name,Age,Salary,Dept
<code>Scott,21,"23,43",salary</code>
Tiger,22,34343,acct


for this scenario, I took the fmt file as below


1 SQLCHAR 0 100 "," 1 NAME SQL_Latin1_General_CP1_CI_AS

2 SQLCHAR 0 100 "," 2 AGE SQL_Latin1_General_CP1_CI_AS

3 SQLCHAR 0 100 "\"," 3 SALARY SQL_Latin1_General_CP1_CI_AS

4 SQLCHAR 0 100 "\r\n" 4 DEPT SQL_Latin1_General_CP1_CI_AS


Could anyone help me out from this scenario.


Tarini Singh
Sr Software Engg.
email-tksingh@zenta.com




AnswerRe: SQL Server- Upload CSV file via Bulk Insert with double Quotation Issue? Pin
Wendelius5-Jan-09 9:18
mentorWendelius5-Jan-09 9:18 
QuestionProblem with large database fetching Pin
Member 40015965-Jan-09 2:40
Member 40015965-Jan-09 2:40 
AnswerRe: Problem with large database fetching Pin
Ashfield5-Jan-09 2:54
Ashfield5-Jan-09 2:54 
AnswerRe: Problem with large database fetching Pin
Wendelius5-Jan-09 9:22
mentorWendelius5-Jan-09 9:22 
AnswerRe: Problem with large database fetching Pin
Aman Bhullar6-Jan-09 5:45
Aman Bhullar6-Jan-09 5:45 
GeneralRe: Problem with large database fetching Pin
Member 40015966-Jan-09 20:22
Member 40015966-Jan-09 20:22 
QuestionNeed SQl Query Pin
karthigachawla5-Jan-09 0:48
karthigachawla5-Jan-09 0:48 
AnswerRe: Need SQl Query Pin
SeMartens5-Jan-09 1:09
SeMartens5-Jan-09 1:09 
GeneralRe: Need SQl Query Pin
Ben Fair5-Jan-09 4:13
Ben Fair5-Jan-09 4:13 
GeneralRe: Need SQl Query Pin
SeMartens5-Jan-09 4:26
SeMartens5-Jan-09 4:26 
GeneralRe: Need SQl Query Pin
Ben Fair5-Jan-09 5:51
Ben Fair5-Jan-09 5:51 
QuestionConfused about instance name in SQL cluster Pin
George_George3-Jan-09 23:15
George_George3-Jan-09 23:15 
AnswerRe: Confused about instance name in SQL cluster Pin
Wendelius4-Jan-09 0:49
mentorWendelius4-Jan-09 0:49 
GeneralRe: Confused about instance name in SQL cluster Pin
George_George4-Jan-09 22:23
George_George4-Jan-09 22:23 
GeneralRe: Confused about instance name in SQL cluster Pin
Wendelius5-Jan-09 4:33
mentorWendelius5-Jan-09 4:33 
QuestionSql query Pin
sarah_chandran3-Jan-09 3:45
sarah_chandran3-Jan-09 3:45 
AnswerRe: Sql query Pin
Wendelius3-Jan-09 4:13
mentorWendelius3-Jan-09 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.