Query to Translate and Replace: Pls Help
I have a table which contains days of the week (in numbers) in a comma separated format. I need to replace the numbers with "Abbreviated Days of the Week"
For example, I ahve some sample rows as
1
1,2
1,5,6
3,5
This must be printed out as
MON
MON,TUE
MON,FRI,SAT
WED,FRI
In the above case, 0 is replaced by SUN, 1 by MON and so on...
why not a simple (although scarry looking) nested replace?
replace(replace(replace(replace(replace(replace(replace(the_column,'0','SUN'),'1','MON'),'2','TUE'),'3','WED'),'4','THU'),'5','FRI'),'6','SAT')Regards
Etbin
Message was edited by:
Etbin
Similar Messages
-
QUERY CLARIFICATION RQD : gurus, experts pls help
Hai,
I am facing problem in performance of the query. sample scenario i have created here pls help me to solve
**VEH_MAIN* TABLE (MASTER TABLE)*
CREATE TABLE VEH_MAIN
( VIP_MOT_IND VARCHAR2(10 BYTE),
VIP_IND NUMBER(10,0)
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('MOT01',1);
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('MOT02',5);
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('M0T03',1);
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('MOT01',2);
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('MOT02',6);
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('MOT01',3);
Insert into VEH_MAIN (VIP_MOT_IND,VIP_IND) values ('MOT01',4);
**VEH_ENGINE_SUB* (table for engine subclass)*
CREATE TABLE VEH_ENG_SUB
( ENG_SUBCLASS VARCHAR2(50 BYTE),
ENG_MOT_IND VARCHAR2(10 BYTE)
Insert into VEH_ENG_SUB (ENG_SUBCLASS,ENG_MOT_IND) values ('ENGSUB001','MOT01');
Insert into VEH_ENG_SUB (ENG_SUBCLASS,ENG_MOT_IND) values ('ENGSUB001','MOT02');
*VEH_ENG_IND( Detail table for engine subclass)*
CREATE TABLE VEH_ENG_IND
( "ENG_SUBCLASS" VARCHAR2(50 BYTE),
"ENG_IND" VARCHAR2(10 BYTE)
Insert into VEH_ENG_IND (ENG_SUBCLASS,ENG_IND) values ('ENGSUB001','1');
Insert into VEH_ENG_IND (ENG_SUBCLASS,ENG_IND) values ('ENGSUB001','2');
*VEH_AXIS( Master table for Engine Axis)*
CREATE TABLE VEH_AXIS
( ENG_AXIS VARCHAR2(50 BYTE),
AXIS_MOT_IND VARCHAR2(10 BYTE)
Insert into VEH_AXIS (ENG_AXIS,AXIS_MOT_IND) values ('ENGAXIS001','MOT01');
Insert into VEH_AXIS (ENG_AXIS,AXIS_MOT_IND) values ('ENGAXIS002','MOT02');
*VEH_AXIS_IND( Details table for engine axis)*
CREATE TABLE VEH_AXIS_IND
( ENG_AXIS VARCHAR2(50 BYTE),
ENG_IND VARCHAR2(10 BYTE)
Insert into VEH_AXIS_IND (ENG_AXIS,ENG_IND) values ('ENGAXIS001','1');
Insert into VEH_AXIS_IND (ENG_AXIS,ENG_IND) values ('ENGAXIS001','2');
Insert into VEH_AXIS_IND (ENG_AXIS,ENG_IND) values ('ENGAXIS001','3');
Insert into VEH_AXIS_IND (ENG_AXIS,ENG_IND) values ('ENGAXIS001','4');
Insert into VEH_AXIS_IND (ENG_AXIS,ENG_IND) values ('ENGAXIS002','5');
Insert into VEH_AXIS_IND (ENG_AXIS,ENG_IND) values ('ENGAXIS002','6');
Condition 1
if i select only ENGINE_SUBCLASS='ENGSUB001' then
SELECT vip_mot_ind,vip_ind
FROM veh_main V,
veh_eng_sub vsub,
veh_eng_ind vind
WHERE (v.vip_mot_ind= vsub.eng_mot_ind
and v.vip_ind=vind.eng_ind
and vsub.eng_subclass= vind.eng_subclass
AND vsub.eng_subclass='ENGSUB001' )output is
MOT01 1
MOT01 2
Condition 2:if i select only the Engine Axis='ENGAXIS002' then the
SELECT vip_mot_ind,vip_ind
FROM veh_main V,
veh_axis vaxis,
veh_axis_ind vaind
WHERE v.vip_mot_ind= vaxis.axis_mot_ind
and v.vip_ind= vaind.eng_ind
and vaind.eng_axis= vaxis.eng_axis
and vaxis.eng_axis='ENGAXIS002';MOT02 5
MOT02 6
Condition 3:
BOTH ENGINE AXIS AND ENGINE SUBCLASS
SELECT vip_mot_ind,vip_ind
FROM veh_main V,
veh_eng_sub vsub,
veh_eng_ind vind,
veh_axis vaxis,
veh_axis_ind vaind
WHERE (v.vip_mot_ind= vsub.eng_mot_ind
and v.vip_ind=vind.eng_ind
and vsub.eng_subclass= vind.eng_subclass
AND vsub.eng_subclass='ENGSUB001' )
AND ( v.vip_mot_ind= vaxis.axis_mot_ind
and v.vip_ind= vaind.eng_ind
and vaind.eng_axis= vaxis.eng_axis
and vaxis.eng_axis='ENGAXIS002');Null values returned. this is correct.
But the query PERFORMANCE fails in OR CONDITON as below
Condition 4;
SELECT vip_mot_ind,vip_ind
FROM veh_main V,
veh_eng_sub vsub,
veh_eng_ind vind,
veh_axis vaxis,
veh_axis_ind vaind
WHERE (v.vip_mot_ind= vsub.eng_mot_ind
and v.vip_ind=vind.eng_ind
and vsub.eng_subclass= vind.eng_subclass
AND vsub.eng_subclass='ENGSUB001' )
OR ( v.vip_mot_ind= vaxis.axis_mot_ind
and v.vip_ind= vaind.eng_ind
and vaind.eng_axis= vaxis.eng_axis
and vaxis.eng_axis='ENGAXIS002');output
MOT02 5
MOT02 5
MOT02 5
MOT02 5
MOT02 6
MOT02 6
MOT02 6
MOT02 6
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 1
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
MOT01 2
This is sample example. when i implement in huge table with partition this scennario takes much time even 2 hours to run.
i want the output must be as below if i use OR condition like condition 4
MOT01 1
MOT01 2
MOT02 5
MOT02 6
Gurus and experts pls help me to solve this problem. Dont give any suggestion like
SELECT vip_mot_ind,vip_ind
FROM veh_main V,
veh_axis vaxis,
veh_axis_ind vaind
WHERE v.vip_mot_ind= vaxis.axis_mot_ind
and v.vip_ind= vaind.eng_ind
and vaind.eng_axis= vaxis.eng_axis
and vaxis.eng_axis='ENGAXIS002'
union
SELECT vip_mot_ind,vip_ind
FROM veh_main V,
veh_eng_sub vsub,
veh_eng_ind vind
WHERE (v.vip_mot_ind= vsub.eng_mot_ind
and v.vip_ind=vind.eng_ind
and vsub.eng_subclass= vind.eng_subclass
AND vsub.eng_subclass='ENGSUB001' )
}this will give correct result...
MOT01 1
MOT01 2
MOT02 5
MOT02 6
but the problem is we cannot implement this in query. because query get framed at runtime there will be so many implement has to be done. other than UNION pls give me more suggesion
waiting..
S
Edited by: A Beginner on Sep 11, 2010 12:51 AMcreate a view v1 with all the joins
select * from v1 where eng_subclass='ENGSUB001'
union
select * from v1 where eng_axis='ENGAXIS002'
If you really do not like the direct access with union, try this
select * from v1
where vsub_PK in (select vsub_PK from v1 where eng_subclass='ENGSUB001' )
OR vsub_PK in (select vsub_PK from v1 where eng_axis='ENGAXIS002')
--vsub_PK is the primary key of table vsub -
i cant update my iphone 3gs to a more newer ios? it says here error! and the phone flashes some connect to itunes.. an if i connct nothing happens.. help me.. the ipgone wont open . and work pls help me thank you!
Hello AlexCornejo,
Thanks for using Apple Support Communities.
The screen you're seeing on your iPhone indicates it is in recovery mode. Now since the device is not appearing in iTunes on your PC, first follow the steps in this article:
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/TS1538
After following those steps, you should be able to restore your iPhone.
Take care,
Alex H. -
on 15/12/2012 i send iphone 4s adapter to digi klang for Warranty. until today digi center still talk to me go back home and waiting.pls help
Thank.This is a USER to User technical Forum
There is no Apple presence on this forum
So nothing anyone here can do
As this is a public World wide Public forum I suggest you remove the document you have strangely decided to copy above .It looks like some form ID card -
what is the difference between translate and replace.
SQL> -- TRANSLATE replaces by position, the 1st character of the list to match is replaced by the SQL> -- 1st character of the replacement list. The 2nd character with the second, and if there are
SQL> -- characters in the list to match that do not have positional matching in the replacements
SQL> -- list they are dropped.
SQL> select translate('ABCABC','A','1') as str from dual;
STR
1BC1BC
SQL> -- REPLACE replaces the exact string to match with the replacement string
SQL> select replace('ABCABC','AC','1') as str from dual;
STR
ABCABC -
Find and Replace Issue Help Requested.
Hi all. I've been digging around for a couple of days and
can't seem to figure this one out. For starters, I have already
looked at the Regular Expression syntax and tried the MS word
clean-up option, but no luck. We have about 1,500 pages of content.
They are in DNN, so the pages are created dynamically.
Unfortunately, the page content was written in Word and then dumped
in DNN. We are trying to clean up the pages. We are grabbing the
content from Dot Net Nuke and putting it into Dreamweaver 8.0.2.
Then we are manually cleaning out things like:
<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />
and
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"
align=left>
We are using the Find and Replace funtion in Dreamweaver to
clean out these commands, but I know from the documentation, there
is an easier way to clean these pages.
Bottom Line: Since the pages are dynamically built, I know I
have to grab the page content and put it in Dreamweaver manually
and then put it back in DNN, but I am trying to find a way (using
Regular Expressions or something) to look for all the little
variances of MSO, <?XML, etc. in a straight shot. I would like
to find a way to use a wild card to look for all tags that have MSO
or Microsoft or ?XML in them and then replace them with a null
value. From what I can tell, the Find would have to use a wildcard
because the advanced find features don't carry what I am looking
for. Something like Find \<?xml * [<-wildcard] to \> to
grab the entire tag. The Find tag command doesn't work because the
tags I need aren't listed. Also, because the content is dynamic, I
can't do a Fins and Replace against the entire site for these
commands, but it would be nice to "Find" all of these items with a
single pass since the "Replace" value is always null.
The wildcard syntax and multiple Find instances are the main
questions. The wildcards seem to be character or space specific.
Sorry for the long explanation - I just don't want to waste
anyone's time typing responses to things I've already tried to do.
Thanks in advance for any help. This is my first time back in
the forums in about 4 years.sadamec1 wrote:
> Well David, you Findmaster - it worked! (At least it
found and highlighted the
> code). Now, I need to dig through what you sent me and
compare it against my
> regular expression definitions to find out how to grab
the rest of these
> phrases. You're the best. Thank you!
Glad that it did the trick. Just to help you understand what
I did,
there are two main sections, as follows:
<\?xml[^>]+>
and
<[^>]+(?=class=Mso)[^>]+>
They are separated by a vertical pipe (|), so they simply act
as
alternatives.
The first one searches for <?xml followed by anything
except a closing
bracket until it reaches the first closing bracket.
The second one is more complex. It begins with this:
<[^>]+
This simply looks for an opening bracket followed by anything
other than
a closing bracket. What makes it more intelligent is the next
bit:
(?=class=Mso)
This does a forward search for "class=Mso". It's then
followed by this
again:
[^>]+>
That finds anything except a closing bracket followed by a
closing bracket.
The bit that you need to experiment with is (?=...). It's
technically
called a "forward lookaround". The effect is that the second
half of the
regex finds <....class=Mso....>.
David Powers
Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
http://foundationphp.com/ -
Urgent - I have written select query between loop and endloop, Ple help out
Can any one help out me on this select query. I have written select query between loop and endloop. When I execute the program it will take too much time in this query. Please help me out. Its very urgent.
LOOP AT l_i_invoices ASSIGNING <l_invoices>.
CLEAR alv_wa.
alv_wa-bukrs = <l_invoices>-bukrs.
alv_wa-gsber = <l_invoices>-gsber.
CLEAR l_instid.
CONCATENATE <l_invoices>-belnr <l_invoices>-gjahr INTO l_instid.
SELECT top_wi_id FROM sww_wi2obj INTO TABLE l_i_swwwihead
WHERE catid = c_catid_business_object
AND instid = l_instid
AND typeid = c_typeid_invoice
AND removed = space
AND ( wi_rh_task = c_task_buyer_message
OR wi_rh_task = c_task_buyer_message2 ).
IF sy-subrc = 0.
<l_invoices>-flag = 'X'.
ELSE.
<l_invoices>-flag = ' '.
ENDIF.
MODIFY l_i_invoices FROM <l_invoices> TRANSPORTING flag
WHERE belnr = <l_invoices>-belnr
AND gjahr = <l_invoices>-gjahr.
APPEND alv_wa TO i_alv.
ENDLOOP.
Thanks in advance.Here is a way to solve this problem.
Choose somewhere before this loop processing to use that select. Therefore, you'll need use FOR ALL ENTRIES <that_loop_table> clause, and in the WHERE condition you need to specify that same fields.
This way, you will have an internal table with all data you'll need to check.
Then, inside your loop statement, use the READ TABLE command with the clause WITH KEY field = value, to read that record and use the value found.
Like this sample:
SELECT bukrs lifnr umsks umskz augdt augbl zuonr gjahr belnr buzei
waers xblnr blart gsber ebeln zfbdt zbd1t zlsch
INTO TABLE tg_bsak
FROM bsak
FOR ALL ENTRIES IN tl_bkpf_sel
WHERE bukrs EQ tl_bkpf_sel-bukrs AND
lifnr IN s_lifnr AND
augbl EQ tl_bkpf_sel-belnr.
LOOP AT tg_bseg INTO wa_bseg.
READ TABLE tg_bsak INTO wa_bsak WITH KEY bukrs = wa_bseg-bukrs
gjahr = wa_bseg-gjahr
belnr = wa_bseg-belnr
BINARY SEARCH.
if sy-subrc = 0.
* do something
endif.
ENDLOOP. -
Find and replace advanced help
Firstly thank you for reading. I come here as a last resort to see if there's a solution to a problem I have.
Basically I need to rename several thousand images in a blog backup that is being transfered to a new host. The format of the images are as follow
<img alt="Revlon-pedi-egg" border="0" src="images/6a00d8341c873353ef011572419566970b-800wi.jpg" />
where each of the several thousand images has a unique alt tag and a unique image name
What I want dreamweaver to find the alt tag then replace the image name, so that the above image would become
<img alt="Revlon-pedi-egg" border="0" src="images/Revlon-pedi-egg..jpg" />
I have used replace expressions before as well as (.*) etc but I just can't seem to get this one to work.
Is this possible and if so would someone be kind enough to give me some pointers?FIRST MAKE A BACKUP.
Test this in several pages first.
In Dreamweaver Find and Replace, select the following options:
Find in: Current Document
Search: Source Code
Find:
<img alt="([^"]+)(".*?)src="images\/[^.]+
Replace:
<img alt="$1$2src="images/$1
Select Use regular expression.
Once you are confident that it's making the correct changes, you can then do it for an entire folder or the whole of the current site.
This assumes that all your image tags use double quotes around attribute values as shown in your original post. -
Late 2010 iMac Running Sluggish and Loud-PLS HELP
I have only found one or two threads relating to my specific problem, and I still need more help. Anyone's help (...Linc Davis) would be very much appreciated.
First off, let me tell you what I am running.
Late 2010 model iMac (3.2 GHz intel core). OSX Snow Lion 10.6.8. 4GB Ram. 1TB hard drive (less than half full)
Here is where I have isolated the problem so far.
-Switching between applications is often very sluggish and laggy. It takes up to 10 seconds sometimes to open an appplication.
-Playing audio files with either itunes or preview. Quite often a song will stall for up to 5 or more seconds before playing again
-NOTE occasionally the audio actually cut out for five seconds and then start again later on in the song as opposed to simply stalling.
-Typing in search bars, this action is often sluggish and laggy as well.
-Clicking on icons and links. Example, at the start up window when I clicked on my user account it took about three seconds to bring up the username box
-Fan is working very loudly right from startup, and not slowing down at all.
Here are the solutions I have tried to no avail.
-Ran disk utility, everything came up as ok
-monitered my CPU usage with various problem causing applications. The RAM usage is fine and should be working great, I almost always have more than half freed up RAM
-I replaced the thermal cream around the hard drive because it was over heating a bunch and I also gave it a good clean. This fixed the over heating problem but the laggin still occurs.
-SMC reset (twice). no change.
I don't know what to do next, somebody please help. Do I have any malware? Is my harddrive failing?
p.s. I'm pretty noob to the intricacies of going deep into computers, but I can follow steps and figure out what's going on easy enough.Hello, see how many of these you can answer...
See if the Disk is issuing any S.M.A.R.T errors in Disk Utility...
http://support.apple.com/kb/PH7029
Open Activity Monitor in Applications>Utilities, select All Processes & sort on CPU%, any indications there?
How much RAM & free space do you have also, click on the Memory & Disk Usage Tabs.
Open Console in Utilities & see if there are any clues or repeating messages when this happens.
In the Memory tab, are there a lot of Pageouts? -
A query on Flexfield and valuesets.Please help me in sorting out
We have created a structure in descriptive flexfield with 4 to 5 segments. Among those one segment has a value set with independent validation type. And all the other segments have value set with dependent validation type on the first segment.
Now the requirement as per client is as follows:
If first segment is taken as YES, all the other segments are to be displayed and enabled. If it is NO, then all the segments have to disabled.
We are able to get it in case of YES but if it is NO, all the segments are being displayed.But we even want them to disable or display off.
Please help me out in sorting out this issue.Hi,
I don't think thats possible, when you have a valueset in which you are referencing a previous parameter using the $FLEX.<Parameter_name> property, apps automatically sets the dependency. The dependent item is automatically enabled as soon as you enter a value in the dependable field. There is no way to set this dependency conditionally.
What you can do instead is change the query of your valuesets so that it does not have any records
i.e $FLEX.<Parameter> = 'YES'
Regards,
Vikash
oraclehrmsways.blogspot.com
Message was edited by:
vsethi -
How to recover lost folders and files - Pls help, help...
Some days ago I lost all of my 15 GB folders and files that stored in my Macbook Pro hard drive called DATA. I brought my Macbook pro to an experienced computer tecnicians who providing data recovery services. To his and my suprise, after checking, scanning it a few hours, he said their is no way to recover because he did not find any trails at all. The computer still seems working properly - I have no problem with any applications. There are few other folders in the DATA hard disk containing pictures, computer programs still remain. These lost folders and files contain mainly documents (word, excel, power point, pdf etc) which I accumulated in my many years working !!!!. I did not make a back up since last September partly because I think Mac is very safe.
The computer with me all the time on that day and only my son used Power Point to make a simple presentation on that evening - he can not save it on the folders the he normally use - All the folders and files are gone.
I will appreciate it very much if any of you can tell me what would be the possible causes and more importanly how to recover the lost folders and files. They are very very valuable to me.
Many thanks for your kind attention
Loimekong from Vietnam
Macbook Pro 2.4 Ghz
Intel Core 2 Duo
4 GB 1067 MhZ DDR3First, did the data actually get deleted, or is it still there somewhere? Try searching the drive for some of the documents, perhaps it's all just in another folder on that drive.
If it's truly gone, it's impossible for us to say what might have happened to make it unrecoverable. Perhaps someone using the computer used Secure Empty Trash, or securely erased empty space on the hard drive. Perhaps it was overwritten by other stuff before you noticed. It's possible the hard drive is starting to fail, though this seems like an awfully specific problem for that to be the issue.
Or perhaps the tech you took the computer to didn't know what he was doing. Why not try recovering what you can on your own? See Recovering deleted files.
You should be aware that no computer is safe. All computers rely on hardware that may fail and software that can have bugs. You absolutely MUST maintain a good set of frequently-updated backups... no fewer than two full backups of anything you don't want to lose.
(Note that my pages contain links to other pages that promote my services, and this should not be taken as an endorsement of my services by Apple.) -
Query to get Week number Pls help
I need to get week number of the current year in the format 2008-W47 ( this is for sysdate
when i try
select to_CHAR(sysdate,'YYYY'||'-IW')
FROM DUAL
i get 2008-47
but in the format 2008-W47
Help
sSQL> select to_CHAR(sysdate,'YYYY')||'-W'||to_char(sysdate,'IW') from dual
2 /
TO_CHAR(
2008-W47 -
5200: Error executing query: Invalid Item ID. Pls help
Hi
i get this error above when i try to run a report from the workspace and it's specially for some reports.
I use HFM 9.2, the database connection is configured correctly, and the user with the problem
above (comes from msad) has all the rights, permissions and he can run others reports without any problem.
Any idea to fix this issue?
thanks for your helpWe had several users experiencing this on various reports. This was due to an invalid default Point of View for the user that was incompatible with the particular report. We changed their preferences to prompt for POV and it solved the issue.
This can be changed in Workspace (we are on 9.3.1, so it may be a little different) under File | Preferences. Choose Financial Reporting and set the User Point of View Preview value to On. This will prompt the user to change their POV every time he or she opens a report. They can select the correct POV and the report runs correctly.
Let me know if this works. If not, you can delete the POV from the server and it will reset when the user logs back in. -
My gmail acc wont link up to my iphone it says invalid password..although I get in on my computer with that username and password.pls help!!
double check the passowrd. Failing that delete the account form the phone and carefully re enter all the information making sure the incoming and outgoing server names are correct as well as user name and password
-
Populating datagrid using web service. pls help me...
i don't know why i cant populate my data grid using data on a
web service, i try to access web service by a simple return string
like helloworld and it is working but when i try to get data in web
service nothing happens there is no error on my builder and web
page, but it dont display the data.. bellow is my web service and
code. pls help i need this to work.. thanks..
<DataTable>
−
<xs:schema id="NewDataSet">
−
<xs:element name="NewDataSet" msdata:IsDataSet="true"
msdata:MainDataTable="Customer" msdata:UseCurrentLocale="true">
−
<xs:complexType>
−
<xs:choice minOccurs="0" maxOccurs="unbounded">
−
<xs:element name="Customer">
−
<xs:complexType>
−
<xs:sequence>
<xs:element name="num" type="xs:string" minOccurs="0"/>
<xs:element name="name" type="xs:string"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
−
<diffgr:diffgram>
−
<DocumentElement>
−
<Customer diffgr:id="Customer1" msdata:rowOrder="0"
diffgr:hasChanges="inserted">
<num>1</num>
<name>String1</name>
</Customer>
−
<Customer diffgr:id="Customer2" msdata:rowOrder="1"
diffgr:hasChanges="inserted">
<num>2</num>
<name>String2</name>
</Customer>
−
<Customer diffgr:id="Customer3" msdata:rowOrder="2"
diffgr:hasChanges="inserted">
<num>3</num>
<name>String3</name>
</Customer>
</DocumentElement>
</diffgr:diffgram>
</DataTable>
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
[Bindable] private var ArrayData:ArrayCollection;
private function getString(event:ResultEvent):void{
Alert.show(event.result.toString());
private function getStringError(event:FaultEvent):void{
Alert.show("Error");
private function button_click():void{
Test.HelloWorld.send();
private function getData(event:ResultEvent):void{
grid.dataProvider =
event.result.diffgram.DocumentElement.Customer;
private function getDataError(event:FaultEvent):void{
Alert.show("Error");
private function button1_click():void{
Test.getData.send();
]]>
</mx:Script>
<mx:WebService id="Test" wsdl="
http://localhost/HawkWeb/Hawkeye.asmx?wsdl">
<mx:operation name="HelloWorld" result="getString(event)"
fault="getStringError(event)" />
<mx:operation name="getData" result="getData(event)"
fault="getDataError(event)" />
</mx:WebService>
<mx:Button x="10" y="10" label="Get String"
click="button_click()"/>
<mx:Button x="10" y="40" label="Get Data" width="83"
click="button1_click()"/>
<mx:DataGrid id="grid" x="10" y="70" width="501">
<mx:columns>
<mx:DataGridColumn headerText="Num" dataField="col1"/>
<mx:DataGridColumn headerText="Name"
dataField="col2"/>
</mx:columns>
</mx:DataGrid>
</mx:Application>the datafield in my code is wrong, i change it to num and
name. but nothing happens..
Maybe you are looking for
-
<Preran> For the benefit of moderators here, I used Google to translate your content into English: Good day, I have problems with blurry font in Dreamweaver CS3 after switching from Windows XP to Windows 7 I have already tried the following: In "Edit
-
I have a few songs on multiple albums that I have paid for. I tried to listen to a few songs. An exclamation point said I need to locate the files. I went in to ITunes and it said the items have been downloaded to my computer. I can't find them. Can
-
I have a function module that performs a call transaction to create a transfer order. I have two tasks that call this function module; one tasks method calls the function and passes a flag to inform the transaction to be processed in foreground, the
-
Is it possible to publish captivate movie in .WMV format. If not any tool is there to convert the captivaet outputs into .WMV. IF so please send me the link. Thanks a lot for your replies.
-
Trouble with E-Fax and my Photosmart 7510
I have the 7510 which has the capcity for E-fax. I have been able to successfully send faxes but sometimes I get a "failure" notice. I see that the free E-Fax (which is what I have as it came with the machine) only allows 20 sent faxes and 20 receive