Need Help with instr/Regexp for the query

Hi Oracle Folks
I am using Oracle
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.
As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3).
Can we use REG_EXP
Please help.
Thanks in advance.
Rajesh
with x as (
SELECT '+-+-POPPPPPP   ' STUDENT_RESPONSE, 1 record_number FROM DUAL union all
SELECT '+--AOPPPPPP++' STUDENT_RESPONSE, 2 record_number FROM DUAL union all
SELECT '+-+-  OPPPPPP--' STUDENT_RESPONSE, 3 record_number FROM DUAL union all
SELECT '+-+-9OPPPPPP   ' STUDENT_RESPONSE, 4 record_number FROM DUAL )
(SELECT RECORD_NUMBER,
TRIM(STUDENT_RESPONSE) FROM X
WHERE
((INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'-') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'+') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'O') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'P') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),' ') !=0)
)

Hi, Rajesh,
Rb2000rb65 wrote:
Hi Oracle Folks
I am using Oracle
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThanks for posting this (and the WITH clause for the sample data). That's very helpful.
I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.Are you combining the responses to several qeustions in one VARCHAR2 column? It might be better to have a separate row for each question.
As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3). What exactly is your requirement? Are you trying to find the rows where student_response contains any of the forbidden characters, or where it contains a space anywhere but at the end of the string?
Can we use REG_EXPYes, but it's easy enough, and probably more efficient, to not use regular expressions in this case:
Here's one way:
SELECT     record_number
,     student_response
FROM     x
WHERE     TRANSLATE ( UPPER ( RTRIM (student_response, ' '))
            , 'X+-OP'
            , 'X'
            )     IS NOT NULL
