473,509 Members | 3,009 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Equivalent of Oracle "@" in db2

What is the equivalent of "@" (oracle) in db2?

I could use -f option but the basic requirement is to be able to call
file Y from file X.
In Oracle I can have file X as:
---
command 1;
command 2;
@file Y;
disconnect;
---

Can this be done on db2 also?
Regards
Fareeda
Nov 12 '05 #1
3 2596
If you are in within a db2 script then it is not possible ..

ie
db2 -tvf X

where X is

select * from syscat.triggers
Y

is not possible,
but with X as

db2 "select * from syscat.triggers"
Y

will work ...

http://www-106.ibm.com/developerwork...07fierros.html
will be a good read

Cheers
Sathyaram
www.db2click.com
fa*****@pspl.co.in (fareeda) wrote in message news:<c6**************************@posting.google. com>...
What is the equivalent of "@" (oracle) in db2?

I could use -f option but the basic requirement is to be able to call
file Y from file X.
In Oracle I can have file X as:
---
command 1;
command 2;
@file Y;
disconnect;
---

Can this be done on db2 also?
Regards
Fareeda

Nov 12 '05 #2
You can of course use whatever substitutions your operating system
allows, e.g. Korn shell on UNIX:

#!/bin/ksh
EMPNO="00010"
db2 -t <<EOF
SELECT * FROM employee
WHERE empno = '$EMPNO' AND
fired_flag = 'Y';
EOF
if test $? -eq 1; then echo "employee $EMPNO was fired"; fi
[etc]
DG
Nov 12 '05 #3
fareeda <fa*****@pspl.co.in> wrote:
What is the equivalent of "@" (oracle) in db2?

I could use -f option but the basic requirement is to be able to call
file Y from file X.
In Oracle I can have file X as:
---
command 1;
command 2;
@file Y;
disconnect;
---

Can this be done on db2 also?


In a different way, yes:
------------------------------
SQL statement 1;
SQL statement 2;
! external command;
connect reset;
------------------------------
The "external command" can be a simple "db2 -td -f anotherFile", giving you
the feature you need.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
13911
by: rotarinn | last post by:
Hi, I am using VisualStudio.NET 2003 trying to connect to an Oracle Database (version 8.0.5). I have created the connection using "Microsoft OleDBProvider for Oracle" and when I click on Test...
12
3709
by: Mikito Harakiri | last post by:
I wonder if WITH RECURSIVE MaryAncestor(anc,desc) AS ( (SELECT parent as anc, child as desc FROM ParentOf WHERE desc = "Mary") UNION (SELECT A1.anc, A2.desc FROM MaryAncestor A1, MaryAncestor...
2
18371
by: gimme_this_gimme_that | last post by:
Assuming data is being stored in a DB2 TIMESTAMP what is the equivalent of Oracle's to_date function : to_date('03/04/2005','MM/DD/YYYY') It's OK if MM/DD/YYYY is the only supported format....
2
5883
by: narasingarao | last post by:
Hi to group, I'm a student of M.C.A. from B.I.T. Ranchi...I'm in my project period here i have to migrate the MS-Access database table to Oracle data base tables...so, please help me in getting...
3
2820
by: Frank Milverckowitz | last post by:
Hi, Newbie question about SqlDataReader column value access... In java jdbc code to get a value from a table column we can pass the column name (instead of an int index or offset): String...
6
12379
by: openopt | last post by:
Thank you in advance for your response. Dmitrey
16
9151
by: network-admin | last post by:
We have Problems with Access query on Oracle 10g Database with ODBC Connection. The Query_1 is such as select * from xtable where ycolumn <"S" Result = ODBC Faild...
4
5009
by: Peter Kanurer | last post by:
Assume I add in VisualCSharp 2005 References to Oracle.DataAccess AND System.Data.OracleClient to an application. Does this cause problems or can they co-exist in one application ?
2
2160
by: ghe | last post by:
Good day to all, Does anyone here know how to convert the specified Oracle code below into PHP? Oracle Code: TYPE myTable IS TABLE OF varchar2(1) INDEX BY BINARY_INTEGER; If the Oracle code i...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5652
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
775
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.