473,669 Members | 2,514 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

i am not getting correct return values :cp_4,plz help me

93 New Member
Expand|Select|Wrap|Line Numbers
  1. function CF_3Formula return Number is
  2. begin
  3.   IF :DLY_TYPE='BEFORETIME'  THEN
  4.       SELECT COUNT(:DLY_TYPE)INTO :CP_1 FROM TEMP_CNS_999           
  5.       WHERE :DLY_TYPE='BEFORETIME';
  6.       RETURN :CP_1;
  7.   ELSIF :DLY_TYPE='DELAY' THEN
  8.      SELECT COUNT(:DLY_TYPE)INTO :CP_2 FROM TEMP_CNS_999  
  9.      WHERE :DLY_TYPE='DELAY';
  10.      RETURN :CP_2;
  11.   ELSIF :DLY_TYPE='ONTIME' THEN
  12.      SELECT COUNT(:DLY_TYPE)INTO :CP_3 FROM TEMP_CNS_999 
  13.      WHERE :DLY_TYPE='ONTIME'; 
  14.      RETURN :CP_3;
  15.   ELSE
  16.       SELECT COUNT(:DLY_TYPE)INTO :CP_1 FROM TEMP_CNS_999 
  17.       WHERE :DLY_TYPE='BEFORETIME';
  18.                     --RETURN :CP_1;
  19.       SELECT COUNT(:DLY_TYPE)INTO :CP_2 FROM TEMP_CNS_999 
  20.       WHERE :DLY_TYPE='DELAY';
  21.                       --RETURN :CP_2;
  22.       SELECT COUNT(:DLY_TYPE)INTO :CP_3 FROM TEMP_CNS_999  
  23.       WHERE :DLY_TYPE='ONTIME'; 
  24.                      --RETURN :CP_3;
  25.       :CP_4 := :CP_1 || :CP_2 || :CP_3;
  26.         RETURN :CP_4;     
  27.   END IF;
  28.  
  29. end;
Jan 28 '08 #1
12 1849
debasisdas
8,127 Recognized Expert Expert
From your code i am not sure what are you doing , and what are you passing to the function. Are you passing a field name ?
Jan 28 '08 #2
amitpatel66
2,367 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. function CF_3Formula return Number is
  2. begin
  3.   IF :DLY_TYPE='BEFORETIME'  THEN
  4.       SELECT COUNT(:DLY_TYPE)INTO :CP_1 FROM TEMP_CNS_999           
  5.       WHERE :DLY_TYPE='BEFORETIME';
  6.       RETURN :CP_1;
  7.   ELSIF :DLY_TYPE='DELAY' THEN
  8.      SELECT COUNT(:DLY_TYPE)INTO :CP_2 FROM TEMP_CNS_999  
  9.      WHERE :DLY_TYPE='DELAY';
  10.      RETURN :CP_2;
  11.   ELSIF :DLY_TYPE='ONTIME' THEN
  12.      SELECT COUNT(:DLY_TYPE)INTO :CP_3 FROM TEMP_CNS_999 
  13.      WHERE :DLY_TYPE='ONTIME'; 
  14.      RETURN :CP_3;
  15.   ELSE
  16.       SELECT COUNT(:DLY_TYPE)INTO :CP_1 FROM TEMP_CNS_999 
  17.       WHERE :DLY_TYPE='BEFORETIME';
  18.                     --RETURN :CP_1;
  19.       SELECT COUNT(:DLY_TYPE)INTO :CP_2 FROM TEMP_CNS_999 
  20.       WHERE :DLY_TYPE='DELAY';
  21.                       --RETURN :CP_2;
  22.       SELECT COUNT(:DLY_TYPE)INTO :CP_3 FROM TEMP_CNS_999  
  23.       WHERE :DLY_TYPE='ONTIME'; 
  24.                      --RETURN :CP_3;
  25.       :CP_4 := :CP_1 || :CP_2 || :CP_3;
  26.         RETURN :CP_4;     
  27.   END IF;
  28.  
  29. end;
