Domanda

I want to create table from a script on sybase-iq. Script table.sql contains:

create table abc
(
 id int
)
go

I run the script command

isql -U*** -P*** -S*** -D*** -itable.sql  -oout.txt

I'm sure connection parameters are ok. Name of script is correct too.

But It doesn't work, script did not create the table and I have not any errors in output file.

Thanks in advance for your advice.

PX

È stato utile?

Soluzione

I found it!

The script was generated by isql with option -o and it was Macintosh format! I have seen it in np++. I have changed format to DOS\Windows and it's work!

A problem was with EOL. I had char(13) (Mac), but correct is char(13)+char(10) (DOS).

Thanks for your answers!

Altri suggerimenti

put a syntax error in to see if "go" is being found correctly and the statement is actually going to the server. You should get an error.

If it is then is it default database? I'm not certain Sybase IQ has different databases like ASE, but if it does then maybe your login Id has a default db that installs the tab to a different db?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top