473,513 Members | 2,559 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

describe table ignores alias ?

Environment UDB 8.1 Fixpak 9 on Solaris (64bit instance).

After connecting to the database as "my_user".

There is an alias from my_user.mytable to XXX.mytable.
There is no real table my_user.mytable, only an alias.

"select count(*) from mytable" gives correct result for unqualified
table name.

"describe table my_table" gives SQLCODE 100.

But "describe table XXX.my_table" gives correct result.

Also: if I first issue "SET SCHEMA XXX" before
performing the unqualified DESCRIBE TABLE, then it works OK.

So "describe table" does not work for aliases, I'm just wondering why
that might be - seems a bit restrictive.

Nov 12 '05 #1
2 2350
In DESCRIBE section in "DB2 UDB Command Reference", followings were
described:
TABLE table-name
Specifies the table or view to be described. The fully qualified name
in the form schema.table-name must be used. An alias for the table
cannot be used in place of the actual table. The schema is the user
name under which the table or view was created.

Nov 12 '05 #2
Tonkuma wrote:
In DESCRIBE section in "DB2 UDB Command Reference", followings were
described:
TABLE table-name
Specifies the table or view to be described. The fully qualified name
in the form schema.table-name must be used. An alias for the table
cannot be used in place of the actual table. The schema is the user
name under which the table or view was created.

I can resist a good opportunity to peddle FP9:
http://publib.boulder.ibm.com/infoce...n/r0012547.htm

CALL SYSPROC.ADMIN_CMD('describe select * from org')

9 Result set 1
9 --------------
9
9 SQLTYPE SQLLENGTH SQLSCALE SQLNAME_DATA SQLNAME_LENGTH
9 ...--------...--------- -------- ------------...--------------...
9 SMALLINT 2 0 DEPTNUMB 8
9 VARCHAR 14 0 DEPTNAME 8
9 SMALLINT 2 0 MANAGER 7
9 VARCHAR 10 0 DIVISION 8
9 VARCHAR 13 0 LOCATION 8
9
9 5 record(s) selected.
9
9 Return Status = 0

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #3

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

Similar topics

1
2062
by: tabonni | last post by:
Hi All I connected MS Exchange Server to MS Access database using Access link table function. I can open the database table and see the fields and data inside the link table. However, the table...
0
10168
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
14
47855
by: John | last post by:
Hi all, I am doing the change from having worked in Oracle for a long time to MS SQL server and am frustrated with a couple of simple SQL stmt's. Or at least they have always been easy. The...
8
3167
by: Perre Van Wilrijk | last post by:
Hello, I have 2 ways of updating data I'm using often 1) via a cursor on TABLE1 update fields in TABLE2 2) via an some of variables ... SELECT @var1=FLD1, @var2=FLD2 FROM TABLE1 WHERE...
1
4094
by: Girish | last post by:
I have a set of tables partitioned horizontally. DML below. I have also created a view that will allow me to display information stored in all partitioned tables. Im trying to create an INSERT...
1
1799
by: BARTKO, Zoltan | last post by:
Ladies and Gentlemen, Please, enlighten me, if you can, in the following matter: I made a type: create type my_type as ( a integer, b integer );
0
1311
by: atulmanvar | last post by:
I am using CR Viewer in ASP.net Where i created alias table. For Example Table 2 is alis of Table 1 Master Table: relates Table 1:Field 1 Master Table: relate Table 2:Field 1 While...
3
6311
by: Rodríguez Rodríguez, Pere | last post by:
Hello, I think I have found a query problem when the query has an alias for a table and use alias item and table name. I ilustrate the problem with a simple table and query. prr=# create...
4
12350
by: Paul | last post by:
Hi, I am trying to start a process hidden. My code: wordprocess = new System.Diagnostics.Process(); ; wordprocess.StartInfo = new System.Diagnostics.ProcessStartInfo(wcmd, args);...
0
7160
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...
1
7099
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
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
5685
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,...
1
5086
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4746
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
3233
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
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
799
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.