Multiplies two values of two different columns and display in cold fusion!
Hi allI have a table book_sale
Topic | quantity | rate
===================
Science | 5. $25.00
Mathematics | 7. $70.00
Reading | 20. $2.30
==========================================================
I tried to code
< cfquery name = "get_saleamount" datasource = "Book" >
Select the object, the quantities, rates
of book_sale
< / cfquery >
< table >
< b >
< /Th > < th > topic
< /Th > < th > quantity
< /Th > < th > rates
Proceeds from the sale of < /th > < th >
< /tr >
< cfloop query = "get_saleamount."
< b >
< td > #Subject # < table >
< td > #Quantity # < table >
< td > #Rate # < table >
< td > #Quantity # * #Rate # < table >
< /tr >
< / cfloop >
< /table >
The multiplication operation did not work code above. I want to calculate sale_amount = quantity * note and display the results in a table. Please give me some advice how to multiply two values from database and display them in a table above. Thanks in advance.
If you want to exit, then simply change your
#Quantity # * #Rate #.
TO
#Quantity * rate #.
but you can do it at the level of the database, if you have db (most do so):
Select the object, the quantities, rates, (amount * rate) AS ttl_cost
of book_sale
...
Azadi Saryev
SABAI - Dee.com
http://www.SABAI-Dee.com/
Tags: ColdFusion
Similar Questions
-
How to get the value of EV - the diiference between two different columns
Hello
I get the difference between the two different columns of two different... as tables (emp.sal - dept.comm)... all I want is I need only the records that a negative gap how get this? Please help me
Thanks in advanceIf I understand your question right:
select case when emp.sal-dept.comm>=0 then YOUR_VALUE else emp.sal-dept.comm end difference_value from emp,dept...
or do you want to:
select ... from emp,dept... where emp.sal-dept.comm<0
?
Kind regards
Sayan M.Published by: xtender on 19.11.2010 22:29
-
I just upgraded to 14 items in a very old version.
Can someone help me get started with tips on how to combine in chronological order of the pictures taken on a vacation on two different cameras and a smart phone?
I never figure out how to do this easily on the old version.
margaretg13258847 wrote:
I just upgraded to 14 items in a very old version.
Can someone help me get started with tips on how to combine in chronological order of the pictures taken on a vacation on two different cameras and a smart phone?
I never figure out how to do this easily on the old version.
This is something I often do when I shall prepare a draft of an event with photos taken by different people.
It cannot be done 'automatically' to get a good shot for all cameras.
You can use the shortcut Ctrl J (Menu Edit > adjust date and time...)
But before that, take the time to:
-Choose the camera you think is the best time and enough shots to compare with the other cameras
-assign a keyword to be able to quickly select all of the pictures from each camera
-l' sort order of display the value "oldest first"
When you're ready, find a picture made to at about the same time with the camera of reference and the other.
Make a note of the date and time for the camera to 'reference' and the other.
Calculate the difference. It may be easier to first treat only the dates, then make another correction for the moment.
For example, you find that there is a difference of two days too late of the camera by report.
You select the files by the camera from this session. They are in chronological order.
Look at the date of the oldest shooting. Calculate the new correct date (you add two days)
Shortcut Ctrl J.
You select the third option (new start date) and the new start date. Validate.
That's all. All dates of the camera by report have been corrected.
You can start at the correct time (you can even correct hours first, then a third round for minutes).
Same process for all devices.
-
If you have CC installed on two different computers and you forget to sign out how do you use CC on the second computer?
Please see this link for more information on the installation of creative cloud on multiple computers:
-
have two different computers and have problems recoving from hybernation. Locking the system
Original title: recovery of hybernation
I have two different computers MS 7 and have all two issues recoving from hybernation. They lock just straight up (do not accept an entry mouse or keyboard) and requir3e hard re boot. Goes 8 to 10 times a week.
Hello
(1) did you of recent changes to the computer before the show?
(2) is the specific question at the opening of specific applications or programs?
(3) you get an error message?
You can perform the following methods and check if it helps.
Method 1: Windows 7 hangs or freezes
http://support.Microsoft.com/kb/2681286
2 the resolution of the problems of method Performance
Run the troubleshooter of performance, then check if it helps.
Check out the link: http://windows.microsoft.com/en-US/windows7/Open-the-Performance-troubleshooter
Method3:How to troubleshoot performance problems with sleep, hibernation and resume:
http://support.Microsoft.com/kb/950686
Note: The article remains valid for Windows 7 also if it is for Vista.
For more information, connect to:
http://Windows.Microsoft.com/en-us/Windows7/sleep-and-hibernation-frequently-asked-questions
Method 4: update video drivers card
Check if the video card drivers are up to date. Install the latest video card drivers for Windows 7 on the manufacturer's Web site.
Tips for solving common driver problems:
http://Windows.Microsoft.com/en-us/Windows7/tips-for-fixing-common-driver-problems
It will be useful.
-
Choose two separate columns and others do not separate
Hello
I want two columns separate (X, Y) with other columns (GID, CODE, TID). Please help me on how to do it.
In the example below, the first and last have the same X and Y and distinct should be applied to this two columns, and then select the other columns (GID, CODE, TID) as well in the query.
GID CODE TID X THERE 730 MKPR 1 2.356536 48.72052 730 MKPR 2 2.355627 48.72069 730 MKPR 3 2.355628 48.72264 730 MKPR 4 2.355773 48.72239 730 MKPR 5 2.355816 48.72229 730 MKPR 6 2.355832 48.72225 730 MKPR 7 2.355939 48.72201 730 MKPR 8 2.356039 48.72177 730 MKPR 9 2.356088 48.72165 730 MKPR 10 2.356147 48.72151 730 MKPR 11 2.35619 48.7214 730 MKPR 12 2.35626 48.72123 730 MKPR 13 2.35632 48.72111 730 MKPR 14 2.356385 48.72099 730 MKPR 15 2.356536 48.72052 Yes, you can change the data in the example and try.
Concerning
Mr. Mahir Quluzade
p.s. If the answer to your question, then please mark your thread receives a response to the forum clear.
-
Insert data. Select the sequence ID, but popuate even value for two different columns
Hello
Version Oracle 11 G
[code]
CREATE TABLE MT_PROGRAM
(
NUMBER OF "PROGRAM_ID."
NUMBER OF "REPORTING_PROGRAM_ID."
'PROGRAM_NAME' VARCHAR2 (128 BYTE)
);
INSERT INTO MT_PROGRAM)
PROGRAM_ID,
REPORTING_PROGRAM_ID,
PROGRAM NAME)
SELECT PROGRAM_ID,
PROGRAM_ID,
PROGRAM NAME
Of
(SELECT
fn_get_new_prog_id() AS PROGRAM_ID,
'Test' as the program name OF THE DOUBLE);
The function has
create or replace
FUNCTION "FN_GET_NEW_PROG_ID".
RETURN NUMBER
AS
BEGIN
RETURN SQ_PROG_ID. NEXTVAL;
END;
[/ code]
Problem is that I must get
I need Reporting same Program ID ID program and the same sequence. But here I am ecstasy. For example, if my sequence is from 1 then it inserts
1, 2, 'test '.
But I need
1, 1, 'test '.
P.S. I can't not 1 insert unwanted accounting value of the program and of the update the program id. I have a trigger on the table which keeps track of each insert, update. And I don't want to use the separate update statement because it will create additional row in the history table.
SQL > create the sequence Tessai minvalue maxvalue 1 99999999999999999 with increment of 1 by 1 cover 2;
Order of creation
SQL > select ttest.currval from double;
Select double ttest.currval
ORA-08002: sequence TESSAI. CURRVAL is not yet defined in this session
SQL > select ttest.nextval from double;
NEXTVAL
----------
1
SQL > select ttest.currval from double;
CURRVAL
----------
1
SQL > select ttest.nextval from double;
NEXTVAL
----------
2
SQL > select ttest.currval from double;
CURRVAL
----------
2
SQL >
I have it?
----
Ramin Hashimzade
-
Hello everyone
I fight with this regexp_substr and I wonder if there is a way to deal with it. I have two string type in a column with the following structure:
structure 1 always starts with "app.catalog.school.", as the following three examples
app.catalog.school.DB.BT
app.catalog.school.B.FTA
app.catalog.school.ACA.CD
structure 2 always begins with "app.catalog.admin.", as the following three examples
app.catalog.admin.C.ABC
app.catalog.admin.BT.AP
app.catalog.admin.MI.RT
If the value of the field begins with "app.catalog.school." it should return everything after the last period (.) as follows
BT
FREE TRADE AGREEMENT
CD
If the value of the field begins with "app.catalog.admin." it should return the string between the third and fourth period (.) as follows
C
BT
MI
I actually have a solution to this:
decode)
regexp_substr (myfield, ' [^.] +' 1, 3), 'school', regexp_substr (myfield, ' [^.] +' 1, 5), "admin", regexp_substr (myfield, ' [^.] +' 1, 4)
)
I am not happy with the solution above using decode(). I think I should be able to solve this problem purely with reg_exp but after hours to try again without success. You have better solution/suggestion?
I use Oracle version 10.2. Thank you very much.
Oops: Oracle version 10.2, here to use regexp_replace
WITH testdata UNTIL
(SELECT 'app.catalog.school.DB.BT' FROM DUAL strUNION ALL
SELECT 'app.catalog.admin.C.ABC' FROM DUAL
)Select
Str
, regexp_replace (str, ' ^. * (admin | school\.)) [ ^.] +)\. ([^.] +). (* $', "\2") res
of testdataRES STR
"app.catalog.school.DB.BT" 'BT '.
'app.catalog.admin.C.ABC' 'C '.
to 11.x, we can use regexp_substr because he has this subexpression setting more pure accident.
WITH testdata UNTIL
(SELECT 'app.catalog.school.DB.BT' FROM DUAL strUNION ALL
SELECT 'app.catalog.admin.C.ABC' FROM DUAL
)Select
Str
, regexp_substr (str, ' (admin | school\.)) [ ^.] +)\. ([^.] +)', 1, 1, null, res) 2.
of testdataSTR RES app.catalog.school.DB.BT BT app.catalog.admin.C.ABC C Post edited by: extended chris227
-
Reports 2-navigate and pass values between 2 different columns
Hello
I have a question about navigate from 1 report to another while passing the value of column 1 to column 2 in the second report...
In OBIEE 11 G, I create link action report 1, column 1 and this action link is access BI content and the destination is report 2. Now, report 2 column 2, which is an alias for column 1 report 1, from the point of view of users, these are the same, but OBIEE point of view, they are different.
My action link is able to navigate to point out 2, however, the value in column 1 which I clicked on run navigation, not transmitted in column 2 in the report 2...
Is there a way around this problem?
Let me know if I need to elaborate
Thank youHello
1 > create a report with the column 1 and column 1 of the brand is requested in this report (this will be your interim report).
2 > in the second report of the condition implemented column2 filter is equal to (filter based on another through the analysis of the above-mentioned report and give the column).Please let me know if it solves your problem.
Thank you
Yacoub -
I currently have a string of the guitar signal electric-Rocksmith Real Tone cable - ASIO 4 all help IK Multimedia Amplitube 3. I would like to know if I could also watch DVD with her while the implementation of the programme of Amplitube with sound. It would be great that I use the DVD for guitar and play at the same time. I don't have the signal of two merged as one. In my mind, I should be able to disable the ASIO devices and use them with DirectX as usual. I could send the ampitube signal to the headphones and use external speakers for the guitar signal, and use the lessons of speakers for the DVD (or maybe YouTube) laptop on board.
Is this possible?
How can I do?
Toshiba Satellite X 205-S7483
Jeff
Yes. For example, I have my Skype phone calls go to my helmet (normal just plugged in the headset) while my media player plays my speakers. You can choose your default communication or multimedia devices with a right click on the volume control icon and choosing "playback devices".
Other programs can also be built to be "to the output current" and allow you to choose the output too.
-
Is it possible that two people work the same files with different PC edition?
No, this is not possible.
-
When I try to print to file in the print module, I have to repeat the task at least twice to make it work. Everyone knows about this problem? Do exactly the same thing on my new macbook pro and office. Tried updating to the latest version of Lightroom without success.
You are on El capitan? El capitan is sometimes extremely slow to show you when you have added a file to a folder. This is probably, but it is simply not yet show it to you. Close finder window and reopening could realize it's there. I also noticed that list of files on the command line will make these files appear suddenly in the finder.
-
How is the best way to do it. Everything is saved. Thank you
How you your PC as long as the provided factory recovery is a process created by the PC manufacturer, it is not a process of MS.
Usually a new PC would provide with recovery disks, or a hidden partition, you have access to the recovery disks. Yet once it is a process specific to your PC manufacturer.
See your PC makers on-line help/support for your model
-
Default value in always different columns in the comparison tool
Hi all
I generated a script of my model, in this script, I have a few columns with a default value,
After that I tried to compare with the import/datadictionary permutation model target my datamodeler with my database model,
but for all the columns that I've set the default, I found differences, when I check that the values are identical except for the space at the end of the value.
I checked the script and it's the row of the column:
LAST_MOD_TS DEFAULT SYSTIMESTAMP TIMESTAMP NOT NULL
AS you can see in the line is a double space between SYSTIMESTAMP and NOT NULL,.
This double space generates a default 'SYSTIMESTAMP' to the column value and the comparison tool is good then it's a difference,
but this difference is generated by the double space generated by the Publisher of the DOF.
I don't know if I can change something in my configuration of the tool to solve the problem,
Thanks in advanceHello
Thanks for reporting this problem. I connected a bug on this issue.
David
-
How to hide the two menus detach AND display of a component of panelCollection?
Hello
I was checking the internet for a solution, but I find myself using featuresOff, but
its only can hide 1 feature that these 2.
Anyone has a solution on this to hide the two objects?
Thanks in advance.
JDeveloper ADF 11.1.2.4.0
Hello
See the tag for the panelCollection doc. ADF RichClient API - < af:panelCollection >
You must use a list delimited by spaces of functions in the featureOff property.
For example, in your case, you will need to use something like
Arun-
Maybe you are looking for
-
Can I use my 5K iMac as a monitor for the Mac Pro?
I'm so curious because I really need speed for Final Cut, but for the Mac Pro, you must separately buy things (monitors, keyboards, mouse). For the iMac, it is included, but he really loves * that the Mac Pro has this old crush which is very pixelate
-
Satellite L50-B916 - recording external Microphone does not work
Hello Connect an external microphone to * Headphone\Microphone combo socket *, still records through portable microphone instead of externally. Registration of external Microphone does not work. What Miss me? Please notify. Model: L50-B916Screenshot:
-
Pavilion 15-n092sa: replacement of keyboard (urgent)
So after you spill a few drops of tea on my keyboard, it no longer works (for the most part). Individuals: -Some keys do not respond when you press -If the buttons respond, they tend to relate to different characters (the C key is now my space bar) -
-
Where to buy an additional USB charge cords 8 5901 wake model
It seems that USB charging cable is specialized for 8 5901 data flow model that I have... is this true or can I use any USB cable with the mini jack into the design? If I have to use a special cable, where on the website of HP can buy one? Thank you.
-
results of the analysis of poor
I have a Deskjet 2542 in a series, purchased on 02/04/14 when I scanned a letter before sending him an e-mail the results are unreadable I changed the settings accordingly still always bad results can help before I the take it back to the bridge to p