Re: why doesn't this create table work?
Posted in 2000
Topics: Error Codes & Troubleshooting, Security, Permissions & Auditing
En Tony! va escriure el dia 11 Aug 2000, a les 2:44:
> 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 the comma at end of the above line.
> );
> 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!-
>
>
---------------------------------------
Isidre PONS ROCA
BASE - Gesti' d'Ingressos Locals
(Diputacio de Tarragona)
Servei de Sistemes d'Informacio
Av President Lluis Companys 12-C
43005 - Tarragona
SPAIN
Tel # +34 977 236731
Fax # +34 977 227302
http://www.altanet.org
ipons@dtgna.altanet.org
---------------------------------------
Thanks to you and the other few people who replied about removing the
comma (doh!).
After I got that fixed I noticed that I also duped the two lines above
it too, so I fixed that too. (double doh)
Thanks again!
-Tony- (Newbie)
On Fri, 11 Aug 2000 11:55:21 +0200, "Isidre PONS ROCA"
<ipons@dtgna.altanet.org> wrote:
<snip>
>> tkamx_stlend char(6),
>> tkamx_postallst char(6),
>> tkamx_postallst char(6),
>> tkamx_comment char(50),
>
>Remove the comma at end of the above line.
>
>> );
>> 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!-
>>
>>
>
>
>
>---------------------------------------
> Isidre PONS ROCA
> BASE - Gestió d'Ingressos Locals
> (Diputacio de Tarragona)
> Servei de Sistemes d'Informacio
> Av President Lluis Companys 12-C
> 43005 - Tarragona
> SPAIN
> Tel # +34 977 236731
> Fax # +34 977 227302
> http://www.altanet.org
> ipons@dtgna.altanet.org
>---------------------------------------