Click here to Skip to main content
15,891,423 members
Home / Discussions / Database
   

Database

 
AnswerRe: How used Sql Server in LAN Pin
M.Nouri5-Mar-08 20:39
M.Nouri5-Mar-08 20:39 
GeneralRe: How used Sql Server in LAN Pin
pmarfleet5-Mar-08 21:39
pmarfleet5-Mar-08 21:39 
GeneralRe: How used Sql Server in LAN Pin
Khawar Abbas15-Mar-08 1:47
Khawar Abbas15-Mar-08 1:47 
GeneralRe: How used Sql Server in LAN Pin
M.Nouri5-Mar-08 17:59
M.Nouri5-Mar-08 17:59 
GeneralRe: How used Sql Server in LAN Pin
M.Nouri5-Mar-08 20:36
M.Nouri5-Mar-08 20:36 
GeneralBulk Insert Pin
new2pgrmg4-Mar-08 19:55
new2pgrmg4-Mar-08 19:55 
GeneralRe: Bulk Insert Pin
pmarfleet4-Mar-08 21:51
pmarfleet4-Mar-08 21:51 
GeneralRe: Bulk Insert Pin
new2pgrmg5-Mar-08 0:07
new2pgrmg5-Mar-08 0:07 
Hi,
Thanks for the reply.

I have tried it from a similar link from msdn.But i am facing a problem.

I followed this link to the tee.

But i am getting an error;I worked this way

First i created a database by the name "AdventureWorks".

Then i creted a table like ;

USE AdventureWorks;
GO
CREATE TABLE myTestSkipCol
(
Col1 smallint,
Col2 nvarchar(50) NULL,
Col3 nvarchar(50) not NULL
);
GO


I created a .dat file by the name "myTestSkipCol2.dat"

1,DataForColumn3
1,DataForColumn3
1,DataForColumn3


Then i copied the XML file by the name "myTestSkipCol2.Xml" in the C:Drive


<bcpformat xmlns="http://schemas.microsoft.com/sqlserver/2004/bulkload/format" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<record>
<field id="1" xsi:type="CharTerm" terminator="," max_length="7">
<field id="2" xsi:type="CharTerm" terminator="\r\n" max_length="100" collation="SQL_Latin1_General_CP1_CI_AS">

<row>
<column source="1" name="Col1" xsi:type="SQLSMALLINT"> <column source="2" name="Col3" xsi:type="SQLNVARCHAR">



Then i executed the bulk query like;
USE AdventureWorks;
GO
INSERT INTO myTestSkipCol
(Col1,Col3)
SELECT Col1,Col3
FROM OPENROWSET(BULK 'C:\myTestSkipCol2.Dat',
FORMATFILE='C:\myTestSkipCol2.Xml'
) as t1 ;
GO

Here is the problem;I am getting an error "Msg 4820, Level 16, State 1, Line 1
Could not bulk insert. Unknown version of format file 'C:\nm.fmt'.
"

I tried different ways like giving the extension as ".XML" and ".ftm".I tried different permutations and combinations.

Need your help

Many Thanks
GeneralRe: Bulk Insert Pin
pmarfleet5-Mar-08 1:12
pmarfleet5-Mar-08 1:12 
GeneralRe: Bulk Insert Pin
new2pgrmg5-Mar-08 1:21
new2pgrmg5-Mar-08 1:21 
GeneralWhich query is faster? (Join or In condition) Pin
AlexeiXX34-Mar-08 17:01
AlexeiXX34-Mar-08 17:01 
GeneralRe: Which query is faster? (Join or In condition) Pin
Parwej Ahamad4-Mar-08 17:29
professionalParwej Ahamad4-Mar-08 17:29 
GeneralRe: Which query is faster? (Join or In condition) Pin
Krish - KP4-Mar-08 18:10
Krish - KP4-Mar-08 18:10 
GeneralRe: Which query is faster? (Join or In condition) Pin
Khawar Abbas15-Mar-08 1:49
Khawar Abbas15-Mar-08 1:49 
GeneralWhich query is faster? (Join or Where condition) [modified] Pin
AlexeiXX34-Mar-08 16:52
AlexeiXX34-Mar-08 16:52 
GeneralRe: Which query is faster? (Join or Where condition) Pin
Mycroft Holmes4-Mar-08 18:10
professionalMycroft Holmes4-Mar-08 18:10 
GeneralSQL Server to get data from a Webservice Pin
Mycroft Holmes4-Mar-08 14:21
professionalMycroft Holmes4-Mar-08 14:21 
QuestionRe: SQL Server to get data from a Webservice Pin
Adewale3-Apr-08 5:07
Adewale3-Apr-08 5:07 
Generaladding new fields Pin
Aptiva Dave4-Mar-08 9:34
Aptiva Dave4-Mar-08 9:34 
GeneralRe: adding new fields Pin
Christian Graus4-Mar-08 9:48
protectorChristian Graus4-Mar-08 9:48 
Generaladd new column in table.. Pin
Rajeshwar Code- Developer4-Mar-08 7:43
Rajeshwar Code- Developer4-Mar-08 7:43 
GeneralRe: add new column in table.. Pin
John_Adams4-Mar-08 8:07
John_Adams4-Mar-08 8:07 
GeneralRe: add new column in table.. Pin
Rajeshwar Code- Developer4-Mar-08 8:20
Rajeshwar Code- Developer4-Mar-08 8:20 
Generalcreate temporary table from select Pin
gottimukkala4-Mar-08 4:53
gottimukkala4-Mar-08 4:53 
GeneralRe: create temporary table from select Pin
andyharman4-Mar-08 5:49
professionalandyharman4-Mar-08 5:49 

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.