why doesn't this create table work?
Posted in 2000
Topics: Error Codes & Troubleshooting, Security, Permissions & Auditing
I've messed with queries etc, this is my first attempt to create a
table to use myself..
Can anyone give me some pointers as to what's wrong with my sql?
why do I get the errors at the end?
Is it better to use "not null" after every char (xx), that I want no
nulls accepted, or is how I put it in the unique index at the end good
by itself?
Is the isql < createme.sql way I'm trying to do this completely wrong?
_________
database development;
create table nightpost
(
tkamx_site char(2),
tkamx_project char(10),
tkamx_calldte char (10),
tkamx_startupl char(6),
tkamx_stopupl char(6),
tkamx_uplbytes char(9),
tkamx_origrec char(8),
tkamx_uplrec char(8),
tkamx_ftpstart char(6),
tkamx_ftpend char(6),
tkamx_poststart char(6),
tkamx_postend char(6),
tkamx_stlstart char(6),
tkamx_stlend char(6),
tkamx_postallst char(6),
tkamx_postallst char(6),
tkamx_comment char(50),
);
grant all on nightpost to "public";
create unique index tkamx_date on nightpost
(tkamx_calldte,tkamx_site,tkamx_project) with disallow NULL;
___________________________________________
home/tony > isql < nightpost.sql
Database selected.
201: A syntax error has occurred.
Error in line 20Near character position 2
206: The specified table (nightpost) is not in the database.
111: ISAM error: no record found.
Error in line 1Near character position 24
201: A syntax error has occurred.
Error in line 2Near character position 42
/home/tony >
________________________________________
-Tony!-
In article <bqyTOQq+q5Qu+jnAtBaBfDMSKct1@4ax.com>, Tony!
<NoSpam@Thank.You.com> writes
>I've messed with queries etc, this is my first attempt to create a
>table to use myself..
>Can anyone give me some pointers as to what's wrong with my sql?
>why do I get the errors at the end?
>Is it better to use "not null" after every char (xx), that I want no
>nulls accepted, or is how I put it in the unique index at the end good
>by itself?
>
>Is the isql < createme.sql way I'm trying to do this completely wrong?
>
>_________
>
> database development;
>create table nightpost
> (
> tkamx_site char(2),
> tkamx_project char(10),
> tkamx_calldte char (10),
> tkamx_startupl char(6),
> tkamx_stopupl char(6),
> tkamx_uplbytes char(9),
> tkamx_origrec char(8),
> tkamx_uplrec char(8),
> tkamx_ftpstart char(6),
> tkamx_ftpend char(6),
> tkamx_poststart char(6),
> tkamx_postend char(6),
> tkamx_stlstart char(6),
> tkamx_stlend char(6),
> tkamx_postallst char(6),
> tkamx_postallst char(6),
> tkamx_comment char(50),
^ this won't help
> );
>grant all on nightpost to "public";
>create unique index tkamx_date on nightpost
>(tkamx_calldte,tkamx_site,tkamx_project) with disallow NULL;>
>___________________________________________
>
>home/tony > isql < nightpost.sql
>
>Database selected.
>
>
> 201: A syntax error has occurred.
>Error in line 20>Near character position 2
>
> 206: The specified table (nightpost) is not in the database.>
> 111: ISAM error: no record found.
>Error in line 1>Near character position 24
>
> 201: A syntax error has occurred.
>Error in line 2>Near character position 42
>
>/home/tony >
>
>________________________________________
>
>-Tony!-
>
>
Andrew Lennard andy@kontron.demon.co.uk
Andy Lennard wrote in message ...
>In article <bqyTOQq+q5Qu+jnAtBaBfDMSKct1@4ax.com>, Tony!
><NoSpam@Thank.You.com> writes
>>I've messed with queries etc, this is my first attempt to create a
>>table to use myself..
>>Can anyone give me some pointers as to what's wrong with my sql?
>>why do I get the errors at the end?
>>Is it better to use "not null" after every char (xx), that I want no
>>nulls accepted, or is how I put it in the unique index at the end good
>>by itself?
>>
>>Is the isql < createme.sql way I'm trying to do this completely wrong?
>>
>>_________
>>
>> database development;
>>create table nightpost
>> (
>> tkamx_site char(2),
>> tkamx_project char(10),
>> tkamx_calldte char (10),
>> tkamx_startupl char(6),
>> tkamx_stopupl char(6),
>> tkamx_uplbytes char(9),
>> tkamx_origrec char(8),
>> tkamx_uplrec char(8),
>> tkamx_ftpstart char(6),
>> tkamx_ftpend char(6),
>> tkamx_poststart char(6),
>> tkamx_postend char(6),
>> tkamx_stlstart char(6),
>> tkamx_stlend char(6),
>> tkamx_postallst char(6),
>> tkamx_postallst char(6),
>> tkamx_comment char(50),
^ remove extra comma
not needed!
> ^ this won't help
>> );
>>grant all on nightpost to "public";
>>create unique index tkamx_date on nightpost
>>(tkamx_calldte,tkamx_site,tkamx_project) with disallow NULL;>>
>>___________________________________________
>>
>>home/tony > isql < nightpost.sql
>>
>>Database selected.
>>
>>
>> 201: A syntax error has occurred.
>>Error in line 20>>Near character position 2
>>
>> 206: The specified table (nightpost) is not in the database.>>
>> 111: ISAM error: no record found.
>>Error in line 1>>Near character position 24
>>
>> 201: A syntax error has occurred.
>>Error in line 2>>Near character position 42
>>
>>/home/tony >
>>
>>________________________________________
>>
>>-Tony!-
>>
>>
>
>Andrew Lennard andy@kontron.demon.co.uk
You have a , at the end of your column statements, right before the ).
Try taking this out.
"Tony!" wrote:
> I've messed with queries etc, this is my first attempt to create a
> table to use myself..
> Can anyone give me some pointers as to what's wrong with my sql?
> why do I get the errors at the end?
> Is it better to use "not null" after every char (xx), that I want no
> nulls accepted, or is how I put it in the unique index at the end good
> by itself?
>
> Is the isql < createme.sql way I'm trying to do this completely wrong?
>
> _________
>
> database development;
> create table nightpost
> (
> tkamx_site char(2),
> tkamx_project char(10),
> tkamx_calldte char (10),
> tkamx_startupl char(6),
> tkamx_stopupl char(6),
> tkamx_uplbytes char(9),
> tkamx_origrec char(8),
> tkamx_uplrec char(8),
> tkamx_ftpstart char(6),
> tkamx_ftpend char(6),
> tkamx_poststart char(6),
> tkamx_postend char(6),
> tkamx_stlstart char(6),
> tkamx_stlend char(6),
> tkamx_postallst char(6),
> tkamx_postallst char(6),
> tkamx_comment char(50),
> );
> grant all on nightpost to "public";
> create unique index tkamx_date on nightpost
> (tkamx_calldte,tkamx_site,tkamx_project) with disallow NULL;>
> ___________________________________________
>
> home/tony > isql < nightpost.sql
>
> Database selected.
>
> 201: A syntax error has occurred.
> Error in line 20> Near character position 2
>
> 206: The specified table (nightpost) is not in the database.>
> 111: ISAM error: no record found.
> Error in line 1> Near character position 24
>
> 201: A syntax error has occurred.
> Error in line 2> Near character position 42
>
> /home/tony >
>
> ________________________________________
>
> -Tony!-
"Tony!" wrote:
> I've messed with queries etc, this is my first attempt to create a
> table to use myself..
> Can anyone give me some pointers as to what's wrong with my sql?
> why do I get the errors at the end?
> Is it better to use "not null" after every char (xx), that I want no
> nulls accepted, or is how I put it in the unique index at the end good
> by itself?
>
> Is the isql < createme.sql way I'm trying to do this completely wrong?
>
> _________
>
> database development;
> create table nightpost
> (
> tkamx_site char(2),
> tkamx_project char(10),
> tkamx_calldte char (10),
> tkamx_startupl char(6),
> tkamx_stopupl char(6),
> tkamx_uplbytes char(9),
> tkamx_origrec char(8),
> tkamx_uplrec char(8),
> tkamx_ftpstart char(6),
> tkamx_ftpend char(6),
> tkamx_poststart char(6),
> tkamx_postend char(6),
> tkamx_stlstart char(6),
> tkamx_stlend char(6),
> tkamx_postallst char(6),
> tkamx_postallst char(6),
> tkamx_comment char(50),
You need to remove the comma!! Happy Obnoxio? 8O)
>
> );
> grant all on nightpost to "public";
> create unique index tkamx_date on nightpost
> (tkamx_calldte,tkamx_site,tkamx_project) with disallow NULL;>
> ___________________________________________
>
> home/tony > isql < nightpost.sql
>
> Database selected.
>
> 201: A syntax error has occurred.
> Error in line 20> Near character position 2
>
> 206: The specified table (nightpost) is not in the database.>
> 111: ISAM error: no record found.
> Error in line 1> Near character position 24
>
> 201: A syntax error has occurred.
> Error in line 2> Near character position 42
>
> /home/tony >
>
> ________________________________________
>
> -Tony!-