Flex with separate Web server and app server
I have a flex app built in Flex Builder. I put the BlazeDS server to point to an internal ip address. When I exported the build, I placed it on an IIS web server that has access to the network where the BlazeDS server is and is also visible externally. I put the file crossdomain.xml to the BlazeDS server to allow access for all (I know that's not sure, but I just want to eliminate this variable). I can make calls to remote objects when I run the flex from the internal network application. However, when you try to make calls to remote objects when you access the app outwardly I get an error that says:
faultCode = "Client.Error.MessageSend".
faultDetail = "error Channel.Security.Error Error #2048: security sandbox violation:
...
endpoint = " " http:// " < internal ip address >: < port > / blazeds/messagebroker/amf"
...
I implemented the services - config.xml so that all methods of the AMF are pointing to the internal ip address.
My crossdomain.xml file is host to BlazeDS (internal IP) in the folder WEB-INF\root. I also put on the Web server? I ran the fire bug and it seems to try to recover the crossdomain.xml file by using the ip address of the internal BlazeDS server which it cannot reach because it is not exposed to the world.
So in summary, I have Web server through the flex application, and then another machine separated with the BlazeDS application. The BlazeDS application is on an internal IP address and I can't seem to make the remote to her calls when you access the outside flex application.
Your BlazeDS application should be accessible to the outside (on the internet). Internal IP address would work on your network.
Tags: Flex
Similar Questions
-
error message "there is a communication problem with the web server."
I'm trying to connect to three rivers FCU website www.3riversfcu.org and I get the message error "there is a communication problem with the web server." I am running Windows 7 on Toshiba laptop. No idea how to solve this problem? Something in the settings?
Hi, Mayhem15,
See if this troubleshooting help. It was written for Windows XP, but in many cases, these documents still apply for more recent versions of Windows.
How to troubleshoot possible causes of Internet connection problems in Windows XP
-
How can I replace my app on iTunes Connect with a new version with air for iOS and app Loader?, how do I replace my app on iTunes Connect with a new version with AIR for iOS and the Application Loader? I got an error that the version number needs to be updated. I created a new record in iTunes Connect with version 1.1 and I took ownership of my current app 1.1 in air for iOS section in Flash.
Check your descriptor file to make sure that it shows the updated version, too.
-
Is it possible to apply a compression as gzip with the web server of labview?
I am currently implementing a web page will be provided by the NOR sbRIO 9636. I was able to get the html, css and js served very well. I'm curious to know if there is a way to implement gzip compression to help with page load times?
OK, a few points:
- I heard that he discussed that you can theoretically install a Web server on the Linux based cRIO. But there's a great big disadvantage: I've never done or spoken to someone who did it I don't know how it actually works.
- Given the cheap price of the hardware of today a safer alternative would be to include a separate computer, whose only function is to host the web interface. There are many small computers that would be ideal for this application - which many were initially designed for use in home theater applications.
The point of my post was that there are some limitations in the LV Web server you have to find your way around.
Mike...
-
PIX 501 problems with the web server internal.
I want to open for my internal Web server, so it can be accessed from outside and I read about it here and how to do it and I do what I think of his right, but I can´t operate.
Now I just tried to open the http port standard 80 but later I want to open a specific port and also use SSL on the web server for added security.
Then I would like my setup now get help and also how to do when using other ports and SSL later.
Thanks Thomas!
6.3 (1) version PIX
interface ethernet0 10baset
interface ethernet1 100full
ethernet0 nameif outside security0
nameif ethernet1 inside the security100
alfta hostname
domain ciscopix.com
names of
name 192.168.1.16 TerminalPC
name 192.168.3.0 Lager
permit 192.168.1.0 ip access list inside_nat0_outbound 255.255.255.0 192.168.2.0 255.255.255.0
permit 192.168.1.0 ip access list inside_nat0_outbound 255.255.255.0 255.255.255.0 Lager
permit 192.168.1.0 ip access list outside_cryptomap_20 255.255.255.0 192.168.2.0 255.255.255.0
permit 192.168.1.0 ip access list outside_cryptomap_40 255.255.255.0 255.255.255.0 Lager
outside_cryptomap_60 ip access list allow
192.168.1.0 255.255.255.0 192.168.2.0 255.255.255.0
outside_access_in tcp allowed access list all eq www
host 62.108.197.90 eq www
IP outdoor 62.108.197.90 255.255.255.192
IP address inside 192.168.1.254 255.255.255.0
alarm action IP verification of information
alarm action attack IP audit
location of PDM 62.108.197.10 255.255.255.255 outside
location of PDM 62.108.197.11 255.255.255.255 outside
location of PDM 192.168.1.0 255.255.255.255 inside
location of PDM TerminalPC 255.255.255.255 inside
location of PDM 192.168.2.0 255.255.255.0 outside
location of PDM Lager 255.255.255.0 outside
location of PDM 192.168.2.0 255.255.255.0 inside
location of PDM 62.108.197.137 255.255.255.255 outside
location of PDM 62.108.197.137 255.255.255.255 inside
location of PDM 195.67.210.72 255.255.255.255 outside
location of PDM 62.108.197.90 255.255.255.255 inside
PDM logging 100 information
Global 1 interface (outside)
NAT (inside) 0-list of access inside_nat0_outbound
NAT (inside) 1 0.0.0.0 0.0.0.0 0 0
static (inside, outside) tcp 62.108.197.90 www TerminalPC www netmask 255.255.255.255 0 0
Access-group outside_access_in in interface outside
Route outside 0.0.0.0 0.0.0.0 62.108.197.65 1
Enable http server
http 62.108.197.10 255.255.255.255 outside
http 62.108.197.11 255.255.255.255 outside
http 195.67.210.72 255.255.255.255 outside
http 192.168.1.0 255.255.255.0 inside
http 62.108.197.137 255.255.255.255 inside
enable floodguard
Permitted connection ipsec sysopt
Crypto ipsec transform-set ESP-DES-MD5 esp - esp-md5-hmac
Crypto ipsec transform-set esp strong - esp-sha-hmac
outside_map 20 ipsec-isakmp crypto map
card crypto outside_map 20 match address outside_cryptomap_20
peer set card crypto outside_map 20 195.198.46.88
outside_map card crypto 20 the transform-set ESP-DES-MD5 value
outside_map 40 ipsec-isakmp crypto map
card crypto outside_map 40 correspondence address outside_cryptomap_40
peer set card crypto outside_map 40 62.108.197.137
outside_map card crypto 40 the transform-set ESP-DES-MD5 value
outside_map 60 ipsec-isakmp crypto map
card crypto outside_map 60 match address outside_cryptomap_60
peer set card crypto outside_map 60 195.198.46.88
card crypto outside_map 60 the transform-set ESP-DES-MD5 value
outside_map interface card crypto outside
ISAKMP allows outside
ISAKMP key * address 62.108.197.137 netmask 255.255.255.255
ISAKMP key * address 195.198.46.88 netmask 255.255.255.255
part of pre authentication ISAKMP policy 10
encryption of ISAKMP policy 10
ISAKMP policy 10 sha hash
10 1 ISAKMP policy group
ISAKMP life duration strategy 10 86400
part of pre authentication ISAKMP policy 20
encryption of ISAKMP policy 20
ISAKMP policy 20 md5 hash
20 2 ISAKMP policy group
ISAKMP duration strategy of life 20 86400
Telnet 192.168.1.0 255.255.255.255 inside
Get out your ACL - access-list outside_access_in permit tcp any host 62.108.197.90 eq www
And a new application:
outside_access_in list access permit tcp any host 62.108.197.90 eq www
Access-group outside_access_in in interface outside
* You have the group-access above on your original configuration message, BUT not on the above post.
Don't forget to issue clear xlate after the change and also record with write mem.
Try to do this in the pix CLI instead of using PDM.
Hope this helps and let me know how you go.
Jay
-
My intention is to have the on-Board Unit (ATMEGA32) located in a remote place, somewhere over the internet (connected via Ethernet) connected (via CANBUS) for the fuel cell system for the measurement data (current and the temperature of the fuel cell).
The end user and/or client must be able to display these data acquired via the browser on the internet. The main objective of this project is to prevent any pc dedicated as a simple web server, so I would like to know your general solutions.
(I noticed that I can't impelent a web server on this microcontroller, but how do I set the GUI to display data on the browser for users?-I want to say I'm not accurate if the designed GUI (LabVIEW or c SHARP) must be in the internet (solution host & domain) or there are better solutions for her.)If you have a solution for the web server on the microcontroller and are convinced that architecture will work, it seems that your question is how to write a client for data.
Some of the things you're talking about sounds like you want the web server on the microcontroller to respond to a fully functional GUI to any client. This may not be practical because of the computing power limited on the microcontroller and the difficulty of setting up and maintaining this type of server in a microcontroller environment.
A more common architecture that I've seen is just to serve the raw data and let the client user to interpret the data and display them as graphics, etc., this means that the user must Access the microcontroller of a computer running a client that you make.
You can use the communication/protocols/http client in labview palette or you can write a c# client that it is really a question of what data you need to acquire, and what language you are most comfortable in.
-
The problem is on my desktop and my laptop. I got a little happy click on my desktop and click the Web Developer. I tried to remove an ad really annoying flash on the side of the screen. I think I entered in the source page and remove the node. I really don't know what happened, but stopped loading for ebay pictures and everything is a list written on the side of the page. I deleted the cache and cookies. I have reset mozilla. I uninstalled and reinstalled mozilla. Laptop is not immediately affected, but now having the same problem.
It is a very strange problem.
Any changes made with the web developer tool will save and should be cleared when the page is reloaded.Try disabling graphics hardware acceleration. As this feature has been added to Firefox, it has gradually improved, but there are still some problems.
You will have to perhaps restart Firefox for it to take effect, so save any work first (e.g. you compose mail, documents online that you are editing, etc.).
Then perform the following steps:
- Click on the orange top left Firefox button, then select the 'Options' button, or, if there is no Firefox button at the top, go to tools > Options.
- In the Firefox options window, click the Advanced tab, and then select 'General '.
- You will find in the list of parameters, the checkbox use hardware acceleration when available . Clear this check box.
- Now restart Firefox and see if the problems persist.
In addition, please check the updates for your graphics driver by following the steps in the following knowledge base articles:
This solve your problems? The report please come back shortly.
-
What SDK / API is more suitable to interact with a web server virtual machines?
Hi all!
I am a beginner with virtualization / VMWare and currently have an ESX Server I can get with vSphere. I am trying to perform a certain task and just noticed the different API and SDK Kits available for users of VMWare but do not know which is best for what I'm trying to do.
Here's what I want to do: for demoing purposes, I would like to automate the creation and management of virtual machines in such a way so that these tasks are linked to a web application. In other words, I want to run a simple web application (ideally with a PHP backend) which allows visitors to create accounts that correspond to the virtual machines. Connect to one account, I would like to start their corresponding VM and hand them a connection. And when they connect, I would like to disable this VM.
It seems to me that the vSphere Web Services SDK might be the most appropriate resource to manage that kind of thing. Is this fair?
And - I know that it is not relevant to virtualization, but bear with me if you know the answer - how do I get Java or c#, the language supported by the SDK, to interact with the backend PHP web app? Or would I be better off just working with .NET so that I can use c# from the beginning, or even with Java in the same way?
Thank you for any recommendations!
OK, I was playing with it. I think the example is a very old constructions of SOAP has changed, or modified nusoap.
I got it to work, but you have to build your soapval a little differently. This could become tedious if you keep working with it (you'll have to learn that SOAP built). You can just use Perl based on your project (I've been messing around with Mason/Perl and the SDK).
The virtual execution code don't mess with expectation that vim25. For example, does not have the constructor of soapval type = "ServiceInstance"but he defines simply as xsi:string (which is good IMO). You will have to develop the construction of soap message, which I think you might find get a bit tedious when you start dealing with complex queries later if you project requires it. You almost create a wsdl-> wrapper of php class for your objects in SOAP or dig in the soap envelope body.
In any case, this can help you get started...
getError(); if($err) { echo $err . '
'; } $namespace = "urn:vim25"; unset($soapmsg); $soapmsg[this] = new soapval('_this', false, 'ServiceInstance', false, false, array("type" => "ServiceInstance") ); print(htmlspecialchars($soapmsg[this]->serialize()) . "
"); $result = $myconnection->call("RetrieveServiceContent", $soapmsg, $namespace); $err = $myconnection->getError(); if($err) { echo $err . '
'; print_r($result); } else { echo "No Error
"; print_r($result); echo "
"; } unset($soapmsg); $soapmsg[this] = new soapval('_this', false, $result[sessionManager], false, false, array("type" => "SessionManager") ); $soapmsg[userName] = "root"; $soapmsg[password] = "VMware1"; print(htmlspecialchars($soapmsg[this]->serialize()) . "
"); $result = $myconnection->call("Login", $soapmsg, $namespace); $err = $myconnection->getError(); if($err) { echo $err . '
'; print_r($result); } else { echo "No Error
"; print_r($result); } ?>My outings are not pretty, but you can see his recording with success:
<_this xsi:type="xsd:string" type="ServiceInstance">ServiceInstance No Error Array ( [rootFolder] => ha-folder-root [propertyCollector] => ha-property-collector [viewManager] => ViewManager [about] => Array ( [name] => VMware ESX Server [fullName] => VMware ESX Server 3.5.0 build-153875 [vendor] => VMware, Inc. [version] => 3.5.0 [build] => 153875 [localeVersion] => INTL [localeBuild] => 000 [osType] => vmnix-x86 [productLineId] => esx [apiType] => HostAgent [apiVersion] => 2.5u2 ) [setting] => HostAgentSettings [userDirectory] => ha-user-directory [sessionManager] => ha-sessionmgr [authorizationManager] => ha-authmgr [perfManager] => ha-perfmgr [eventManager] => ha-eventmgr [taskManager] => ha-taskmgr [accountManager] => ha-localacctmgr [diagnosticManager] => ha-diagnosticmgr [licenseManager] => ha-license-manager [searchIndex] => ha-searchindex [fileManager] => ha-nfc-file-manager [virtualDiskManager] => ha-vdiskmanager ) <_this xsi:type="xsd:string" type="SessionManager">ha-sessionmgr No Error Array ( [key] => 52494642-84e1-33d1-92f3-95c044257a44 [userName] => root [fullName] => root [loginTime] => 2009-07-14T15:37:21.820431-07:00 [lastActiveTime] => 2009-07-14T15:37:21.820431-07:00 [locale] => en [messageLocale] => en )
-
ATG sticky session with Apache web server
Hi all. I use webservices module ATG remains on my local system. I send applications via the web browser that goes through Apache and typing the ATG application server. The problem is that, while on our test environments, several subsequent applications maintain the same session on my local system, each application comes with a new session id. This causes problems to test things locally that need to have a sticky session. I use poster (firefox plugin) and after the first request, I capture the cookie (esessionId in the response) and add this header cookie in subsequent applications, but the answers still have a different esessionId cookie value.
Can someone explain how the session (with the help of cookies) tracking work between Apache and ATG? I know that there is a way to allow Apache to know what cookie to take to activate the sticky session but I do not know how to configure it.
Thank you.If you add the url session ID and always get different sessions, it means in your application server accepts session cookies from.
SessionId in url is limited.When you configure apache with the plugin application server, he built in sticky session feature enabled.
I guess the question could be the cookie in the request is not sessionid or each request is get presented as new request by the plug-in.Peace
Shaik -
How to create a dynamic multilingual with liquid Web site and web apps
In the thread
that part of my problem is resolved.I created a list web app that contains several fields from the data source.
These data source fields have multiple values where the customer has to choose the value of (i) there is. That is to say place: sea front area rural, etc., etc.
These values must be translated from English into Dutch.
So, how do I build my Web page with a liquid markup custom c.q. of entry?
Thanks for any help.
Kind regards
Carla
Hi Carla,.
You have many options at your disposal with the liquid, so with the datasource_id of the original web application, you can call another Web application referencing this ID to get the information you need and collect the data in a collection or display in a custom template (.tpl) file.
Here is an example. Inside of your application model web detail.html
With the help of a collection:
{module_webapps id = "3rdPartyWebApp" filter = "item" itemId = '{{dataSourceID}}' collection 'webAppData' =' model = '}
{{webAppData.items [0] .description}}With the help of a model:
{module_webapps id = "3rdPartyWebApp" filter = "item" itemId = "{{dataSourceID}}" template = "display_webapp_description.tpl"}... display_webapp_description.tpl content:
{{description}}
You should be good to go.
-
Problems with Yahoo Web sites and mail 'we cannot go to any page in any browser.
Hello
are you aware of any s.yimp on the Yahoo Server attack?
We cannot access any page in any browser
and we found this site on s.yimp
http://www.removalvideos.com/help-remove-s-yimg-com-browser-hijacker/
Can is it you pls let me know if it is safe?
Thank you
LDudet
Before you try a few cleaner. Have you tried to delete the history of Internet browser options?
Control Panel/Internet Options/browsing history click on delete button and select / Select all but the first choice. Click on delete, apply and then button.
See if that helps?
-
Problem with the EMU 9 and App volume 2.10
I'm surprised that no one else has made the experience... but if you have 9 EMU with App volume 2.10 any stacked application that connects to an external system like vsphere client, Remote Desktop Manager, xming or similar opens but you get what looks like a firewall, dns on winsock error. I tried the following while Troubleshooting which lead me to discover the EMU 9 > 2.10 AppVolumes question. Do not forget that all the problems described were nonexistent before the upgrade to the EMU 9.
- create new vm of capture for the volumes of the app
- created piles of individual application for customer xming, DRC, termnals, vpshere
- created a desire unique appstack applications
- installed applications on the write-able volume with the same results
- remove all agents and install them in the correct order
- 9 removing MEU... Bingo appstacks work
- tested all combinations of the appstacks and they work all all users as EMU 9.0 is not installed.
I don't have app blocking (its off by default) and I don't think that there are other settings in EMU who wanted to have that effect. I also looked around and found no problem of compatibility between the EMU 9 and volume 2.10 on any doc App.
I'm going to downgrade the agent of EMU on the endpoints to 8.7 and test
finally found the issue... KB https://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2145681
drove me crazy...
-
Website dynamic with the web forms and Wamp
Y at - it an advanced course for Dreamweaver CC 2015 - I want to integrate web forms with database (downloaded configuration file / WAMP in dreamweaver CC 2015) do not want a course on older versions because the interface has changed THANKS
Dreamweaver is a front-end development tool. Databases and processing of forms are back-end development. You can certainly use DW as your environment to work with backend scripts, but it is relatively unimportant to the main development workflow.
So, find a course on using PHP/MySQL. It is not really important if you work with DW or another IDE.
-
Binded fields associated with separate Web Service requests
Hello
I want to create a data connection that allows the user to select attributes about 2000. Currently, my web service operation request takes an ID value and returns an object encapsulating these attributes of 2000.
If for example I have an attribute 'firstName', is it possible to have 2 instances of this field on my form but associated with the different application identifiers?
If so, how can I go about it?Thank you.
I guess the workitemID is unique to servce... OK done call eachweb. So actually you do two different web service calls and want to link the name in the same field, but keep the data of the previous call right?
Paul
-
With separate SQL query and the counter is wrong.
Hello
I have another problem with a query.
The following data:
Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
And my request:CREATE TABLE TABLE_1 ( "ORDER_NR" VARCHAR2 (12) , "PRIORITY" VARCHAR2 (2) , "WO_STATUS" VARCHAR2 (1) , "STATUS_DATE" DATE , "ART_NR" VARCHAR2 (9) , "DESCRIPTION" VARCHAR2 (255) , "PRICE" VARCHAR2 (10) ); CREATE TABLE TABLE_2 ( "ART_NR" VARCHAR(9) , "MODELL" VARCHAR2(10) , "MANUFACT" VARCHAR2(20) ); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300612', '12', 'U', TO_DATE('05-FEB-13 10:22:39','DD-MON-RR HH24:MI:SS'), '005231987', '1ST ANNUAL SERVICE', '5000.2546'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300638', '05', 'U', TO_DATE('05-FEB-13 11:38:39','DD-MON-RR HH24:MI:SS'), '005667821', '3RD ANNUAL SERVICE', '5269.7856'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300638', '12', 'U', TO_DATE('06-FEB-13 12:38:39','DD-MON-RR HH24:MI:SS'), '005667821', '1ST BIENNIAL SERVICE', '1234.4468'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300638', '12', 'U', TO_DATE('07-FEB-13 13:38:39','DD-MON-RR HH24:MI:SS'), '005667821', '3RD ANNUAL SERVICE', '4366.7856'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300762', '12', 'U', TO_DATE('22-FEB-13 14:55:48','DD-MON-RR HH24:MI:SS'), '018743356', '3RD ANNUAL SERVICE', '4462.8632'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300766', '12', 'U', TO_DATE('22-FEB-13 08:32:13','DD-MON-RR HH24:MI:SS'), '018743356', '2ND ANNUAL SERVICE', '8762.6643'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300766', '05', 'U', TO_DATE('23-FEB-13 12:32:13','DD-MON-RR HH24:MI:SS'), '018743356', '1ST BIENNIAL SERVICE', '3425.6643'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300766', '12', 'U', TO_DATE('24-FEB-13 14:32:13','DD-MON-RR HH24:MI:SS'), '018743356', '2ND BIENNIAL SERVICE', '6678.6643'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300612', '12', 'U', TO_DATE('06-FEB-13 10:22:39','DD-MON-RR HH24:MI:SS'), '005231987', '1ST ANNUAL SERVICE', '5000.2546'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300638', '05', 'U', TO_DATE('05-FEB-13 11:38:39','DD-MON-RR HH24:MI:SS'), '005667821', '3RD ANNUAL SERVICE', '5269.7856'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300638', '12', 'U', TO_DATE('06-FEB-13 12:38:39','DD-MON-RR HH24:MI:SS'), '005667821', '1ST BIENNIAL SERVICE', '1234.4468'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300638', '12', 'U', TO_DATE('07-FEB-13 13:38:39','DD-MON-RR HH24:MI:SS'), '005667821', '3RD ANNUAL SERVICE', '4366.7856'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300762', '12', 'U', TO_DATE('22-FEB-13 14:55:48','DD-MON-RR HH24:MI:SS'), '018743356', '3RD ANNUAL SERVICE', '4462.8632'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300766', '12', 'U', TO_DATE('22-FEB-13 08:32:13','DD-MON-RR HH24:MI:SS'), '018743356', '2ND ANNUAL SERVICE', '8762.6643'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300766', '05', 'U', TO_DATE('23-FEB-13 12:32:13','DD-MON-RR HH24:MI:SS'), '018743356', '1ST BIENNIAL SERVICE', '3425.6643'); INSERT INTO TABLE_1 (ORDER_NR, PRIORITY, WO_STATUS, STATUS_DATE, ART_NR, DESCRIPTION, PRICE) VALUES ('1KKA1Z300766', '12', 'U', TO_DATE('24-FEB-13 14:32:13','DD-MON-RR HH24:MI:SS'), '018743356', '2ND BIENNIAL SERVICE', '6678.6643'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT1'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT2'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT3'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT4'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT5'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT6'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT1'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT2'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT3'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT4'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT1'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT2'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT3'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT4'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT5'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT6'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT1'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT2'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT3'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT4'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT5'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005231987', 'X-RAY1', 'MANUFACT6'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT1'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT2'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT3'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('005667821', 'LASER', 'MANUFACT4'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT1'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT2'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT3'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT4'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT5'); INSERT INTO TABLE_2 (ART_NR, MODELL, MANUFACT) VALUES ('018743356', 'VACCUM', 'MANUFACT6'); COMMIT;
And the result:SELECT T1.ART_NR , T2.MODELL , SUM(ROUND(T1.PRICE, 2)) AS TOTAL_PRICE , COUNT(*) AS QTY , TO_CHAR(T1.STATUS_DATE, 'MON-RR') AS MONTH FROM TABLE_1 T1, TABLE_2 T2 WHERE T1.WO_STATUS = 'U' AND T1.ART_NR = T2.ART_NR AND TO_CHAR(T1.STATUS_DATE, 'MON-RR') = 'FEB-13' GROUP BY T2.MODELL , T1.ART_NR , TO_CHAR(T1.STATUS_DATE, 'MON-RR')
My problem now is the OTY ist wrong field should count how many times the equipment was in service in Feb - 13 and group them by "MODEL" the production area is not interesting to me, but this is my problem, a model can have several Manufacter and so I had a bad count for my Qty.ART_NR MODELL TOTAL_PRICE QTY MONTH --------- ---------- ----------- ---------- ------ 018743356 VACCUM 559916.16 96 FEB-13 005667821 LASER 173936.48 48 FEB-13 005231987 X-RAY1 120006 24 FEB-13
The next step that I need is to group the result also by type of Service (annual or biannual), like this:
These values are only out of my head, not the table, just to show what I need.ART_NR MODELL TOTAL_PRICE QTY MONTH SERVICE_TYPE --------- ---------- ----------- ---------- ------ --------------------- 018743356 VACCUM 1234.56 4 FEB-13 ANNUAL 018743356 VACCUM 4423.48 10 FEB-13 BIENNIAL 005667821 LASER 4783.11 2 FEB-13 ANNUAL 005667821 LASER 1123.77 22 FEB-13 BIENNIAL 005231987 X-RAY1 8966.12 6 FEB-13 ANNUAL 005231987 X-RAY1 7826.44 12 FEB-13 BIENNIAL
Thanks for your help.
Hosts ReinhardHello
990524 wrote:
HelloWow it's great.
Thanks Frank.In my database, this query works like a charm, but I have a problem, sometimes the round command do not work then I get a total price of 1231.0000000000001, I
tried of TRUNCATES the value, but it's always the same value.Sorry, I can not re - create the problem.
And I put another line in the query that calculates the average price per model:
, ROUND ( SUM (g.price) / COUNT(*) ,2 ) AS average
Why not just
, ROUND (AVG (g.price), 2) AS average
?
and in this line, I have the same problem with bad ROUNDS.
Do you have an idea in this case?
No, sorry. If I can't get the same behavior, myself, it is not that I do.
Instead of ROUND, you can use TO_CHAR to (for example) display 2 digits after the decimal point. To_char will automatically round the result. Your front end (for example, the SQL * Plus COLUMN...) FORMAT command) can probably do the same thing.
Maybe you are looking for
-
Hello. Got a delicate here. I have a MacBookPro (2011) 10.11.3 running. I7 and 8 GB of RAM. Am a musician tourism professional running MainStage3, using keyboards provided them as MIDI controllers. Have used this system in Australia, as well as on
-
How to connect external speakers to Satellite A100-451
Hello I have a Satellite A100-451 (UK) running Vista. I want to connect external speakers. There is a "headphone" Jack on the front (3.5 mm jack I think), can I connect external speakers here? The speakers are "PC Line" with their own power supply an
-
retrieve and record continuous images in labview
Hello I use the NI 1744 smart camera to capture and record continuous images of a moving object. My smart camera is detected in MAX and made the seizure of an image. But when I use the attached file of VI in labview, the smart camera is not detected,
-
Hello I'm totally new to LabView using Labview 8.6. I have a PXI-6704 and on three channels, I should generate a ramp between 0V and 840 mV less than 1 ms, then the signal must remain constantly at the 840 mV. This signal will begin some on-chip osci
-
Hello, I am trying to create my own calculation by inserting a picture, but it must be in an image format. How can I change this document into an image?