Check for the values assigned to cp_1,cp_2 and cp_3 are they correct?
Use SRW.MESSAGE for printing the values of CP_1,2,3 as an alert during run time of the report and post back if the values of cp_1,2,3 ARE correct??
Jan 28 '08 #3
subashsavji
93 New Member
From your code i am not sure what are you doing , and what are you passing to the function. Are you passing a field name ?
:CP_1,2,3,4 IS PLACE HOLDER COULMN WHICH GETTING THE VALUES
OF DATA BASE COLUMN DLY_TYPE, CATAGORIES WISE. I WANT TO MERGE CP_1,2,3 INTO CP_4
Jan 29 '08 #4
subashsavji
93 New Member
Check for the values assigned to cp_1,cp_2 and cp_3 are they correct?
Use SRW.MESSAGE for printing the values of CP_1,2,3 as an alert during run time of the report and post back if the values of cp_1,2,3 ARE correct??
VALUES ARE GOING CORRECTLY INTO CP_1,2,3 BUT NOT IN CP_4.
I WILL TRY SRW.MESSAGE
Jan 29 '08 #5
debasisdas
8,127 Recognized Expert Expert
VALUES ARE GOING CORRECTLY INTO CP_1,2,3 BUT NOT IN CP_4.
I WILL TRY SRW.MESSAGE
is CP_4 a number or string ?
Jan 29 '08 #6
subashsavji
93 New Member
:cp_4 is number......... ............... .
Feb 1 '08 #7
debasisdas
8,127 Recognized Expert Expert
:cp_4 is number......... ............... .
then how can you use string concadination to store value in a number variable .
Feb 1 '08 #8
amitpatel66
2,367 Recognized Expert Top Contributor
:cp_4 is number......... ............... .
Could you please provide some sample data that is getting assigned to CP_1,CP_2 and CP_3 and what exactly CP_4 is returning for those values?
Feb 1 '08 #9
subashsavji
93 New Member
i am using count( ) function. and counted values are going to :cp_4 and
:cp_1,2,3 all are number data type
Feb 2 '08 #10

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

Similar topics

2
11305
by: Bhavin G | last post by:
Hi there , I am pretty new at javascripting and i am having this huge problem. I am using asp.net and C# webapplication. In my asp.net aspx file I have a place holder for taking an html table dynamically. I create a html table Time | Data1 | Data2 | Data3 type, in which the columns are not fixed, hence i am building it dynamically in c# code. now after i have the html table in the webpage, I want to give user to
1
3387
by: WIWA | last post by:
Hello, I have written a program that gets information from Active Directory. This is the function I'm using: void ADSysGetUserName(IADsADSystemInfo * pSys, char * data) { HRESULT hr; BSTR bstr; hr = pSys->get_UserName(&bstr); if (SUCCEEDED(hr)) {
1
24630
by: Martin | last post by:
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6. I have tried several ways of getting these values when the iframe is written into the html. The following return the correct values in IE6, where the iframe's id is 'f': f.document.body.scrollHeight f.document.body.scrollTop window.frames.document.body.scrollHeight
6
3314
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a parameter query which is the recordsource for the report. The parameter is <=. The query returns the correct amounts upto the date entered (no need for "between" dates here). There are 8 textboxes with dcounts; 2 other boxes Sum some of these
36
3194
by: Chuck Faranda | last post by:
I'm trying to debug my first C program (firmware for PIC MCU). The problem is getting serial data back from my device. My get commands have to be sent twice for the PIC to respond properly with the needed data. Any ideas? Here's the code in question, see any reason why a command would not trigger the 'kbhit' the first time a serial command is sent?: Thanks! Chuck **************************************************** while(1) //...
2
11089
by: rohitchawla | last post by:
have a problem with this code when working in IE it gives me 0,0 coords when i use iframe tag but gives correct coords when using firefox function GetRealOffset(id) { var elem = document.getElementById(id); var leftOffset = elem.offsetLeft; var topOffset = elem.offsetTop; var parent = elem.offsetParent;
6
1703
by: chris.kemmerer | last post by:
I am having a problem with templates and I hope someone here can help. I am writing a library that accepts data packets, parses them and saves the information for later use. One member of the packet is an enumeration that says what type of data the packet contains (int, char, etc.). I have created classes similar to below. The problem I am having is in trying to access the derived class given only a pointer to the base class. I know that...
5
1594
by: dgleeson3 | last post by:
Hello all I have used the LoginForm1 class in a Visual studio 2005 VB application. Its the standard Username, Pasword request for user input. I was hoping to use property procedures to get back the user input in the two boxes but its not working out.
9
1746
by: KDawg44 | last post by:
Hi, I have PHP function that adds a record to the database. The table has an ID that is AUTO_INCREMENT. Is there anyway to get that ID back when I do any kind of insert? That ID is a foreign key that I need to do an insert on afterwards. Thanks. Kevin
0
8466
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...
0
8384
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8896
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8810
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8659
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5683
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4208
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...
2
2035
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1790
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.