calling a sql script from another sql script
Hi, does anyone know how to call a sql script (Note: not a stored
another sql script in sybase? In oracle, you just put @ before the
I haven't been able to find out how to do it in sybase. Any help will be
Yilin Cai wrote:
> Hi, does anyone know how to call a sql script (Note: not a stored
> procedure) from
> another sql script in sybase? In oracle, you just put @ before the
> script name.
> I haven't been able to find out how to do it in sybase. Any help will be
> app...ASA T-SQL vs MS T-SQL
Does anyone have/know of a list of points that present the differences
between Sybase Adaptive Server Anywhere Transact SQL and Microsoft's
This information would be used for porting some MS T-SQL to a SQL
Anywhere 7 database.
>Does anyone have/know of a list of points that present the differences
>between Sybase Adaptive Server Anywhere Transact SQL and Microsoft's
>This information would be used for porting some MS T-SQL to a SQL
>Anywhere 7 database.
The ASA online help has an lengthy section on ASA (watcom) sql to T-SQL compatabili...Documentation
I am using SQL Any for many years now (since the good old Watcom times)
and it is a great (if not the best) DB server money can buy. I was also
using MS SQL for quite a long time. I used to write mainly in T-SQL
(because of compatibility with M$ SQL and ASE) but because of the much
more powerfull language I use more and more Watcom SQL.
However it would be a great help for me, to have a Watcom and T-SQL
syntax displayed on the same help page. I could imagine somewhat similar
to the help Microsoft provides in their SDK/API help. You can select the
language on top (e.g. C...T-SQL Script Confusion
I am trying to create a database on a daily naming scheme.
DECLARE @DBDATE varchar(50)
SET @DBDATE = datename(WeekDay,GetDate())
-- the error message is tied to the line below
CREATE DATABASE DATABASE_PRACTICE_+ @DBDATE
error message is:
Server: Msg 170, Level 15, State 1, Line 7
Line 7: Incorrect syntax near '+'.
What the heck am I doing wrong??
DECLARE @DbName NVARCHAR(50)
SET @DbName = datename(WeekDay,GetDate())
SET @DbName = 'CREATE DATABASE DATABASE_PRACTICE_' + @DbName
E...T-SQL script through ISQL
I'm trying to run an ASE T-SQL script in ASA. In theory they're completely
compatible, no ;-)
My problem seems to be something simple with the 'go's being converted to
semi-colons. Each individual statement works fine on its own, but when I
try to run the script all at once, I get ASA Error -131 : Syntax error near
My workaround is to run every statement one at a time... it works, but it's
not practical as a long term solution.
Is anyone familiar with this phenomonon? What can I do to get around it?
Thanks in advance,
script snip...executing T sql function in Powerbuilder Script
I have to execute a sql statement which includes variable and T-Sql
function. Below is the code.
ls_sql = "INSERT INTO security..userworkgroup " + &
"SELECT MAX(userworkgroupid) + 1, :al_userid , :al_workgroupid,
getdate(), suser_name(), getdate(), suser_name(), 'ips_test'" +&
" FROM security..userworkgroup"
ll_rc = gnv_appmgr.itr_trans.of_execute(ls_sql)
In the above sql :al_userid and al_workgroupid is the variable and
suser_name() and getdate() is the function. I am getting error stating
"Incorrect Syntax near :&q...PL/SQL to T/SQL
Is there easy way of converting some of the oracle analytics
queries to sybase.
dense_rank() over (
...T-SQL and SQL 2005
What is the difference between T-SQL and normal SQL??RoelRoel Alblas, Dordrecht, Holland,www.gps2sms.nl
Hi, from: http://en.wikipedia.org/wiki/TSQL
Sometimes abbreviated T-SQL, Transact-SQL is Microsoft's and Sybase's proprietary extension to the SQL language. Microsoft's implementation ships in the Microsoft SQL Server product. Sybase uses the language in its Adaptive Server Enterprise, the successor to Sybase SQL Server.
In order to make it more powerful, SQL has been enhanced with additional features such as:
User authentication integrat...difference between T-Sql and Sql,
I am very new to Sybase, can some one tell me the differences
between T-Sql and Sql.
Thanks in advance,
I believe you are referring to:
SQL--The standard SQL syntax used universally for most DBMS's
T-SQL--Transact-SQL, Sybase's flavor of SQL the is used for writing stored
proc's, etc. I supported variable declarations, functions and data-type
...Script called by another script
I'm trying to launch a script from another script:
----- script1.js -----
var scope = Context.enter().initStandardObjects();
Context.enter().evaluateReader(scope, new FileReader("script2.js"),
"script2.js", 1, null);
------ script2.js -----
----> an exception occurs : js: "script2.js", line 2: uncaught
...GENERAL SQL SERVER: Question about the Script that setups the SQL Server Database.
This is the first time I have created a script for Sql Server 2000, and I have run into a few syntax ereas that I am not familar with. Bellow is a section of the script from the Portal server packages. At the end of the sample, is "ON [PRIMARY], Can anyone explain to me what this does and why the primary key isnt setup inside the code itself? I am basically trying to take parts of the script and incorrporate it into my own script and hate added syntax that I dont understand, makes debugging a real pain in the future.
CREATE TABLE [dbo].[Portal_Announcements] (
[ItemID] [in...How to write triger using T-SQL, & where get info about using T-SQL in ASA
I want to have last update date of the row in table field "RecUpdateDate",
record is updated. How to write ASA triger using T-SQL .
Something like this(this trigger updates record with ID =1):
create trigger DBA.tr_test_iu on
dba.test for insert,update
update dba.test set RecUpdateDate = GETDATE(*) where ID = 1
Using WatcomSQL I can do this using "reference"
Instead of writing a trigger to do this, define the column as:
last_modified timestamp not null default times...sql script doesn't create sprocs or tables
they don't exactly make it easy to install this app block. When I start the app and click on a button, I get the error:
" could not find the sproc"
yet, I ran the 2 sql setup files w/out a problem.I do notice that there are no sprocs or user tables in the database though.
Does anyone know what could have caused this?
yogi.buy an old van and drive round oz....Calling .sql scripts
I'm trying to figure out how to call a sql script from another sql script.
For some reason I can't find any info. In oracle it is quite simple, just
Any help would be appreciated
Just execute the read command from a .SQL script
top.sql contains :
sql1.sql contains :
sql2.sql contains :
Sybase iAnywhere Solutions
Please reply only to the newsgroup
ASA Patches and EBFs : htt...