;That is, once you remove trailing spaces and all occurrences of '+', '-', 'O' or 'P', then only the forbidden characters are left, and you want to select the row if there are any of those.
If you really, really want to use a regular expression:
SELECT     record_number
,     student_response
FROM     x
WHERE     REGEXP_LIKE ( RTRIM (student_response)
              , '[^-+OP]'          -- or '[^+OP-]', but not '[^+-OP]'.  Discuss amongst yourselves
              , 'i'
;but, I repeat, this will probably be slower than the first solution, using TRANSLATE.
Edited by: Frank Kulash on Oct 17, 2011 1:05 PM
Edited by: Frank Kulash on Oct 17, 2011 1:41 PM
The following is slightly simpler than TRANSLATE:
SELECT     record_number
,     student_response
FROM     x
WHERE     RTRIM ( UPPER ( RTRIM (student_response, ' '))
           , '+-OP'
           )          IS NOT NULL
;

Similar Messages

  • Need help with installing Windows for the bar exam

    I need to retake the bar exam in Feb 2011 and I've decided to switch to typing. I am trying to figure out what Windows I need (the software says XP is fine but is that even available anymore)- so can someone walk me through this process? I've partioned my hard drive with the default 5GB but should it be more?
    I'm looking at buying Windows- is XP okay or should I shell out for 7-i.e. is one more compatible with Macs?
    And then finally, in the installation instructions they mention that I need my Mac OS disc for the process- is that the snow leopard disc or something else? My discs are in storage right now so should I wait until I get them before starting this process or can I get replacements if I accidentally threw them out in moving?
    Sorry for all the questions, but well, I'm racing to get everything done and I want to make sure I don't crash my system halfway through the exam!

    You don't need Boot Camp, but even XP will have a lot of stuff to update from after the install, and that takes temp space. Just as your Mac shows 5-10GB there is add'l hidden space used.
    Apple's 'requirements' has gotten others in trouble and I was pretty sure it was more like 10GB. Plus a lot of XP discs are now SP3.
    XP out of the box but connected to the net is just waiting for malware, average is 15 minutes to be infected. 7 is better and just in case you need it again.
    System Builder can come in 32 or 64-bit but XP is 32-bit only.
    VirtualBox by Oracle is a free VM.
    1GB for one program actually seems like a lot, or is that RAM requirement?

  • I need help with exporting project for the web

    Probably something i am doing wron g but here are the problems. When I use Quicktime Converter, if I try to convert to a Quicktime movie or an MPEG-4 nothing happens and i get a 'File error;File Unknown message' when i try to convert to an AVI File, it works, but even though I have already rendered the project, it shows up with little flashes of blue that say 'unrendered'. and finally, when I try to make it a w
    Windows Media File, it stops after 29 seconds. Any ideas?
    I have an iMac with dual core processor, and FCE HD 3.5.1. I have my video files on an external drive.
    iMac   Mac OS X (10.4.10)  

    perform a search using the term export for web and it should throw up some ideas.
    here's one for starters:
    http://discussions.apple.com/thread.jspa?messageID=2309121&#2309121
    If you're using flip4mac to convert to wmv, the trial stops at 30 seconds - you need at least wmvstudio to export to wmv:
    http://www.flip4mac.com/wmv.htm

  • I have an itouch, most songs i got off my cd's. i have a new laptop and want to put songs from itouch to laptop.I can only get the songs that i purchased onto the laptop? need help with how to get the rest from itouch to laptop please??

    i have an itouch, most songs i got off my cd's. i have a new laptop and want to put songs from itouch to laptop.I can only get the songs that i purchased onto the laptop? need help with how to get the rest of the songs (from my cd's) from itouch to laptop please??

    See this previous discussion:
    Recovering your iTunes library from your iPod or iOS device: Apple Support Communities

  • Need help with calculator project for an assignment...

    Hi all, I please need help with my calculator project that I have to do for an assignment.
    Here is the project's specifications that I need to do"
    """Create a console calculator applicaion that:
    * Takes one command line argument: your name and surname. When the
    program starts, display the date and time with a welcome message for the
    user.
    * Display all the available options to the user. Your calculator must include
    the arithmetic operations as well as at least five scientific operations of the
    Math class.
    -Your program must also have the ability to round a number and
    truncate it.
    -When you multiply by 2, you should not use the '*' operator to perform the
    operation.
    -Your program must also be able to reverse the sign of a number.
    * Include sufficient error checking in your program to ensure that the user
    only enters valid input. Make use of the String; Character, and other
    wrapper classes to help you.
    * Your program must be able to do conversions between decimal, octal and
    hex numbers.
    * Make use of a menu. You should give the user the option to end the
    program when entering a certain option.
    * When the program exits, display a message for the user, stating the
    current time, and calculate and display how long the user used your
    program.
    * Make use of helper classes where possible.
    * Use the SDK to run your program."""
    When the program starts, it asks the user for his/her name and surname. I got the program to ask the user again and again for his/her name and surname
    when he/she doesn't insert anything or just press 'enter', but if the user enters a number for the name and surname part, the program continues.
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??
    Here is the programs code that I've written so far:
    {code}
    import java.io.*;
    import java.util.*;
    import java.text.*;
    public class Project {
         private static String nameSurname = "";     
         private static String num1 = null;
         private static String num2 = null;
         private static String choice1 = null;
         private static double answer = 0;
         private static String more;
         public double Add() {
              answer = (Double.parseDouble(num1) + Double.parseDouble(num2));
              return answer;
         public double Subtract() {
              answer = (Double.parseDouble(num1) - Double.parseDouble(num2));
              return answer;
         public double Multiply() {
              answer = (Double.parseDouble(num1) * Double.parseDouble(num2));
              return answer;
         public double Divide() {
              answer = (Double.parseDouble(num1) / Double.parseDouble(num2));
              return answer;
         public double Modulus() {
              answer = (Double.parseDouble(num1) % Double.parseDouble(num2));
              return answer;
         public double maximumValue() {
              answer = (Math.max(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double minimumValue() {
              answer = (Math.min(Double.parseDouble(num1), Double.parseDouble(num2)));
              return answer;
         public double absoluteNumber1() {
              answer = (Math.abs(Double.parseDouble(num1)));
              return answer;
         public double absoluteNumber2() {
              answer = (Math.abs(Double.parseDouble(num2)));
              return answer;
         public double Squareroot1() {
              answer = (Math.sqrt(Double.parseDouble(num1)));
              return answer;
         public double Squareroot2() {
              answer = (Math.sqrt(Double.parseDouble(num2)));
              return answer;
         public static String octalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
    String octal1 = Integer.toOctalString(iNum1);
    return octal1;
         public static String octalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String octal2 = Integer.toOctalString(iNum2);
              return octal2;
         public static String hexadecimalEquivalent1() {
              int iNum1 = Integer.parseInt(num1);
              String hex1 = Integer.toHexString(iNum1);
              return hex1;
         public static String hexadecimalEquivalent2() {
              int iNum2 = Integer.parseInt(num2);
              String hex2 = Integer.toHexString(iNum2);
              return hex2;
         public double Round1() {
              answer = Math.round(Double.parseDouble(num1));
              return answer;
         public double Round2() {
              answer = Math.round(Double.parseDouble(num2));
              return answer;
              SimpleDateFormat format1 = new SimpleDateFormat("EEEE, dd MMMM yyyy");
         Date now = new Date();
         SimpleDateFormat format2 = new SimpleDateFormat("hh:mm a");
         static Date timeIn = new Date();
         public static long programRuntime() {
              Date timeInD = timeIn;
              long timeOutD = System.currentTimeMillis();
              long msec = timeOutD - timeInD.getTime();
              float timeHours = msec / 1000;
                   return (long) timeHours;
         DecimalFormat decimals = new DecimalFormat("#0.00");
         public String insertNameAndSurname() throws IOException{
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        while (nameSurname == null || nameSurname.length() == 0) {
                             for (int i = 0; i < nameSurname.length(); i++) {
                             if ((nameSurname.charAt(i) > 'a') && (nameSurname.charAt(i) < 'Z')){
                                       inputCorrect = true;
                        else{
                        inputCorrect = false;
                        break;
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your name and surname: ");
                             nameSurname = inStream.readLine();
                             inputCorrect = true;
                        }catch (IOException ex) {
                             System.out.println("You did not enter your name and surname, " + nameSurname + " is not a name, please enter your name and surname :");
                             inputCorrect = false;
                        System.out.println("\nA warm welcome " + nameSurname + " ,todays date is: " + format1.format(now));
                        System.out.println("and the time is now exactly " + format2.format(timeIn) + ".");
                        return nameSurname;
              public String inputNumber1() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter a number you want to do a calculation with and hit <ENTER>: ");
                             num1 = br.readLine();
                             double number1 = Double.parseDouble(num1);
                             System.out.println("\nThe number you have entered is: " + number1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("\nYou did not enter a valid number: " + "\""+ num1 + "\" is not a number!!");
                             inputCorrect = false;
                        return num1;
         public String calculatorChoice() throws IOException {
              System.out.println("Please select an option of what you would like to do with this number from the menu below and hit <ENTER>: ");
              System.out.println("\n*********************************************");
              System.out.println("---------------------------------------------");
              System.out.println("Please select an option from the list below: ");
              System.out.println("---------------------------------------------");
              System.out.println("1 - Add");
              System.out.println("2 - Subtract");
              System.out.println("3 - Multiply");
              System.out.println("4 - Divide (remainder included)");
              System.out.println("5 - Maximum and minimum value of two numbers");
              System.out.println("6 - Squareroot");
              System.out.println("7 - Absolute value of numbers");
              System.out.println("8 - Octal and Hexadecimal equivalent of numbers");
              System.out.println("9 - Round numbers");
              System.out.println("0 - Exit program");
              System.out.println("**********************************************");
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader inStream = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("Please enter your option and hit <ENTER>: ");
                             choice1 = inStream.readLine();
                             int c1 = Integer.parseInt(choice1);
                             System.out.println("\nYou have entered choice number: " + c1);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid choice number: " + "\""+ choice1 + "\" is not in the list!!");
                             inputCorrect = false;
                        return choice1;
         public String inputNumber2() throws IOException {
              boolean inputCorrect = false;
                   while (inputCorrect == false) {
                        try {
                             BufferedReader br2 = new BufferedReader (new InputStreamReader(System.in));
                             System.out.print("\nPlease enter another number you want to do the calculation with and hit <ENTER>: ");
                             num2 = br2.readLine();
                             double n2 = Double.parseDouble(num2);
                             System.out.println("\nThe second number you have entered is: " + n2);
                             System.out.println("\nYour numbers are: " + num1 + " and " + num2);
                             inputCorrect = true;
                        } catch (NumberFormatException nfe) {
                             System.out.println("You did not enter a valid number: " + "\""+ num2 + "\" is not a number!!");
                             inputCorrect = false;
                        return num2;
         public int Calculator() {
              int choice2 = (int) Double.parseDouble(choice1);
              switch (choice2) {
                        case 1 :
                             Add();
                             System.out.print("The answer of " + num1 + " + " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 2 :
                             Subtract();
                             System.out.print("The answer of " + num1 + " - " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 3 :
                             Multiply();
                             System.out.print("The answer of " + num1 + " * " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 4 :
                             Divide();
                             System.out.print("The answer of " + num1 + " / " + num2 + " is: " + decimals.format(answer));
                             Modulus();
                             System.out.print(" and the remainder is " + decimals.format(answer));
                             break;
                        case 5 :
                             maximumValue();
                             System.out.println("The maximum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             minimumValue();
                             System.out.println("The minimum number between the numbers " + num1 + " and " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 6 :
                             Squareroot1();
                             System.out.println("The squareroot of value " + num1 + " is: " + decimals.format(answer));
                             Squareroot2();
                             System.out.println("The squareroot of value " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 7 :
                             absoluteNumber1();
                             System.out.println("The absolute number of " + num1 + " is: " + decimals.format(answer));
                             absoluteNumber2();
                             System.out.println("The absolute number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 8 :
                             octalEquivalent1();
                             System.out.println("The octal equivalent of " + num1 + " is: " + octalEquivalent1());
                             octalEquivalent2();
                             System.out.println("The octal equivalent of " + num2 + " is: " + octalEquivalent2());
                             hexadecimalEquivalent1();
                             System.out.println("\nThe hexadecimal equivalent of " + num1 + " is: " + hexadecimalEquivalent1());
                             hexadecimalEquivalent2();
                             System.out.println("The hexadecimal equivalent of " + num2 + " is: " + hexadecimalEquivalent2());
                             break;
                        case 9 :
                             Round1();
                             System.out.println("The rounded number of " + num1 + " is: " + decimals.format(answer));
                             Round2();
                             System.out.println("The rounded number of " + num2 + " is: " + decimals.format(answer));
                             break;
                        case 0 :
                             if (choice2 == 0) {
                                  System.exit(1);
                             break;
                   return choice2;
              public String anotherCalculation() throws IOException {
                   boolean inputCorrect = false;
                   while (inputCorrect == false) {
                             try {                              
                                  BufferedReader br3 = new BufferedReader (new InputStreamReader(System.in));
                                  System.out.print("\nWould you like to do another calculation? Y/N ");
                                  more = br3.readLine();
                                  String s1 = "y";
                                  String s2 = "Y";
                                  if (more.equals(s1) || more.equals(s2)) {
                                       inputCorrect = true;
                                       while (inputCorrect = true){
                                            inputNumber1();
                                            System.out.println("");
                                            calculatorChoice();
                                            System.out.println("");
                                            inputNumber2();
                                            System.out.println("");
                                            Calculator();
                                            System.out.println("");
                                            anotherCalculation();
                                            System.out.println("");
                                            inputCorrect = true;
                                  } else {
                                       System.out.println("\n" + nameSurname + " thank you for using this program, you have used this program for: " + decimals.format(programRuntime()) + " seconds");
                                       System.out.println("the program will now exit, Goodbye.");
                                       System.exit(0);
                             } catch (IOException ex){
                                  System.out.println("You did not enter a valid answer: " + "\""+ more + "\" is not in the list!!");
                                  inputCorrect = false;
              return more;
         public static void main(String[] args) throws IOException {
              Project p1 = new Project();
              p1.insertNameAndSurname();
              System.out.println("");
              p1.inputNumber1();
              System.out.println("");
              p1.calculatorChoice();
              System.out.println("");
              p1.inputNumber2();
              System.out.println("");
              p1.Calculator();
                   System.out.println("");
                   p1.anotherCalculation();
                   System.out.println("");
    {code}
    *Can you please run my code for yourself and have a look at how this program is constructed*
    *and give me ANY feedback on how I can better this code(program) or if I've done anything wrong from your point of view.*
    Your help will be much appreciated.
    Thanks in advance

    Smirre wrote:
    Now my question is this: How can I restrict the user to only enter 'letters' (and spaces of course) but allow NO numbers for his/her surname??You cannot restrict the user. It is a sad fact in programming that the worst bug always sits in front of the Computer.
    What you could do is checking the input string for numbers. If it contains numbers, just reprompt for the Name.
    AND you might want to ask yourself why the heck a calculator needs to know the users Name.

  • Need help with XI certif for technical consultant

    Hi XI experts ,
    I am trying for certif for Development Consultant SAP NetWeaver u201904 - Exchange Infrastructure & Integration Technology -  C_TBIT44_04 .
    Can somebody please give me some sample questions and answers?
    I really will appreciate such help since I donu2019t have any idea what kind of questions are at the exam!
    I only have heard it is not an easy exam to take.?Is this true?
    Also any shared experienced will be appreciate it. If you have, please give me more hands on information , not just course numbers and syllabus.
    Looking forward to receive info from you. Please use emal contcts in my Business Card.
    Thanks in advance all!
    Jim

    HI,
    Yes its true ...any SAP certification is never ever be the easy stuff...that could be easily achievable....
    You need to be well prepare for the Certification. There are many SDN links available for sample questions. you can just search on SDN as well as on Internet.
    https://www.sdn.sap.com/irj/sdn/developerareas/xi?rid=/webcontent/uuid/a680445e-0501-0010-1c94-a8c4a60619f8
    1. SAP XI Certification - Important Topics
    2. Regarding XI Certification Material.
    3. Xi sample Certification questions
    XI certification passing used to be normally 65%. It may vary based on the runtime exam rules.
    There are marks as well as no of questions allocated for every section, so you may refer below link
    you can go to the following site and check the information.
    https://service.sap.com/%7Esapidp/011000358700005902252004E
    https://service.sap.com/~sapidp/011000358700003595762004E
    SAP XI Certification - Important Topics All about XI certification
    Thanks
    Swarup

  • Need Help with INSTR Query

    Hi,
    I have column which is having values like
    EMEA/MEA/IT
    EMEA/WE/GE
    EMEA/MEA/SA
    EMEA/WE/jk
    but i need to get all these rows based on some front selected values where we will select like EMEA/MEA & EMEA/WE.But that value will be ';' separated like EMEA/MEA%;EMEA/WE%.Based on this value l need to retrieve all the rows based on this value (Note ';' as the delimiter) .I tried with INSTR , but not able to sort out.
    Could some one please me on this one how to make this condition in my query.
    Thanks,

    Thanks Frank for your response.
    Table will have thousands of rows where column which I comparing(OU_DIV_REG) will be like with many combination's.I am attaching some data for reference.
    EMEA/DIV/
    EMEA/DIV/HYP
    EMEA/EE
    EMEA/EE&CIS
    EMEA/EE&CIS/
    EMEA/EE&CIS/CENT
    EMEA/EE&CIS/CIS
    EMEA/EE&CIS/GR
    EMEA/EE&CIS/RO
    EMEA/EE&CIS/RTG
    EMEA/EE&CIS/SBL
    EMEA/EE&CIS/SEES
    EMEA/EE&CIS/TR
    EMEA/EMEA_OTM/
    EMEA/FMEA/FR
    EMEA/FMEA/MEA
    EMEA/IL
    EMEA/MEA
    EMEA/MEA/
    EMEA/MEA/EG
    EMEA/MEA/SA
    EMEA/MEA/ZA
    EMEA/NE/BLX
    EMEA/SE
    EMEA/SE/ALPS
    EMEA/SE/IBE
    EMEA/UK
    EMEA/UK/
    But I am using this condition in APEX.Actually I have a report with return query and that will execute. I need this condition to be in where clause.I am attaching my APEX report query for your reference. I updating that where clause condition in BOLD letters where i need to add this condition that will consider all the rows from the table wherever input from APEX page will be like fallowing with ';' as delimter.
    EMEA/MEA%;EMEA/EE&CIS%
    Considering this input values, I need to consider all the rows above where that column value us having EMEA/MEA% and EMEA/EE&CIS%.
    I tried adding the where clause which in BOLD letter (cluster condition).Please let me know will it work or also I need to how to add these XMLtable separation based on ',' in where clause.
    For you reference I am just my full report query(which is not needed i know - but just have the full understanding).
    DECLARE
    lc_query VARCHAR2(4000);
    BEGIN
    lc_query := 'SELECT INITCAP(SUBSTR(end_cli_name,1,20)) Customer
    ,DECODE(cps_id,NULL,INITCAP(SUBSTR(title,1,20)),''<a href="http://cpotsi.oraclecorp.com/pls/cpotsiweb/CPOTSI.EP_WITHDRDTA_RAG_L.show_cps?p_cps_id=''||cps_id||''&p_uptodate=''||:P_DD||''" target=_blank>''||INITCAP(SUBSTR(title,1,20))||''</a>'') Project
    ,ou_ctry_code
    ,funding_amnt
    ,budgeted_margin_amnt
    ,TO_NUMBER(eac_margin_amnt)
    ,decode(substr(PREV_CPS_RAGU_L_1,1,1),
    ''R'',''<img src="#APP_IMAGES#red.jpg" alt="Red">'',
    ''A'',''<img src="#APP_IMAGES#amber.jpg" alt="Amber">'',
    ''G'',''<img src="#APP_IMAGES#green.jpg" alt="Green">'',
    ''U'',''<img src="#APP_IMAGES#unknown.jpg" alt="Unknown">'',
    ''<img src="#APP_IMAGES#unknown.jpg" alt="Unknown">'') RAGU
    FROM emea_pmr_disco_input WHERE
    month=:P_SELECTED_MONTH
    AND year=:P_SELECTED_YEAR
    AND region IN (SELECT region_code
    FROM emea_pmr_regions
    START WITH ( INSTR('':''||:P_SELECTED_REGION||'':'','':''||region_code||'':'',1,1) > 0 )
    CONNECT BY PRIOR region_code=parent_region_code)
    AND prof_com_text LIKE :P_SELECTED_INDUSTRY ';
    IF :P_SELECTED_CLUSTER <> '%' THEN
    lc_query := lc_query ||
    *' AND upper(ou_div_reg) LIKE ''*
    SUBSTR(:P_SELECTED_CLUSTER,1,INSTR(:P_SELECTED_CLUSTER,'';'',1,1)-1 )'' OR
    upper(ou_div_reg) LIKE ''
    SUBSTR(:P_SELECTED_CLUSTER,INSTR(:P_SELECTED_CLUSTER,'';'',1,1)+1,(INSTR(:P_SELECTED_CLUSTER,'';'',1,2) - (INSTR(:P_SELECTED_CLUSTER,'';'',1,1)-1) ) ) ''
    OR upper(ou_div_reg) LIKE ''
    SUBSTR(:P_SELECTED_CLUSTER,INSTR(:P_SELECTED_CLUSTER,'';'',1,2)+1,(INSTR(:P_SELECTED_CLUSTER,'';'',1,3) - (INSTR(:P_SELECTED_CLUSTER,'';'',1,2)-1) ) ) ''
    OR upper(ou_div_reg) LIKE ''
    SUBSTR(:P_SELECTED_CLUSTER,INSTR(:P_SELECTED_CLUSTER,'';'',1,3)+1,(INSTR(:P_SELECTED_CLUSTER,'';'',1,4) - (INSTR(:P_SELECTED_CLUSTER,'';'',1,3)-1) ) ) ''
    OR upper(ou_div_reg) LIKE ''
    SUBSTR(:P_SELECTED_CLUSTER,INSTR(:P_SELECTED_CLUSTER,'';'',1,4)+1,(INSTR(:P_SELECTED_CLUSTER,'';'',1,5) - (INSTR(:P_SELECTED_CLUSTER,'';'',1,4)-1) ) ) ''
    OR upper(ou_div_reg) LIKE ''
    SUBSTR(:P_SELECTED_CLUSTER,INSTR(:P_SELECTED_CLUSTER,'';'',1,5)+1,(INSTR(:P_SELECTED_CLUSTER,'';'',1,6) - (INSTR(:P_SELECTED_CLUSTER,'';'',1,5)-1) ) ) ''
    OR upper(ou_div_reg) LIKE ''
    SUBSTR(:P_SELECTED_CLUSTER,INSTR(:P_SELECTED_CLUSTER,'';'',1,6)+1,(INSTR(:P_SELECTED_CLUSTER,'';'',1,7) - (INSTR(:P_SELECTED_CLUSTER,'';'',1,6)-1) ) ) ''
    END IF;
    IF :P1_TIER2 <> '%' THEN
         lc_query := lc_query || ' AND INSTR('';''||upper(:p1_tier2)||'';'','';''||upper(T2)||'';'',1,1) > 0 ';
         END IF;
         IF :P1_TIER3 <> '%' THEN
              lc_query := lc_query || ' AND INSTR('';''||upper(:p1_tier3)||'';'','';''||upper(T3)||'';'',1,1) > 0 ';
         END IF;
         IF :P1_TIER4 <> '%' THEN
              lc_query := lc_query || ' AND INSTR('';''||upper(:p1_tier4)||'';'','';''||upper(T4)||'';'',1,1) > 0 ';
         END IF;
         IF :P_SELECTED_COUNTRY <> '%' THEN
         lc_query := lc_query || ' AND INSTR('';''||upper(:P_SELECTED_COUNTRY)||'';'','';''||upper(ou_ctry_code)||'';'',1,1) > 0 ';
         ELSE
         IF :P_IS_ADMIN = 'N' THEN
         lc_query := lc_query || 'AND ou_ctry_code IN (SELECT country_code
         FROM emea_pmr_user_countries
         WHERE INSTR('':''||:P_SELECTED_REGION||'':'','':''||region_code||'':'',1,1) > 0
         AND user_id = :P_SELECTED_USER_ID
         AND view_access = ''Y'') ';
         END IF;
    END IF;
    IF :P_TOPMARLOV='Current' THEN
    lc_query := lc_query || ' AND UPPER(ep_state_name)=''STARTED''';
    ELSIF :P_TOPMARLOV='Closed' THEN
    lc_query := lc_query || ' AND UPPER(ep_state_name)=''CLOSED''';
    END IF;
    IF:P1_MARGIN_STATUS='R' THEN
    lc_query := lc_query || ' AND
    UPPER(substr(PREV_CPS_RAGU_L_1,1,1))=''R''';
    ELSIF:P1_MARGIN_STATUS='G' THEN
    lc_query := lc_query || ' AND
    UPPER(substr(PREV_CPS_RAGU_L_1,1,1))=''G''';
    ELSIF:P1_MARGIN_STATUS='A' THEN
    lc_query := lc_query || ' AND
    UPPER(substr(PREV_CPS_RAGU_L_1,1,1))=''A''';
    ELSIF:P1_MARGIN_STATUS='U' THEN
    lc_query := lc_query || ' AND
    UPPER(substr(PREV_CPS_RAGU_L_1,1,1))=''U''';
    END IF;
    htp.p(lc_query);
    RETURN lc_query;
    END;

  • Need help with SQL retrieval for previous month till current date

    Hi ,
    Need help generating statistics from previous month from date of enquiry till current date of enquiry.
    and have to display it according to date.
    Date of enquiry : 03/02/2012
    Application Type| 01/01/2012 | 02/01/2012 | 03/01/2012 |...... | 31/01/2012 | 01/02/2012 | 02/02/2012 | 03/02/2012 |
    sample1 20 30 40
    sample 2 40 40 50
    sample 3 50 30 30
    Hope you guys can help me with this.
    Regards

    Hi,
    932472 wrote:
    Scenario
    1)If i run the query at 12 pm on 03/2/2012. the result i will have to display till the current day.
    2)displaying the count of the application made based on the date.
    Application type 01012012 | 02012012 | 03012012 | ..... 01022012| 02022012|03022012
    sample 1 30 40 50 44 30
    sample 2 35 45 55
    sample 3 36 45 55Explain how you get those results from the sample data you posted.
    It would help a lot if you posted the results in \ tags, as described in the forum FAQ. {message{id=9360002}
    SELECT     application_type as Application_type
    ,     COUNT (CASE WHEN created_dt = sysdate-3 THEN 1 END)     AS 01012012 (should be getting dynamically)
    ,     COUNT (CASE WHEN created_dt = sysdate-4 THEN 1 END)     AS 02022012
    ,     COUNT (CASE WHEN created_dt = sysdate-5 THEN 1 END)     AS 03022012
    , COUNT (CASE WHEN created_dt = sysdate-6 THEN 1 END)     AS 04022012
    FROM     table_1
    GROUP BY application_type
    ORDER BY     application_typeThat's the bais idea.
    You can simplify it a little by factoring out the date differences:WITH got_d     AS
         SELECT     qty
         ,     TRUNC ( dt
              - ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
              ) AS d
         FROM table1
         WHERE     dt     >= ADD_MONTHS ( TRUNC (SYSDATE, 'MON')
                        , -1
         AND dt     < TRUNC (SYSDATE) + 1
    SELECT     SUM (CASE WHEN d = 1 THEN qty END)     AS day_1
    ,     SUM (CASE WHEN d = 2 THEN qty END)     AS day_2
    ,     SUM (CASE WHEN d = 62 THEN qty END)     AS day_62
    FROM     got_d
    See the links I mentioned earlier for getting exactly the right number of columns, and dynamic column aliases.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need performance! - Need help with Server Architecture for SSAS on Azure VM

    I would like to build 100% Azure VM base solution. We can install as many as needed.
    I have large amount data in DW. (100GB-1000GB)
    I would like to provide PowerView reports in SharePoints.
    I would like to have report data be as real time as possible. (Min data is updated once in 2 hours)
    These are requirements:
    -SharePoint 2013
    -PowerView
    -SSAS OLAP Cube
    -SQL Server DW&Staging DB (Currently DW&Staging on same server)
    I need help specially what can be done with SSAS to meet requirements? Should be installed to own application server? Possible to install multiple SSAS? SSRS needs own server?
    I appreciate also links to server topology diagrams.
    Kenny_I

    I assume you mean 100GB-1000GB (not 1000TB) right?
    For Sharepoint I would refer to the sizing guide for diagrams and sizing:
    http://technet.microsoft.com/en-us/library/ff758647(v=office.15).aspx
    SSRS (and Power View) will run in the SharePoint farm on a SharePoint app server potentially with other SharePoint services.
    I would definitely put SSAS on a dedicated server for a cube that size. Depending on how well your data compresses, there may not be a VM in Azure with enough RAM to put your model into a Tabular SSAS model. I would prototype it with a subset of data to see
    how well it compresses. You can always use a Multidimensional model as a fallback.
    Depending on how much processing the SSAS model impacts user queries (since it is happening during the day) you could build an SSAS processing server and a separate SSAS query server and run the XMLA Synchronize command to copy the cube incrementally from processing
    to query servers.
    Does that help?
    http://artisconsulting.com/Blogs/GregGalloway

  • I need help with this tutorial from the Adobe website

    I'm almost done with my flash game which I created with flash pro cc. And i have been looking for tutorials to integrate my game to the Facebook and this is the only one I found. http://www.adobe.com/devnet/games/articles/getting-started-with-facebooksdk-actionscript3. html
    Am I on the right track?? The editor uses Flash Builder but I'm using Flash Pro cc.
    --- On Step 2: "Set up a development server for the Flash app",
            Sub-step #2. "To simplify the development process, configure Flash Builder to compile into your htdocs/fbdemo folder and run (or debug) the app on your server (see Figure 2)."
    1) But I can't find "ActionScript Build Path"(which is highlighted on the Figure 2 screenshot) or anything like that in Flash pro. Same for the "Output folder URL".
    Can I actually do the same things with Flash Pro cc?? Also #3 is "Verify that your app runs from your server." How do you run your app from your server??
    ---- On Step 4: "Initialize the Facebook JS SDK",
    2) so if I setup a server on a localhost just like the tutorial, I don't need to change the following? This is on line #6.
    channelUrl : 'www.YOUR_DOMAIN.COM/channel.html'
    can i just leave it like that ?
    3) So if I complete the tutorial, can facebook users play my game? or do i have more things to do?
    4) is there any other tutorial for Flash Pro CC to Facebook integration???
    Thank you so much for your help and time.

    this is an excerpt from http://www.amazon.com/Flash-Game-Development-Social-Mobile/dp/1435460200/ref=sr_1_1?ie=UTF 8&qid=1388031189&sr=8-1&keywords=gladstien
    The simplest way to hook into Facebook is to add their Plugins to add a Like button, Send button, Login button etc to your game.  If you only want to add a Like button to a page on your website, you can use the following iframe tag anywhere (between the body tags) in your html document where you want the Facebook Like button to appear:
    <iframe src="http://www.facebook.com/plugins/like.php?href=yoursite.com/subdirectory/page.html" scrolling="no" frameborder="0" style="border:none; width:500px; height:25px"></iframe> 
    Where the href attribute is equal to the absolute URL to your html file.  For example:
    <iframe src="http://www.facebook.com/plugins/like.php?href=kglad.com/Files/fb/" scrolling="no" frameborder="0" style="border:none; width:500px; height:25px"></iframe>
    points to index.html in kglad/com/Files/fb.
    However, to get the most out of Facebook you will need to use JavaScript or the Facebook ActionScript API and register your game on the Facebook Developer App page.  Before you can register your game with Facebook, you will need to be registered with Facebook and you will need to Login. 
    Once you are logged-in, you can go to https://developers.facebook.com/apps and click Create New App to register your game with Facebook.  (See Fig11-01.) 
    ***Insert Fig11-01.tif***
    [Facebook's Create New App form.]
    Enter your App Name (the name of your game) and click continue.  Complete the Security Check (see Fig11-02) and click Submit.  You should see the App Dashboard where you enter details about your game.  (See Fig11-03.)
    ***Insert Fig11-02.tif***
    [Security Check form.]
    ***Insert Fig11-03.tif***
    [App Dashboard with Basic Settings selected.]
    If you mouse over a question mark, you will see an explanation of what is required to complete this form.  Enter a Namespace, from the Category selection pick Games, and then select a sub-category. 
    Your game can integrate with Facebook several ways and they are listed above the Save Changes button. You can select more than one but for now only select Website with Facebook Login and App on Facebook, enter the fully qualified URL to your game and click Save Changes. (See Fig11-04.)
    ***Insert Fig11-04.tif***
    [Facebook integration menu expanded.]
    You can return to https://developers.facebook.com/apps any time and edit your entries.  Your game(s) will be listed on the left and you can use the Edit App button to make changes and the Create New App button to add another game.
    Click on the App Center link on the left.  (See Fig11-05a and Fig11-05b.)  Fill in everything that is not optional and upload all the required images. Again, if you mouse over the question marks you will see requirement details including exact image sizes for the icons, banners and screenshots.
    ***Insert Fig11-05a.tif***
    [Top half of the App Center form.]
    ***Insert Fig11-05b.tif***
    [Bottom half of the App Center form.]
    When you are finished click Save Changes and Submit App Detail Page.  You should then see Additional Notes and Terms. (See Fig11-06.)
    ***Insert Fig11-06.tif***
      [Additional Notes and Terms.]
    Tick the checkboxes and click Review Submission.  If everything looks acceptable, click Submit.  You should then see something like Fig11-07.
    ***Insert Fig11-07.tif***
      [After agreeing with Facebook's terms, you should be directed back to App Center and see this modal window.]
    You are now ready to integrate your game with Facebook's API.  Because there is a Facebook ActionScript API that communicates with Facebook's API, you need not work directly with the Facebook API.
    But before I cover Adobe's Facebook ActionScript API, I am going to cover how you can use the Facebook JavaScript API directly.  There no reason to actually do that while the Facebook ActionScript API still works but by the time you read this, the Facebook ActionScript API may no longer work.
    In addition, this section shows the basics needed to use any JavaScript API so it applies to any social network that has a JavaScript API including the next "hot" social network that will arise in the future.

  • I need help with viewing files from the external hard drive on Mac

    I own a 2010 mac pro 13' and using OS X 10.9.2(current version). The issue that I am in need of help is with my external hard drive.
    I am a photographer so It's safe and convinent to store pictures in my external hard drive.
    I have 1TB external hard drive and I've been using for about a year and never dropped it or didn't do any thing to harm the hardware.
    Today as always I connected the ext-hard drive to my mac and click on the icon.
    All of my pictures and files are gone accept one folder that has program.
    So I pulled up the external hard drive's info it says the date is still there, but somehow i can not view them in the finder.
    I really need help how to fix this issue!

    you have a notebook, there is a different forum.
    redundancy for files AND backups, and even cloud services
    so a reboot with shift key and verify? Recovery mode
    but two or more drives.
    a backup, a new data drive, a drive for recovery using Data Rescue III
    A drive can fail and usually not if, only when
    and is it bus powered or not

  • Need Help with mysql admin for Mac

    Hello all.
    I am new to cold fusion and databases all together. Infact I
    am doing an online tutorial to get me started, my problem is the
    tutorial really just scratches the surface for the mac side and in
    some cases sorta explains how to do but no visual help and I am
    very visual.
    I am searching for software that is really idiot proof to
    start my knowledge with then make the transition when I learn more
    and more to hard coding. The tutorial suggests Navicat for Mysql
    admin and it is nice but he is setting up basic databases in Access
    which looks really easy and I am trying to follow along with
    navicat but I am just not getting it specifically when it comes to
    setting up relationships between tables. Can I use a software like
    FileMaker Pro and just convert to mysql or is their other software
    that makes it a little more easy to understand how to set up
    relationships like access does.
    I am totally new to this stuff and I am looking for the
    easiest product to use. Thanks again for your help and time.
    Chris

    As for the database part, before you write your first query,
    you should become grounded in the concepts of data modeling. Then
    find a good source (book, books-on-line, etc. ) for the particular
    "flavor" of SQL used by your database of choice, then start writing
    your queries. Data model first (entities, relationships,
    attributes), then SQL.
    Couple of fairly good online tutorials for data modeling.
    Introduction
    to Data Modeling and
    Data Model
    Reference
    Master this and you will save yourself many hours of grief,
    trust me.
    Phil

  • Need help with set up for extensions

    I'm new to OA Framework development and am just ramping up (do have years of Java development experience) and could use some help. I've read through the OA Framework Developer Guide and gone through a few of the tutorials. My task is to add some extensions to the R12 Customer Standard pages.
    I've looked in the $JAVA_TOP at the following directory structure.
    /oracle/apps/ar/cusstd/...
    I find java classes and the server.xml files but there are no PG.xml files to work with. Are these located in a different structure? What is the best approach to obtaining the base Oracle source files to start with and for configuring your local development environment to extend R12 OA Framework pages? Do you need to include the entire $JAVA_TOP in your development client environment classpath as well?
    Thanks in advance!

    To run the oracle seeded party create/update page, you can refer &lt;&lt;your Jdeveloper Installation directory&gt;&gt;\jdevhome\jdev\myhtml\OA_HTML\test_fwktutorial.jsp.
    Create a new custom jsp similar to test_fwktutorial.jsp. Modify this JSP based on your environment and user setup. Modify the links also. With this, you should run this jsp first. By clicking the link in the JSP run, you can launch party create page.
    The error you posted in RED color is thrown because you are trying to modify the web bean hierarchy in the processFormData method. Example, setting some items property to rendered false or true. All these kind of modifications should be done in the proceeRequest method of the controller.
    Following is from DEV guide to launch the forms application.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Launching Oracle Applications Forms from OA Framework Pages
    To launch an Oracle Applications form from OA Framework, you must first define a button, link or image web
    bean. The web bean then relies on the FormsLauncher applet provided by Oracle Applications (AOL/J) to
    launch the specified form.
    Declarative Implementation
    Step 1: In the OA Extension Structure pane, select the region in which you want to create the web bean to
    launch an Oracle Applications form. Choose New > Item from the context menu.
    Step 2: Set the ID property for the item, in accordance with the OA Framework File Standards, and set the Item
    Style property to button, image, or link. You may also launch an Oracle Applications form from a submit
    button. See the Runtime Control section below for more details.
    Step 3: Set the Destination URI property of the item with a value following this format (replacing the italicized
    text as appropriate):
    form:responsibilityApplicationShortName:responsibilityKey:securityGroupKey:functionName
    For example, if you want to launch the FND Menus form, the Destination URI property should be set to:
    form:SYSADMIN:SYSTEM_ADMINISTRATOR:STANDARD:FND_FNDMNMNU
    Step 4: If you wish to pass parameters to the form, set the Destination URI property with a value using the
    following format (Note that the parameter list is delimited by a space between each "parameter=value" pair):
    form:responsibilityApplicationShortName:responsibilityKey:securityGroupKey:functionName:param1=
    value1 param2=value2 param3=value3
    Note: If you wish to send varchar2 parameter values that contain spaces, use \" to enclose the string value.
    For example, to pass in something of the form:
    TXN_NUMBER=LT INVOICE 1
    Use:
    TXN_NUMBER=\"LT INVOICE 1\"
    Step 5: Refer to the following Chapter 4 topics for information about additional properties you may need to set
    for the specific item: Buttons(Action/Navigation), Buttons (Links), or Images in Your Pages.
    *Runtime Control*
    There are no special programmatic steps necessary to launch an Oracle Applications form from a button,
    image, or link in an OA Framework page. The OAButtonBean, OALinkBean and OAImageBean support the
    special form function URL format described above for the Destination URI property. When OA Framework
    encounters this special value, it generates the appropriate URL and also adds a hidden IFrame (inline frame)
    to the OA Framework page. The hidden IFrame is the target of the FormsLauncher applet provided by Oracle
    Applications.
    Launching an Oracle Applications Form From a Submit Button
    If you wish to launch an Oracle Applications form from a submit button in an OA Framework page, you must
    use the OAPageContext.forwardImmediatelyToForm(String url) method from
    548
    oracle.apps.fnd.framework.webui.OAPageContext. An example of how to use this API is shown in the code
    sample below:
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    if (pageContext.getParameter("Apply")!=null)
    String destination =
    "form:SYSADMIN:SYSTEM_ADMINISTRATOR:STANDARD:FND_FNDMNMNU";
    pageContext.forwardImmediatelyToForm(destination);
    *Usage Notes*
    Microsoft Internet Explorer supports the IFrame element, so when you launch an Oracle Applications form from
    OA Framework, only a splash window appears. Any other windows required by the FormsLauncher applet
    use(s) the hidden IFrame as the target and therefore remain(s) hidden from the user. Netscape Navigator, on
    the other hand, does not support the IFrame element, so in addition to a splash window, the user also sees
    another window used by the FormsLauncher applet.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    let me know if you got struck.

  • Need help with designing form for exports

    Hi
    I am pretty new to designing form in adobe acrobat.
    I have adobe acrobat 9 standard with Adobe liveCycle Designer installed.
    There are couple of things I want to do.
    1.
    I would like to add a box where I can change the number (default is 1), and when I increase it, (for instance to two)
    then
    it will postulate the particular sections twice.
    For instance, I am taking two drugs right now, then I would like to increase the number of drugs to 2, so then for each drug
    I would enter appropriate information such as drug name, drug form, route of drug administration etcs
    I hope this is clear
    2.
    I am trying to export this in xml format so that only the ones where the user fills in in pdf form gets exported to xml format.
    I would like the boxes to have its own tag, for instance the drug name mentioned above can have a tag of <drugname></drugname>
    I know this is possible through changing the box's name in binding tab.
    What I am interested in is to add a tag for the section, like a header.
    For example, if I were to enter two drug information I want the first drug information to be exported to be
    <drug>
    <drugname>blah</drugname><drugform>1</drugform><drugroute>oral</drugroute>
    </drug>
    <drug>
    <drugname>drug2</drugname><drugform>1</drugform>
    <drugroute>ophthalmic</drugroute>
    </drug>
    how would I add <drug> </drug> for each drug?
    also, can I change the order of the tags??
    in the pdf form, if the drugname box is displayed later than drugroute box, then when I export it, it will display as
    <drugroute>oral</drugroute><drugname>blah</drugname>
    but I want to manually set the order of tags when exported.
    Sorry I asked so many questions
    I hope it is clear enough for you to visualize what I am trying to do
    Thank you so much

    1. You can certainly add sections for the number of drugs that the user specifies pr
    ovided that the form is set up the correct way to begin with. The drug information section must be wrapped in a subform (usually Poistioned) and that in turn must be wrapped in a flowed subform. Then the form must be saved as dynamic. If this information is all that is on the form then that shoudl be all you need to do. If th edrug section is in the middle of the form then you need to wrap the other parts of the form in a subform so they can be pushed down when we add the drug subforms. It can get confusing ...seeing the form amnd its structure would help to clarify.
    2. You canbnot change the names of tags on the fly but you can change their values. AS mentioned above, when you wrap the Drug information in a subform that subform name can be used as a tag in the XML. Then you could have a node with the tag (or an attribute) that names the drug in question. Something like this:
    <Drug Section>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug Subform>
         <Drug>
              <DrugName></DrugName>
              <Dossage></Dossage>
              <Supplier></Supplier>
         </Drug>
    </Drug Section>
    As mentioned earlier this is always easier to explain when you see it in context of your form.....if you want to send it to me at [email protected] I can get you started at least. Please include a description of your issue in the email
    Paul

  • Need help with finding a workaround: the shotcut ctrl+click opens 2 tabs in my case

    Hello!
    I have several links with an onclick event, which contains some javascript handling and window.open() after it, and they have attribute href="javascript:void(0);" as well.
    When user try Ctrl+click Firefox opens him 2 tabs: the first one with "right" content and the second with javascript:void(0).
    I've tried to set href="#" and in this case Ctrl+click works as I want, but on the original tab the user is redirected by the browser to the top of the page. The empty attribute (href="") also results 2 tabs. Maybe there is some value of the href attribute with which everything will work as I want? I've fed up with this and will be appreciated a lot if you help. Thanks.
    == This happened ==
    Every time Firefox opened
    == User use Ctrl+click

    I won't be searching thru all that code to try to find something relevant to your post, but if you are using a Loader to load the images, you can get the width and height as soon as the loading is complete using the loader object (loader.width, loader.height).  You just need to wait until loading is complete, so you'll need a listener for that if you don't have one already.

Maybe you are looking for