Ask Your Question
0

sql INSERT error: name longer than db col size

asked 2019-05-25 19:11:44 +0200

LogHomeGuy gravatar image

I'm new to LO, but when I was working, I used MS Access and VB extensively, so I'm not a total newbie. I'm trying to import a text file into a simple table via sql INSERT & getting nowhere.

The db table is very simple: ID field and 4 text columns (all w/ short names). The sql I'm trying is:

INSERT INTO "Quotes" ("Topic", "Author", "Quote") VALUES ("Courage", "Ralph Waldo Emerson", "A hero is ...")

Thr error I get is :

1: firebird_sdbc error: *Dynamic SQL Error *SQL error code = -104 *Name longer than database column size caused by 'isc_dsql_prepare'

It doesn't make any sense, because the field sizes are 100, 100, and 200 for the three text fields. The column names (as shown in the sql statement) are very short, and there is no data in the text that even comes close to the maximum field sizes.

I get the same error if I run it in a macro. I've tried every combination of all caps, double quotes, etc., but nothing works. Can anyone help? Thank you very much!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2019-05-25 19:36:12 +0200

Ratslinger gravatar image

Hello,

Although a different error using your SQL, a correction (surround the data with apostrophe NOT quotes) produces correct result:

image description

edit flag offensive delete link more

Comments

Holy cow! I figured it was something simple that would make me look stupid & I was right. Anyway, thank you so much! I can't believe how quickly you responded. Really impressed!

LogHomeGuy gravatar imageLogHomeGuy ( 2019-05-25 19:51:33 +0200 )edit

My pleasure. Glad it helped.

Ratslinger gravatar imageRatslinger ( 2019-05-25 20:05:27 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-05-25 19:11:44 +0200

Seen: 24 times

Last updated: May 25