compare the strings right
11 g.I have two VARCHAR columns, they two stores telephone numbers, but it is formatted and you're not:
in VARCHAR format: (123) 123-4567
VARCHAR not formatted: 1231234567
This is a problem, because I can't compare to see if the phone number has changed and why it is formatted and the other is not, that one is a source of Excel
and the other is updated every month later before she gets reformatted in Excel (end users) and I want to make the comparison in SQL and not in Excel because of the number of columns involved.
What is the best way to remove the: (), space, -? in the setting column-shaped?
I don't know there's a function or nested functions that I could use to achieve this? just never had a situation like this before.
I basically create an indicator of change for a customer and want to make sure, right now the additional characters are falsly IDing as a change.
Thank you.
Kodiak_Seattle wrote:
11 g.I have two VARCHAR columns, they two stores telephone numbers, but it is formatted and you're not:
in VARCHAR format: (123) 123-4567
VARCHAR not formatted: 1231234567This is a problem, because I can't compare to see if the phone number has changed and why it is formatted and the other is not, that one is a source of Excel
and the other is updated every month later before she gets reformatted in Excel (end users) and I want to make the comparison in SQL and not in Excel because of the number of columns involved.What is the best way to remove the: (), space, -? in the setting column-shaped?
I don't know there's a function or nested functions that I could use to achieve this? just never had a situation like this before.
I basically create an indicator of change for a customer and want to make sure, right now the additional characters are falsly IDing as a change.
Thank you.
1 * Select translate ('(123) 123-4567', '0123456789 () -?', ' 0123456789 ") of the double
SQL > /.
TRANSLATE)
----------
1231234567
Tags: Database
Similar Questions
-
Compare the string to date?
Hello everyone, I have a date recorded in this format string ' 25/05/2011' and I want to compare this string with the current date. I am able to do so if I divided the Date to a String [] string, but it's using a coding hard to compare dates, which does not work if I use: String CurDate = dateFormat.formatLocal (System.currentTimeMillis ()); Because the format is not always as DD/MM/YYYY, depending on the settings of the user's phone. I'm sure that there is a better way to compare two dates, could someone ' a please advise me on this matter. Please note that I have saved in this format DD/MM/YYYY Date String. Thanks in advance.
create a calendar, to day/month/year and check if it's the day same long http://www.blackberry.com/developers/docs/6.0.0api/net/rim/device/api/util/DateTimeUtilities.html#is... )
-
How to convert the string to a full decimal point and left shift
Hey guys I tried to convert gps string to an integer, like this
A string that is 2467.8976 and I need to convert it to a similar integer as point of this 2467.8979 so that I can shift the decimal point to the left (24.678979) which i coudnt do it with the chain. It's just been my 2 weeks with the labview so be gentle. Thank you
Hi Awais07,
Once you have created an indicator that signals the output of parsing the string, right-click on this indicator > display... Format > increase the value of the digit 9
Kind regards
Lennard.C
-
How to compare two strings in PL/SQL
Hi all
I need to compare two strings, they are equal or not in PL/SQL. Y at - it a function to compare the strings.Yes, the sign =.
You're after something like:
IF v_string1 = v_string2 THEN ... ELSE ... END IF;
?
Published by: Boneist on August 27, 2009 11:41
-
Expection while using the string (compare-ignore-case, uppercase) function
Hi all
I am using soa suite 11.1.1.6
JDeveloper 11.1.1.6
I tried to use the string functions (only 2 xp20:upper - box (), oraext:compare-ignore-case()) with an xpath expression. But it is throwing an error saying that the xpath expression is invalid. I used the same xpath expression in an assign activity that works very well. The string functions are works well when it is used with constants. But the case failed when they are used together this way
<assign name="Assign1"> <copy> <from expression="bpws:getVariableData(xp20:upper-case('inputVariable','payload','/client:LoanEligibiltyRequest/client:LoanType'))"/> <to variable="HL"/> </copy> </assign>
This is the log
< 1 July 2013 19:07:10 IST > < error > < oracle.soa.bpel.engine.dispatch > < BEA-0000
00 > < could not handle message
javax.xml.xpath.XPathExpressionException: internal error xpath
at oracle.xml.xpath.JXPathExpression.evaluate(JXPathExpression.java:242)
at com.collaxa.cube.xml.xpath.BPELXPathUtil.evaluate(BPELXPathUtil.java:)
247)
Thanks in advance
It may be wise to cast to a string also. Sometimes you get the signatures of the rear instead of content element if you specify.
-
by comparing the empty string text box
Here are the steps how to do it - but it does not work for me.
http://blogs.Adobe.com/Captivate/2010/12/few-tips-on-%E2%80%98advanced-actions%E2%80%99.ht ml
Could someone please confirm if the procedure mentioned in the blog works or not, and if it works, then which I ruin in the first case below?
In summary, I created a variable stringEmpty and created the fast Action with condition associated with a button. I also created the variable varUserName and associated with a text box.
There are 3 cases and 3 different behaviors.
First case:
stringEmpty =
condition of the tip action: varUserName; not equal to; stringEmpty (variable)
After clicking the button, the result is that if the condition was false (i.e. as if the string in the text box is always equal to stringEmpty)
Second case:
stringEmpty = aaa
condition of the tip action: varUserName; not equal to; stringEmpty (variable)
After clicking the button, the condition is met when the user enters "bbbbbbb" (which is OK). However, if it does not do anything, clicks only button, the condition is not met (which is incorrect behavior, because ' ' <>'aaa', then the condition is satisfied)
Third case:
condition of the tip action: varUserName; not equal to; CCCC (literal)
In the third case everything is OK.
Hello
I did check your file and fixed by:
- by disabling the validate user input, because no matter what name is possible
- replacing the decision "is not equal to" by "is equivalent to" and reverse THEN and actions ELSE; Apparently, the comparison with an empty variable works very well if the audit "equal" but not for "not equal"; I don't have an explanation of deposit, but if possible always use "equal to."
Hope your problem is resolved.
Lilybiri
-
How to save the string in a file with some special characters
Hello
I m using MD5 - llb to create a password.
So, I want to save this MD5-string to a file and read it later abd compared again.
Works perfectly with a proplem:
Some Word create a '\r' in the string of MD5 and when I save this string in a file and read it at the time its read as a '\n' for the comparison does not work.
My question is: How can I record a string exactly as if it were somewhere and read back (also the invisible characters)
For example, the word: heinz
is in MD5: \r\FB^\07\A6\07T\C7\D9\C2\94\AB\C9\1DS\95 (string as display codes indicator)
When I save the string in a file, then I rerad back: \n\FB^\07\A6\07T\C7\D9\C2\94\AB\C9\1DS\95
I used the "write text file" and "read text file".
What should I use to record and play back the same thing?
THX
Have you tried right click and deselection "convert EOL?
-
Problem with convert the string to date using DateTimeStringConverter
Hello
I would like convert string date (JJ/MM/AAAA) - it is useful to compare dates in TableColumns.
so I use DateTimeStringConverter (the string "01/11/2014" is a value of date picker)
DateTimeStringConverter format = new DateTimeStringConverter (Locale.FRANCE,
"dd/MM/YYYY");
Date d1 = format.fromString("01/11/2014");
D1. ToString()
"I do not get the right date, but that date =" Mon Dec 30 00:00:00 THIS 2013!
I don't understand what the problem is (which in fact should not be a problem)?
Any ideas?
Thanks in advance
Fabrice
You have an error in the spec use format ' dd/MM/YYYY' instead of 'dd/MM/YYYY '.
DateTimeStringConverter f = new DateTimeStringConverter(Locale.FRANCE, "dd/MM/yyyy"); Date d1 = f.fromString("01/11/2014"); System.out.println(d1.toString()); // --> Sat Nov 01 00:00:00 CET 2014
If you do not need long, I would use DateStringConverter
-
Block Oracle's PL/SQL by comparing the values to 4 decimal places
Hello
I use Oracle Database 11 g 2. I wrote a simple PL/SQL block that validates as false. Basically trying to ensure that the calculation of FX's 4 correct decimals.
Example if,
1,000 vs 1.0000 should have the value false
1,0000 vs 1.0000 must be set to true
To this end, I'm doing string comparison. I don't know why the following code evaluates to "false", or what is the right way to make this comparison in PL/SQL?
declare l_fx_rate varchar2(100) := to_char(1, '9999.9999'); l_aud_usd varchar2(100) := to_char((23/23),'999999.9999'); BEGIN htp.p(l_fx_rate); htp.p(l_aud_usd); IF l_fx_rate = l_aud_usd THEN htp.p('true'); else htp.p('false'); END IF; END;
Thank you.
- l_fx_rate varchar2 (100): = to_char (1, '9999.9999');
- l_aud_usd varchar2 (100): = to_char ((23/23), '999999.9999');
The first STRING has 4 digits left of the decimal separator and the second CHANNEL has 6 digits to the left of the decimal separator.
4 is NOT equal 6.
You can EASILY see if you actually view the values that uses Oracle.
with q as (select to_char (1, '9999.9999'), v1, v2 to_char ((23/23), '999999.9999') of double)
Select the v1, v2, dump (v1), (v2) dump, case when v1 = v2 then "true" end if 'false' q v3V1 (V1), V2, DUMP DUMP (V2), V3
1.0000, Typ = 1 Len = 10: 32,32,32,32,49,46,48,48,48,48, 1.0000, Typ = 1 Len = 12: 32,32,32,32,32,32,49,46,48,48,48,48, false
See the 4 space characters (32,32,32,32) in the first value chain? See the 6 in the second value?
Oracle compares "1.0000' to ' 1.0000' and the strings are NOT the same."
-
By comparing the dynamic fields of objects using equals and hashCode methods
To compare the different objects of the same class with their content as jobTitleId, classificationId, deptId & classificationId had to be done and do a few steps later, using Set and the map. I was able to do it by simple substitution of equals and hashCode methods of the object class and was able to read the information (as in the map below).
Map < LocationData, list < LocationData > >
The following is the class I used (its been shown you so that it can be called for my problem statement):
Class LocationData
package com.astreait.bulkloader;
public class LocationData {}
String locId, deptId, jobTitleId, classificationId;
@Override
public boolean equals (Object obj) {}
LocationData ld = (LocationData) obj;
return this.deptId.equals (ld.deptId) & & this.jobTitleId.equals (ld.jobTitleId) & & this.classificationId.equals (ld.classificationId) & &
this.locId.equals (ld.locId);
}
@Override
public int hashCode() {}
return deptId.hashCode () + jobTitleId.hashCode () + classificationId.hashCode () + locId.hashCode ();
}
}
Problem:
I am already known to which all the fields of this object, I need to make the comparison.
IE I have to use the variables named classificationId, deptId, jobTitleId & locId etc.
Need:
I need to customize this logic such as names (classificationId, deptId, jobTitleId & locId etc.) fields can be learned, dynamically, as well as their values. So, as far as I understand, I've made use of 2 classes (TableClass and ColWithData), such as the list of the ColWithData is there in the TableClass object.
I think what will happen if I substitute the same two methods "equals() and hashCode();"
as the same thing is possible.
TableClass class #1
Class TableClass {}
The list < ColWithData > cwdList;
@Override
public boolean equals (Object obj) {}
Return Boolean = false;
I need to have the logic must be set such that
all dynamic fields can be compared
return return;
}
@Override
public int hashCode() {}
Return int = 0;
I need to have the logic must be set such that
All dynamic fields for their individual codes can be found
return return;
}
}
ColWithData class #2
Class ColWithData {}
Pass the string; Here, the jobTitleId, classificationId, deptId, locId or any other information fields more may come.
String data; The corresponding data or value for each jobTitleId, classificationId, deptId, locId or any other more fields.
}
Please let me know if I'm the procedure in the right direction or should I do a different approach. If it is allowed to use the current approach then what should be done to equals and hashCode methods?
Finally, I need to make the map as: (is not worried how I give you, but may be considered my goal sought this logic)
Map < TableClass, list < TableClass > > finalMap;
I'm sorry for that. Although the problem is resolved, on my side.
-
Comparing the P_items in javascript
play with dynamic actions at this time
How would you comapre P1_Item > 0 in javascript, as im not sure about the right syntax or familiar to write javascript in the apex.
JavaScript:
* also... should I worry about the if accidentally he compares a string and a numeric value.if ( P1_item > 0 ) { alert(P1_item + " Is greater then 0"); }
* Update
Using APEX 4.1
I tried the following...
$v ('P_item')-> false
$x ('P_item')-> false
$v('P_item').value--> undefined
$x('P_item').value--> undefined.
And I even tried... (these don't work of course in javascript... but I tried anyway)
P_item
: P_item
& P_item.
When I use a popup message normal apex with & P_item. He retrieve the value very well. but for javascript... I don't quite understand.
Published by: PandaOracle on February 1, 2012 10:56It seems you want to set the value of p_item in your pl/sql and then use this value in the javascript code. Make sure that your action "run the Code in PL/SQL" have you p_item in the field "Page of elements to return. You need this then the value that you set in the pl/SQL will return to the element on the page.
$v ('P_ITEM') syntax will work
if ( parseInt($v('P_ITEM')) > 0) { if (confirm($v('P_ITEM')+" is greater")) { doSubmit('SUBMIT'); } } else{ alert($v('P_ITEM')+" is not greater"); }
-
Number of the string syntax - padding zeros in keeping the decimal values
Hello team,
I'm trying to get a number, paved with up to 3 zeros to the left and keep the two decimal places of it.
IE: If the number is 6.25 then I want the string "006.25".
If it's 60.125 I want to make "060.12" (rounded to the hundredth decimal closest)
I tried using the 'String Format"with variations of differnet from the '% 03d' and '.2f '. but I can't have one the right combination of both of them in a single order. Am I missing something here?
With the help of LV2011
Thank you
Have you tried %06.2f?
-
compare the minutes and hours of time
Hello
How to compare 11:30 to 12:00 as the two thing is of type string... I use the string nember converter but will return only 11.
To do this, the easiest method is to format the string into a timestamp. Then, you can simply subtract the stamps to indicate the number of seconds between your two stamps.
-
Compare the table and out of the common elements
Hello
Can you help me to compare the two tables in the attached file in VI and out the elements common to the two tables?
Thank you
hiNi
There is no wire table through the False State in the structure of your business. Use the default value if unwired is selected for this tunnel. the default value for this tunnel is an array of empty strings. Run the wire straight through, and Bob's your father's brother.
-
Analyzes the string and extract the string delimiter
Hello
Basic questions. Is this possible with the scan of regular expression of the string to extract the string that are in the specified delimiters. Here is an example:
Name of the \\Name of the folder 1\Name to the folder 2\Name to the folder 3\File
Chain analysis can produce the following by specifying the regular expression on the right:
1 folder name
Name of the folder 2
Name of the folder 3
File name
I tried \\\%s\\%s\\%s\\%s but the %s stops on the first white space.
Thank you
Michel
RavensFan suggested the service appropriate for your condition, but you can also use an alternative, which is "spreadsheet of array of strings.
Maybe you are looking for
-
The iPhone has 7 tactile 3D?
I can't find anywhere on the page that he touch 3D. Can someone please clear this up for me
-
Because Windows update (13/08/15) I can not install a toolbar on Firefox Robo
I have been using RoboForm for years without problem. However, last night, I ran the last Windows Update and this morning I had no Robo toolbar on my Firefox. I tried to uninstall and reinstall Robo and still no toolbar. I ran the restore windows at
-
Feature request: backup settings and e-mail
I need a feature to back up and restore settings and emails. There may come a time that I need to recharge my system, and if I can just get a backup so I can restore it later, that would be great. I have 4 email accounts in TB, of which 2 are a pain
-
Perpetual restart due to Trojan computer?
Caused by a recent virus who finds it is why on my computer, my PC is stuck in a State of perpetual restart. The computer starts, wonder how I was to load (Safe Mode, normally, etc.) but no matter what I choose, it is at the loading screen (black scr
-
OEDQ AV (Loqate) returns an unverified address
Dear expertsWe installed OEDQ with AV + we installed the repository of knowledge of Loqate to Go. Our plan is to use with Siebel UCM, but is not the subject of this post. After download and installation of Loqate KR, I did start Tester WS and try to