You are not logged in or registered. Please login or register to use the full functionality of this SYBASETEAM.COM Website...
Current time: 03-12-2010, 09:25 AM Hello There, Guest! (LoginRegister)
Tags: problem, read, statement,
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with read statement
02-02-2010, 04:03 AM
Post: #1
problem with read statement
Hi, i am running ASE 15.0 free developer version

i have a file with these sentences:

---------
print 'Preparing pass procedures'
go

read ./sy/passCtrl/structure/ctrl/fnDatePeriods.sql
go
---------

then, i use these sentece to call that file:

---------
isql -Ufr -Pfactorepo -SFACTOREPO < ./sy/passCtrl/initialize/preparePassProcedures.sql
---------

but i am getting this error

---------
Preparing pass procedures
Msg 156, Level 15, State 2:
Server 'JMIGUEL77DESKTOP', Line 2:
Incorrect syntax near the keyword 'read'.
---------

The file was tested against sqlAnywhere and it worked

thanks
Find all posts by this user
Quote this message in a reply

02-02-2010, 11:04 PM
Post: #2
RE: problem with read statement
I get the same error.Will check it out and let you know.

Msg 156, Level 15, State 2:
Server 'TEST_SYBASE15', Line 1:
Incorrect syntax near the keyword 'read'.

Looks like it is something to do with the syntax. will see !
Find all posts by this user
Quote this message in a reply
02-03-2010, 02:04 AM
Post: #3
RE: problem with read statement
I don't think we can use 'READ' here in Sybase ASE isql.

READ is an Interactive SQL command.This command is intended only for Interactive SQL and are not sent to Adaptive Server for execution The database engine has no idea of the READ command, so we get the error "Incorrect syntax near the keyword 'read'.

Hope this helps a bit !

Kishor,
TechSupport-SeniorMember(SybaseTeam.Com)
Find all posts by this user
Quote this message in a reply

02-03-2010, 02:32 AM
Post: #4
RE: problem with read statement
ok, so, what if i want to execute a .sql file from another .sql call ??

is there any command to execute a file with sentences from inside isql ??

thanks
Find all posts by this user
Quote this message in a reply
02-03-2010, 10:42 PM
Post: #5
RE: problem with read statement
Did you try using Interactive SQL on your PC and execute this?
Never tried in isql command line Sad
Find all posts by this user
Quote this message in a reply

02-03-2010, 11:40 PM
Post: #6
RE: problem with read statement
thats not the problem
i want to create a task for buliding an entire database schema and i want to call other .sql files from one callable point
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  sybase case , sybase case statement john 0 48 07-07-2009 03:24 AM
Last Post: john

Forum Jump: