Hi
In SQL Server query analyser, I have the follwoing query
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[TabUser4]') and OBJECTPROPERTY( id, N'IsUserTable')
= 1)
drop table [dbo].[TabUser4]
GO
I was wondering if there is an equivalent way of performing such a
query in db2 command centre without having to write a procedure??
thanks
Lyn 2 4456
Lyn Duong <ly**@tablimite d.com.au> wrote: Hi
In SQL Server query analyser, I have the follwoing query
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TabUser4]') and OBJECTPROPERTY( id, N'IsUserTable') = 1) drop table [dbo].[TabUser4] GO
I was wondering if there is an equivalent way of performing such a query in db2 command centre without having to write a procedure??
(1)
DROP TABLE <schema>.<table >
and then ignore the error code that might have been returned in case the
table did not exist
(2)
SELECT COUNT(*)
FROM syscat.tables
WHERE ( tabschema, tabname ) = ( '<schema>', '<table>' ) AND
type = 'T'
If the return is 1 (one), then run the DROP TABLE.
--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Hi
Thanks but I was actually looking for something more like a compound
dynamic statement to issue in db2 clp or command center but found that
you can use ddl in these statements anyway. Will need to write a
script with error code checking. Thanks anyway
Lyn
Knut Stolze <st****@de.ibm. com> wrote in message news:<bv******* ***@fsuj29.rz.u ni-jena.de>... Lyn Duong <ly**@tablimite d.com.au> wrote:
Hi
In SQL Server query analyser, I have the follwoing query
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[TabUser4]') and OBJECTPROPERTY( id, N'IsUserTable') = 1) drop table [dbo].[TabUser4] GO
I was wondering if there is an equivalent way of performing such a query in db2 command centre without having to write a procedure??
(1) DROP TABLE <schema>.<table > and then ignore the error code that might have been returned in case the table did not exist
(2) SELECT COUNT(*) FROM syscat.tables WHERE ( tabschema, tabname ) = ( '<schema>', '<table>' ) AND type = 'T'
If the return is 1 (one), then run the DROP TABLE. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jean-Marc Blaise |
last post by:
Dear all,
The Control Center (V8.1 FP4 / Windows), gives as output options :
<evmGroup>
(
|
by: Ingo Kollesch |
last post by:
Moin,
i will work, remote acces on the server.
After the login, I open the control center an when I click on "Database".
The System message is "der Befehl DB2Start is noch nicht abgesetzt".
When I will start the Database System message is "Database ist aktiv".
My problem is i can not see the tables the control center and
when I start the command center and and I execute the command
connect to database I become the system message
"der...
|
by: Sean C. |
last post by:
Helpful folks,
I've just migrated our test server from V7.2 -FP11 to V8.1.3, on WinNT 4.0.
Everything went pretty darn smoothly, however I get the following errors
when using the Control Center:
Click on the 'Event Monitor' folder, and an error dialog box
appears containing the following text:
SQL0713N The replacement value for
|
by: Sean C. |
last post by:
Helpful folks,
I have recently migrated our test server, which runs Win NT 4, from
V7.2 FP11 to V8.1.3. Just about everything works wondefully, except I
am having major problems getting the previously defined federated
servers/nicknames to work. But I will start a different thread about
that problem. I thought I'd ask about the less critical problem first.
It deals with the Control Center and the following error:
SQL0713N The...
|
by: Franco Lombardo |
last post by:
Hi all,
I'm running DB2 8.1.5 on Windows 2000 professional SP4.
When I try to start Control Center, I see the splash
screen for a while, then it closes and nothing else happens.
It happens with "Activity center" (Since I'm running the
italian version, I don't know the
english name of this tool, I mean db2tc.bat).
| |
by: serge |
last post by:
Where can I find this when I install v8.2?
Thank you
|
by: Andy K |
last post by:
Hi again ,
I've been trying to connect to a distant database with
my control center on WinXp .
I'm using a personnal edition DB2 v8.1.9.700 for the control center on
WinXp.
I've setup a node (a distant connection ) in order to reach this
distant database but it doesn't seem to work ... The distant database
|
by: nstefi |
last post by:
Hi,
I have a DB2 client installed on my laptop which is connected to a DB2 server version 7.1
When I open the Control Center, everything runs smoothly for a while, but after a few commands in Command Center, or after checking some tables choosing "Sample Contents" or any other commands in Control Center or Command Center, my computer starts to be very busy even when I am not doing anything and the Control Center and Command Center windows...
|
by: Yoav |
last post by:
Hello,
I have been trying to enter SQL statmenbts to DB2 control center command line.
I saw that user "Thames" wrote to you:
> I have to repost my question for help.
>
> Yesterday I set up two DB UDB ESE V8.2 server on linux and windows
> platform, respectively. Both servers have been connected without any
> problems
> However, It gave me such error when I tried to make db connection via
> command prompt(windows)
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |