473,808 Members | 2,855 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Using DECODE function......

53 New Member
Hello everyone
Please help me for the following query

I want to solve the query Using the (DECODE) function, I want to write a program segment that will successfully decode all the CIS courses pertaining to Databases into a description.
For example,
(1)CIS 143 to be decoded to Introduction to SQL.,
(2)CIS 090 to be decoded to Introduction to VISUAL BASIC.,
(3)CIS 145 to be decoded to Introduction to ORACLE.,
(4)CIS 147 to be decoded to Introduction to JAVA,
(5)CIS 148 to be decoded to Introduction to ASP.NET.
(6)CIS 200 to be decoded to Introduction to VB.NET.
(7)...... ..... ...... ........ ........
(8)...... ..... ...... ........ ........
...... ..... ...... ........ ........
(18)...... ..... ...... ........ ........

I dont understand how can I solve the query using DECODE function. should I create database table ? if so then which field I have to create. Please help me or give me some idea about this.

Thank you
Deven Oza
Dec 10 '06 #1
1 2806
Mondo Tofu
12 New Member
The DECODE statement is equivalent to a number of IF THEN ELSEs or CASE statements.

Using a DECODE statement to solve the problem means that anytime that there's a change in a course title or description, you're going to be back to the task of mending the program logic.

What would be more resillient is to have your program basically act the same even though the data is changing, so creating a dataase table to assert this relationship is the way to go.

Mondo Tofu
Dec 10 '06 #2

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

Similar topics

7
4651
by: Valiz | last post by:
Hi, I am updating system time with IRIG time source which sends irregular pulses as shown below 11000011111100111111111111111111....(1-IRIG present and 0-IRIG not present) I need to update system time when I find a steady pulse or a series of 1's say for a span of 10-15 seconds. Is there a way to implement this in VB6? Thanks in advance. Valiz.
2
14614
by: Mark Hoffman | last post by:
I'm a newbie at Oracle..Be gentle! I have a table that stores information (WMI data) about computers on our network. The table looks like: ComputerID ItemID Class Property Value
10
111284
by: N | last post by:
What is the function in SQL that works like DECODE in Oracle?" Thanks, N
4
4928
by: Newbie | last post by:
How would I modify this form to encode *all* the characters in the 'source' textarea to the '%xx' format & place result code into the 'output' textarea? (cross browser compatable) Any help is appreciated. Regards.
0
3946
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen. It is almost like it is trying to implement it's own COM interfaces... below is the header, and a link to the dll+code: Zip file with header, example, and DLL:...
6
17210
by: ransoma22 | last post by:
I developing an application that receive SMS from a connected GSM handphone, e.g Siemens M55, Nokia 6230,etc through the data cable. The application(VB.NET) will receive the SMS automatically, process and output to the screen in my application when a message arrived. But the problem is how do I read the SMS message immediately when it arrived without my handphone BeEPINg for new message ? I read up the AT commands, but when getting down...
1
35844
by: MP | last post by:
I have the following command. SELECT A.STORE_NAME, A.STORE_NUM, A.ZIP_CODE, B.EMPLOYEE_ID, B.GENDER, B.EMP_LEVEL, C.ITEM_CODE, DECODE(B.ITEM_CODE,1, 'CHICK_BURGERS') ITEM_DESCR, DECODE(B.ITEM_CODE,2, 'HAM_BURGERS') ITEM_DESCR, DECODE(B.ITEM_CODE,3, 'PIZZAS') ITEM_DESCR FROM STORE_DETAIL A, EMP_DETAIL B,
16
7291
by: Medhatithi | last post by:
Hi, I am facing a strange problem with decode function in oracle. My table name is status_hist. Below is the query I am hitting on this table: select max(decode(voided_flag,'Y',null,decode(status_hist.status,'WD',status_date))) from status_hist where sk_seq=6574 The result returned is '29-SEP-05' However, I checked out the table status_hist to see that for sk_seq=6574 and voided_flag not equals to 'Y' and status='WD', the maximum...
1
1620
by: Sonalisa48 | last post by:
Syntax for using a decode function to check a string size. sample query: (select text from Noteline where EnteringofHeading = 'BillingAddress1' and notenumber= (select note from OrderHeader where OrderNumber = '1426275')) I need to check for the length of text <15 using the decode function
0
9721
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10374
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9195
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5547
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4331
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
2
3859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.