Jambhalheart Posted June 15, 2011 Report Posted June 15, 2011 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
tom bhayya Posted June 15, 2011 Report Posted June 15, 2011 oka excel lono, cs file or text pad lo pettuko values..... import tool use insert chesuko thats it.....
Jambhalheart Posted June 15, 2011 Author Report Posted June 15, 2011 [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...
king420 Posted June 15, 2011 Report Posted June 15, 2011 [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
tom bhayya Posted June 15, 2011 Report Posted June 15, 2011 bulk insert annavu ani aa option cheppa.... 3 values insert is not a bulk insert......
galigannarao Posted June 15, 2011 Report Posted June 15, 2011 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
galigannarao Posted June 15, 2011 Report Posted June 15, 2011 [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_floatFROM 'C:\t_float-c.dat' WITH (FORMATFILE='C:\t_floatformat-c-xml.xml');GOila cheste saripoddi. S%Hi
Jambhalheart Posted June 15, 2011 Author Report Posted June 15, 2011 [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]
tom bhayya Posted June 15, 2011 Report Posted June 15, 2011 [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]
galigannarao Posted June 15, 2011 Report Posted June 15, 2011 SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL ServerCreate TestTableUSE TestDataGOCREATE TABLE CSVTest(ID INT,FirstName VARCHAR(40),LastName VARCHAR(40),BirthDate SMALLDATETIME)GOCreate CSV file in drive C: with name csvtest.txt with following content. The location of the file is C:\csvtest.txt1,James,Smith,197501012,Meggie,Smith,197901223,Robert,Smith,200711014,Alex,Smith,20040202BULKINSERT CSVTestFROM 'c:\csvtest.txt'WITH(FIELDTERMINATOR = ',',ROWTERMINATOR = '\n')GO--Check the content of the table.SELECT *FROM CSVTestGO
Jambhalheart Posted June 15, 2011 Author Report Posted June 15, 2011 [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....
htnamus Posted June 15, 2011 Report Posted June 15, 2011 [img]http://www.desigifs.com/sites/default/files/brahmam_rom2.gif?1290348807[/img]
galigannarao Posted June 15, 2011 Report Posted June 15, 2011 [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
Jambhalheart Posted June 15, 2011 Author Report Posted June 15, 2011 [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');
Recommended Posts