View previous topic :: View next topic |
Author |
Message |
ranga_subham Intermediate
Joined: 31 Jan 2006 Posts: 255 Topics: 72
|
Posted: Wed Dec 10, 2008 5:37 am Post subject: Selecting all columns of a table while using Alias |
|
|
Hi,
I want to select all rows from a table 'B' used in below query.
Code: |
SELECT B.TRE_CUST_NBR,
B.OPTO_BARCDE_1,
B.OPTO_BARCDE_2,
B.OPTO_BARCDE_3
FROM DB01.TRE_CUST A,
DB01.TRE_CUST_OPTO B
WHERE A.TRE_CUST_CD = '2500'
AND B.TRE_CUST_NBR = A.TRE_CUST_NBR
WITH UR;
|
There are 10 columns in DB01.TRE_CUST_OPTO table. Is mentioning all of them the only way or any shortcut possible?
Please help.
Thanks. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard |
|
Back to top |
|
|
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Wed Dec 10, 2008 8:13 am Post subject: |
|
|
You could use
but that is BAD. As you only have 10 columns it is a minor thing to specify them all - just cut and paste from somewhere e.g DCLGEN _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
|
ranga_subham Intermediate
Joined: 31 Jan 2006 Posts: 255 Topics: 72
|
Posted: Thu Dec 11, 2008 5:32 am Post subject: |
|
|
Thanks Nic Clouston. _________________ Ranga
*****
None of us is as smart as all of us - Ken Blanchard |
|
Back to top |
|
|
|
|