Jump to content

plss help ... SQL Query for inserting bulk records in one shot.....


Recommended Posts

Posted

can any one tell, sql query for inserting bulk records in one shot in SQL SERVER 2008......  i m trying to insert but it is giving error...

I highlighted the error.... watch below...

[img]http://i54.tinypic.com/262kupi.jpg[/img]



Help me in this regard..... I know u guys will... S%Hi

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

  • Jambhalheart

    13

  • galigannarao

    5

  • Herndon- VA

    5

  • tom bhayya

    3

Popular Days

Top Posters In This Topic

Posted

oka excel lono, cs file or text pad lo pettuko values..... import tool use insert chesuko thats it.....

Posted

[quote author=tom bhayya link=topic=203091.msg2475839#msg2475839 date=1308160288]
oka excel lono, cs file or text pad lo pettuko values..... import tool use insert chesuko thats it.....
[/quote]


[img]http://www.desigifs.com/sites/default/files/Ali.gif[/img]

excel ,cs file lo pedithe kani insert cheyalema ???? ledhu anna,,, edho query vuntundhi...

Posted

[quote author=tom bhayya link=topic=203091.msg2475839#msg2475839 date=1308160288]
oka excel lono, cs file or text pad lo pettuko values..... import tool use insert chesuko thats it.....
[/quote] *7*^ *7*^ deeni kosam ippudu oka SSIS package create cheyyala ayana??

Constraints check chesko bossuuu
also aa 3 sub braces ni oka pedda braces lo petti  try chei sCo_^Y sCo_^Y sCo_^Y

Posted

bulk insert annavu ani aa option cheppa.... 3 values insert is not a bulk insert......

Posted

insert into stu_table values
(1, 'Komal',10),
(2, 'Ajay',10),
(3, 'Santosh',10),
(4, 'Rakesh',10),
(5, 'Bhau',10);

this is working for me baaaa sCo_^Y

Posted

[quote author=HAPPYNESS link=topic=203091.msg2475845#msg2475845 date=1308160504]
*7*^ *7*^ deeni kosam ippudu oka SSIS package create cheyyala ayana??

Constraints check chesko bossuuu
also aa 3 sub braces ni oka pedda braces lo petti  try chei sCo_^Y sCo_^Y sCo_^Y
[/quote]SSIS package avasramu ledu baa
BULK INSERT bulktest..t_float
FROM 'C:\t_float-c.dat' WITH (FORMATFILE='C:\t_floatformat-c-xml.xml');
GO

ila cheste saripoddi. S%Hi

Posted

[quote author=HAPPYNESS link=topic=203091.msg2475845#msg2475845 date=1308160504]
*7*^ *7*^ deeni kosam ippudu oka SSIS package create cheyyala ayana??

Constraints check chesko bossuuu
also aa 3 sub braces ni oka pedda braces lo petti  try chei sCo_^Y sCo_^Y sCo_^Y
[/quote]

ledhu annai,,, text book vadu elage seppadu...

anduke try sethuuna...
see this textbook pic...


[img]http://i52.tinypic.com/2ah739h.jpg[/img]

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475865#msg2475865 date=1308160834]
ledhu annai,,, text book vadu elage seppadu...

anduke try sethuuna...
see this textbook pic...


[img]http://i52.tinypic.com/2ah739h.jpg[/img][/img]
[/quote]

Posted

SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server

Create TestTable

USE TestData
GO
CREATE TABLE CSVTest
(ID INT,
FirstName VARCHAR(40),
LastName VARCHAR(40),
BirthDate SMALLDATETIME)
GO

Create CSV file in drive C: with name csvtest.txt with following content. The location of the file is C:\csvtest.txt

1,James,Smith,19750101

2,Meggie,Smith,19790122

3,Robert,Smith,20071101

4,Alex,Smith,20040202


BULK
INSERT CSVTest
FROM 'c:\csvtest.txt'
WITH
(
FIELDTERMINATOR = ',',
ROWTERMINATOR = '\n'
)
GO
--Check the content of the table.
SELECT *
FROM CSVTest
GO

Posted

[quote author=galigannarao link=topic=203091.msg2475853#msg2475853 date=1308160669]
insert into stu_table values
(1, 'Komal',10),
(2, 'Ajay',10),
(3, 'Santosh',10),
(4, 'Rakesh',10),
(5, 'Bhau',10);

this is working for me baaaa sCo_^Y
[/quote]



this is not working for me in sql server baa.... see my first post in this thread... I gave like that only....

Posted

[img]http://www.desigifs.com/sites/default/files/brahmam_rom2.gif?1290348807[/img]

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475887#msg2475887 date=1308161318]


this is not working for me in sql server baa.... see my first post in this thread... I gave like that only....
[/quote]okka sari nuvvu chesina daniki semi colonto end chesi check cheyyava fleez S%Hi

Posted

[quote author=galigannarao link=topic=203091.msg2475895#msg2475895 date=1308161438]
okka sari nuvvu chesina daniki semi colonto end chesi check cheyyava fleez S%Hi
[/quote]

aa story kuda ayyindhi anna.... kavali ante aa pic kuda vesthanu...

like this i wrote...


insert into test (id,name) values (3,'c'),(4,'d'),(5,'c');

×
×
  • Create New...