473,387 Members | 1,724 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,387 software developers and data experts.

DB2 SQL Extracting and reusing labels from existing fields

Hi,

I'm formatting fields when creating my view and would like to reuse
the existing labels.
e.g.
Create View TEST AS SELECT
AMOUNT,
CURRENCY,
DIGITS(CUSTNO) AS PADCUSTNO,
DATE(DAYNO) AS FDAYNO
FROM
DB2TRANSACTIONS

When the view is queried, only the AMOUNT and CCY fields contains the
description and column heading specified in the DB2 table.
Is there any way of extracing the description from the formatted
fields?

I.e. When I generate the SQL from the view created above, it reveals
the following:
CREATE VIEW TEST (
AMOUNT,
CCY,
PADCUSTNO,
FDAYNO)
AS SELECT AMOUNT, CURRENCY, DIGITS(CUSTNO) AS PADCUSTNO,
DATE(DAYNO) AS FDAYNO FROM DB2TRANSACTIONS;

LABEL ON TABLE TEST IS 'Test formatted view';

LABEL ON COLUMN TEST
(AMOUNT IS 'Amount',
CCY IS 'Currency');

LABEL ON COLUMN TEST
(AMOUNT TEXT IS 'Amount',
CCY TEXT IS 'Currency');

Does anyone know how I may assign labels to the customer number
(PADCUSTNO) and date fields (FDAYNO) taken from the original fields
(CUSTNO and DAYNO)?
I have many fields and this could potentially save me weeks of work if
I don't have to hard code the description into the view but let it
pick it up from the table!

Thanks in advance,
Dave
Nov 12 '05 #1
0 2441

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

Similar topics

8
by: bmgx | last post by:
I would like to use an already existing online service (currency converter) basically consisting of a html form with a few options that is submitted and returns the results. I really don't know...
6
by: DebbieG | last post by:
I am creating a database for a small department in a university. Each student in their database can have 2 mailing addresses. They wanted mailing labels pulling just the 1st address. No problem....
3
by: Grim Reaper | last post by:
I know this is probably an easy question, but I could not find/figure it out. Basically, I am printing mailing labels with a "Sorting/Grouping" section that groups the label types together....
2
by: Dirtyweeker | last post by:
Hi, I have a database which records fitness test results of pupils. There are the usual name fields and then a series of fields holding results, e.g. field BP1 and field BP2; each of these...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
24
by: Mike Otten | last post by:
Any help greatly appreciated. The validated page is at: http://myweb.stedwards.edu/michaelo/ddtab.htm The trouble is with the radio buttons (2/3-down the left column). The radios are...
3
by: garyusenet | last post by:
Dear Professionals, I have recently been using the wonderful krypton toolkit and am trying to use them in my small hobby application. I include this bit of info as an aside really because i'm...
4
by: apatel85 | last post by:
Hey Guys, Total Number of Records (Based on 5 fields): 1000 Total Unique Records (Based on 5 Fields): 990 Total number of fields: 5 I have question regarding extracting duplicates from the...
7
by: artemetis | last post by:
Ok, I'm back again. I've got the following table. TableName = tblOriginal uid - self explanatory firstName - self explanatory lastName - self explanatory groupMaster - contains a numeric...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...

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.