distal-attribute
distal-attribute
distal-attribute
distal-attribute

SQL Error (1103): Incorrect table name ''

Allineer posted 3 years ago in HeidiSQL portable
1. Select table in the VT;
2. Select Data page, view table content;
3. Select Database page and refresh it by pressing F5 button;
4. Return to Data page and try to refresh data by pressing F5 button;
5. See error massage: SQL Error (1103): Incorrect table name ''



Allineer posted 3 years ago
Sorry.
Screenshot

Table structure:

CREATE TABLE `rep_triggers` (
`gid` INT(3) UNSIGNED NOT NULL,
`trigger` VARCHAR(50) NOT NULL,
`name` VARCHAR(100) NOT NULL,
`url` VARCHAR(100) NULL DEFAULT NULL,
`mark` INT(1) UNSIGNED NOT NULL DEFAULT '0',
`mark2` INT(1) UNSIGNED NOT NULL DEFAULT '0',
`DTLM` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY (`trigger`)
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM;

Allineer posted 3 years ago
Fixed @tm. Thanks.
ansgar posted 3 years ago
what is "@tm"?
Allineer posted 3 years ago
"at this moment"
ansgar posted 3 years ago
Ah, thanks for the enlightment. I assume you did update your heidisql.exe to a nighly build which then fixed it, as I recall there was a recent fix for exactly this error.
shamasshamrock posted 6 months ago
Hi,

I am having the save problem with "SQL Error (1103): Incorrect table name "

here is what's been triggering the 1103 error code:


SQL query:

CREATE TABLE `admin_pay' (
` pay_id ' bigint(20) NOT NULL auto_increment, `pay_amount'double NOT NULL default '0',
PRIMARY KEY ( `pay_id` ) );

MySQL said: Documentation
#1103 - Incorrect table name 'admin_pay' (


I tried adding the

)
COLLATE='utf8_general_ci'
ENGINE=MyISAM;

to the original SQl.php script like this:

CREATE TABLE `admin_pay' (
`pay_id' bigint(20) NOT NULL auto_increment,
`pay_amount' double NOT NULL default '0',
PRIMARY KEY (`pay_id`)
);

--
-- Dumping data for table `admin_pay`
--

INSERT INTO `admin_pay` VALUES (1, 0);
)
COLLATE='utf8_general_ci'
ENGINE=MyISAM;


but it still returned the same 1103 error code.
Can you offer any suggestions that might help solve this error problem?







ansgar posted 6 months ago
You have the table name enclosed in two different quote chars: backtick and single quote. Only backticks are allowed quote chars in mysql.
shamasshamrock posted 6 months ago
Thank you for bringing that to my attention! Before you mentioned it, I didn't know a "backtick" and a "single quote" were different. Indeed I did add some "single quotes" to the sql.php page because the "backticks" were so faint and hard to see. I had no clue I was effectively messing up the sql.php page by adding those single quotes to it. Excellent call!

However, I have now replaced all the single quotes I had previously changed, and put with "backticks" in their place. But I'm still get the same "1103" error flag.

So, apparently the " SQL Error (1103): Incorrect table name" error flag I'm getting isn't being triggered by the single quotes I had added to the page. But rather, it's being triggered by different problem I haven't been able to locate yet.

Excellent call, though. Thank you so much for pointing that out! Do you have any more ideas I might try?
jfalch posted 6 months ago
when I execute

CREATE TABLE admin_pay (
pay_id bigint(20) NOT NULL auto_increment,
pay_amount double NOT NULL default '0',
PRIMARY KEY (pay_id)
);

it works ok on my system. donĀ“t know why you use all the quotes.
jfalch posted 6 months ago
CREATE TABLE admin_pay (
pay_id bigint(20) NOT NULL auto_increment,
pay_amount double NOT NULL default '0',
PRIMARY KEY (pay_id)
)
COLLATE=utf8_general_ci
ENGINE=MyISAM;

works as well.
shamasshamrock posted 6 months ago
Wow...I am thoroughly hyped now! I got it to work just as you said! Once I replaced all the single quotes with backticks, it works great! Thanks again!

Maybe you can help me with another issue?


-- Table structure for table `affil_heap_sessionid`
--
CREATE TABLE `affil_heap_sessionid` (
`heap_id` bigint( 20 ) NOT NULL default '0',
`heap_name` varchar( 255 ) NOT NULL default '0',
`heap_regdate` datetime NOT NULL default '0000-00-00.00.00',
`heap_approved` bigint( 20 ) NOT NULL default '0',
`heap_pending` bigint( 20 ) NOT NULL default '0',
`heap_paid` bigint( 20 ) NOT NULL default '0',
PRIMARY KEY ( `heap_id` )

I'm getting a syntax error 1064 that states:
Message: %s near '%s' at line %d

ansgar posted 6 months ago
The heap_regdate column has an invalid default value:
Wrong: 0000-00-00.00.00
Right: 0000-00-00 00:00:00
shamasshamrock posted 6 months ago
Got it. Thank you again. Everything seems to be working great now. Couldn't have done it without your help. Many thanks!

Please login to leave a reply, or register at first.