473,569 Members | 2,916 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can i modify the following query in DB2

1 New Member
How can i modify the following query in DB2

(CAST(SUBS_REFI LL_COUPONNO_CHA NNELID AS INTEGER) (FORMAT '9(16)') (CHAR(16)) )

where SUBS_REFILL_COU PONNO_CHANNELID is the column name of my table that contains 12,14 & 16 digit number. but i want all the numbers in 16 digit by adding the as many zero in the front, when i am using select query.

e.g. 678978654543 should be displayed as 000067897865454 3
67897865454312 should be displayed as 006789786545431 2

pls help
Nov 7 '08 #1
1 2010
r035198x
13,262 MVP
You can simulate a left pad by concatenating the value with a REPEAT of the value you are padding with.
Nov 11 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1492
by: anzenews | last post by:
Hello! I have a weird problem... The application I use issues this SQL from time to time: alter table t modify id int(6) unique not null auto_increment; The problem is that this SQL adds a key on id every time it is run! mysql> show keys;
1
7125
by: Glenn | last post by:
Searching through google groups, I have not found anyone able to modify the query string of a request. I was hoping to make the query string as short as possible so that a search with many criteria could be bookmarked. I had planned to have the query string be key=value for each criteria But with dropdowns, the default choice is always...
3
3098
by: KevLow | last post by:
Hi, Hope some kind soul can help me out here.. I'm trying to programmatically modify the column headings of a crosstab query such that it can be dynamic based on user specified period (Month Year to Month Year) So far i have tried to use the following code: //
3
1137
by: Michael D. | last post by:
Hello all! I'm trying to design and write a little application for someone in my office, but I'm having some trouble. I have the following database structure (Note: just some sample data, obviously): SystemNumber SystemNumberMAX SystemName SystemKey 9007404 Windows Test 1 A 9007405 ...
2
1239
by: Zaphod Beeblebrox | last post by:
Hi There; This is a silly question but I have to ask this. I want to create a query (SQL statement would be good!) that will do the following: 1. modify the data in the field of my choice; 2. but keeps the present data intact.
1
1254
by: alps | last post by:
Hello friends , I am basically a delphi developer and am new to the VB.net technology.Can anyone out there give me a typical VB.net solution for a dataentry program for a table.Lets say there are 2 tables books and author and say I want to make an application that will allow to
4
3117
by: Bob | last post by:
Hi all, I'm trying to import data, modify the data then insert it into a new table. The code below works fine for it but it takes a really long time for 15,000 odd records. Is there a way I can speed up the processing substantially? as it currently takes about 10 minutes and thats just way too long because there is many of these imports...
3
1588
by: TechnoAtif | last post by:
Hi All. I have got problem with the header. If i run my php script in the local host it runs perfectly but if i do the same on net after loading it via ftp. it gives following error: The code goes like this: <html> <title>CMS:Search Product</title> <body>
0
2107
by: JRough | last post by:
I have the following code at the end of a page that lists some query results. It starts in a form that asks the user for input, one of two template pages. One template is a form for user input if there is input otherwise it changes the template and lists the results on the other template page. That is why there is a $template variable. ====...
0
7605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7917
Oralloy
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. ...
1
7665
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7962
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 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...
0
6277
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5217
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...
0
3651
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...
1
2105
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
1
1207
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.