Showing posts with label generated. Show all posts
Showing posts with label generated. Show all posts

Thursday, March 22, 2012

Error Dumping Data in SQl Server

Im dumping data from a PostgreSql DB into SQL Server. After cleaning up the generated SQL I created my table as such:

<code>

CREATE TABLE certifications (
cert_id int identity(1,1),
seminar_date datetime NOT NULL,
last_name varchar NOT NULL,
first_name varchar NOT NULL,
housing_agency varchar NOT NULL,
seminar varchar NOT NULL,
UNIQUE (cert_id)
);

</code>

When I try to insert like so:

<code>

Set identity_insert certifications on
Go
INSERT INTO certifications (cert_id, seminar_date, last_name, first_name, housing_agency, seminar) VALUES(580, '2001-03-23', 'Dean', 'James', 'Some Finance Agency', Some Certification');

INSERT INTO certifications (cert_id, seminar_date, last_name, first_name, housing_agency, seminar) VALUES(580, '2001-03-23', 'Dean2', 'James2', 'Some Finance Agency2', Some Certification2');

Set identity_insert certifications off
Go

</code>

(There are a few thousand records)
I get this error:

<error>

Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.
Server: Msg 8152, Level 16, State 9, Line 1
String or binary data would be truncated.
The statement has been terminated.

</error>

Any help would be greatly appreciated

TIACREATE TABLE certifications (
cert_id int identity(1,1),
seminar_date datetime NOT NULL,
last_name varchar NOT NULL,
first_name varchar NOT NULL,
housing_agency varchar NOT NULL,
seminar varchar NOT NULL,
UNIQUE (cert_id)
);

You will need to specify the width of varchar colums .. i believe that is the source of your problem|||You were correct. Thanks a bunch! -Esql

Wednesday, March 21, 2012

Error de Aplication

SQL dump exception Handler: Process 58 Generated fatal exception C0000005. Exception acces violation. SQL server is terminating this process.
I don=B4t undesrstand please help me !!!
please send email anaula@.maint.com.ecThese types of errors are bugs in SQL Server. Search Knowledgebase for info and make sure you are
current on service packs. If that doesn't help, open a case with Microsoft Support.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Ana Naula" <anaula@.maint.com.ec> wrote in message news:0c5c01c391ea$f8fb4f20$a101280a@.phx.gbl...
SQL dump exception Handler: Process 58 Generated fatal
exception C0000005. Exception acces violation. SQL server
is terminating this process.
I don´t undesrstand please help me !!!
please send email anaula@.maint.com.ec