473,218 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

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 2325
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
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
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
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
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
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
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
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
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
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);...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....

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.