SqlDbx Forum

SqlDbx

You are not logged in.

#1 2017-05-22 19:15:35

tbenci
Member

Syntax error with INPUT statement (Sybase)

Hi Everyone,

This code segment works in Sybase Central but when I try and run it in SQLDBX I get a syntax error warning

SQLDBX wrote:

syntax error near 'INPUT' on line 1

As I said, works fine in Sybase Central but who would ever want to use Sybase Central if you have SQLDBX (and I welcome the Sybase Central fan boys smile you don't even have Intellisense ARRGGG!).


SQL Script wrote:

INPUT INTO
    WkCodeFl
FROM
    'L:\Data Services\Job Codes\Isuzu\aitJobCode_1_Header.txt' FORMAT TEXT delimited by ',';

Any thoughts.

Cheers
Tony

Offline

#2 2017-05-23 10:52:57

sqldbxhelp
Administrator

Re: Syntax error with INPUT statement (Sybase)

INPUT INTO is not Sybase IQ command, but implemented internally by Sybase Central, so it can not be used from SqlDbx.
What you can do is to right click on a table and select "Import Data From"->File

Offline

#3 2017-05-24 19:05:36

tbenci
Member

Re: Syntax error with INPUT statement (Sybase)

Thanks for your response.

Having done some further research of my own it would appear that SQLDBX is parsing the script prior to sending it to the SQL engine.

If this is the case, the parsing would appear to be for TRANSACT SQL. SQL Anywhere has two dialects, TRANSACT and WATCOM and both are valid.

INPUT INTO is part of WATCOM SQL (not supported by TRANSACT SQL). Is this issue because SQLDBX is parsing and validating against TRANSACT SQL prior to executing the script?

Have I gotten this wrong, is SQLDBX is not parsing prior to execution and, if this is the case, how do we get the command through to the SQL engine without syntax validation. Is this possible?

Offline

#4 2017-05-24 20:53:43

sqldbxhelp
Administrator

Re: Syntax error with INPUT statement (Sybase)

SqlDbx does not do any parsing and does not know anything about dialect.
INPUT is not command which is part of SQL language for Sybase IQ.
Sybase utilities, for example dbisql do implement INPUT command, but it has nothing to do with SQL supported by IQ Server.
It's the same thing for example as CMD command implemented in SqlDbx.

Offline

Board footer

Powered by FluxBB