March 25, 2009 at 5:46 pm
My table:
CREATE Table kund(
kund_id int IDENTITY(1,1) NOT NULL,
kundansvarig_id int Constraint c_kund_ansvar_id References personal(personal_id),
fornamn char(20) NOT NULL,
efternamn char(20) NOT NULL,
telefonnr char(15) NOT NULL,
mobiltelefonchar(15) NOT NULL,
ring_ej_flaggabit NOT NULL,
CONSTRAINT pk_kund_id primary key (kund_id));
My teacher gave me a exel file whit 1000 rows...
But the column ring_ej_flagga is datatype of "Bit" and he he gave me the values in seperate file.
I don't really know how to insert "bit" values on my column.
And i don't really know what tool i must use.
Can someone tell me what tool i shall use
March 25, 2009 at 6:00 pm
a bit xolumn is still an integer value...it's just limited to 0 or 1.
does that help? i assume your excel file has that value in one of the columns?
Lowell
March 26, 2009 at 6:08 am
But what tool shoed i use to insert 1000 rows?
March 26, 2009 at 7:08 am
that depends on the assignment your teacher gave you right?
the easiest is to simply use the built in wizards from SSMS: right click...Tasks..Import/Export.
Other options are to use the SSIS todo the job, or to add the files as linked servers, use BULK INSERT, or to use bcp.exe.
It really depends on your assignment that the teacher gave you when he gave you the raw data.
he probably gave you two files so you'd have to import both, then insert from Excel, and then Update from the other file.
Lowell
March 26, 2009 at 11:05 am
I have try it whit import/export but it only allows 100 rows.
March 26, 2009 at 11:07 am
100 rows is probably what you see in the preview screen, it will import all of them, it can be used to import a lot more than 1000 rows.
Cheers,
J-F
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply