Need help in Logic to Concat

Hello everyone,
This is the requirement,
I have a table like this below :
Actual table: Item_Seller
item_id
seller_name
12310450
Pro Team
12310450
CSNStores.com
12310451
CSNStores.com
12310452
CSNStores.com
12310452
Pro Team
12310453
Pro Team
12310691
CSNStores.com
12310691
Pro Team
12310692
CSNStores.com
12310692
Pro Team
The requirement is to concatenate seller_name in the table like below output, this should not be performed using a stored procedure. I need help in writing a select query to display the below output.
Item_id
sellername_concat
12310450
Pro Team,CSNStores.com
12310451
CSNStores.com
12310452
CSNStores.com,Pro Team
12310453
Pro Team
12310691
CSNStores.com,Pro Team
12310692
CSNStores.com,Pro Team
Any help would be much appreciated!
Thanks
Madhumathi

Just this would be enough 
SELECT item_id,
STUFF((SELECT ',' + seller_name
FROM Item_Seller
WHERE item_id = t.Item_id
FOR XML PATH(''),TYPE).value('.','varchar(max)'),1,1,'') AS SellerName_Concat
FROM (SELECT DISTINCT item_id FROM Item_Seller)t
see
http://visakhm.blogspot.in/2014/01/rowset-concatenation-with-special.html
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • Need help on logic/ coding

    Dear all,
    I need help on , How to compare two lists? I wrote the following code. but I'm not success. please help.
    declare
    rec_cnt number;                             --This for getting first record set count
    pd_cnt  number;                              -- This for getting second  record set count
    flg_tst char(1):='F';                      -- this flag  is set to false.
    begin             
          go_block('block1');                     -- In this block displays my first  list         
          last_record;                                 -- cursor Point out the last record.
          rec_cnt := :system.cursor_record;        -- here getting total number of records in the first list
          go_block('block2');                        -- In this block displays my second  list        
          last_record;                                 -- cursor Point out the last record.
          pd_cnt := :system.cursor_record;        -- here getting total number of records in the  second list
          begin   
               /* go_block('block1');
               first_record; */
               for i in 1..rec_cnt
               loop                                         /* Here my comparison  of records going on. for every record in  first list there  should be
                                                           corresponding record in second record.
                                         otherwise should throw message.
                                         suppose if one record is not matched then the control should exit from the two loops and throws the message */
                      go_block('block1');                              
                      go_record(i);
                      go_block('block2');
                      first_record;
                         for j in 1..pd_cnt
                         loop
                               if :block1.TEST_ID =:block2.TEST_CODE then     /*If two records match set the flag as True and exit from second loop. there is no need to further check. */
                                        flg_tst := 'T';                /* And loops should take next record from second list, again loops goes for second list record matching */
                                        exit;
                                  else
                                       if j != pd_cnt then       /*not match then compare with next record of the second record */                            
                                           next_record;
                                       end if;          
                                  end if;    
                         end loop;   
                      if (flg_tst := 'F' and j=pd_cnt) then     /*suppose one record in first list is not equal with all records in second list,exit from second loop and shows message */
                   exit;
                      elsif (flg_tst := 'F' and i != rec_cnt) then
                               next_record;
                      else
                           exit;
                      end if;   
                end loop;
               if flg_tst = 'F' then
                            message('For mu test no corresponding test code');                  
                      end if;
              /* Exception when others then
               message('HI:=  '||sqlerrm);
               message('HI:=  '||sqlerrm); */
          end ;
    end;
          My problem is :
    1. we should take one record from firstlist and compare with all records in second list.
    --> suppose match then,we should continue for next record for first list.
    -->not match then exit from two loops and shows error.
    2. we should compare all the records in first list with all records in second list.
    Thanks
    SB
    Edited by: SB on Dec 7, 2011 1:31 AM

    Hi all,
    Now I've changed my query as follows,
    PROCEDURE testing IS
    rec_cnt number:=0;
    pd_cnt  number:=0;
    flg_tst char(1);
    begin
          go_block('med_uw');
          last_record;
          rec_cnt := :system.cursor_record;
          go_block('panel_doctor');
          last_record;
          pd_cnt := :system.cursor_record;
          message('rec_cnt'||rec_cnt||'  '||'pd_cnt'||pd_cnt);
          message('rec_cnt'||rec_cnt||'  '||'pd_cnt'||pd_cnt);
           begin
               for j in 1..pd_cnt
               loop
                      flg_tst:='F';
                      go_block('panel_doctor');
                      go_record(j);
                      go_block('med_uw');
                      first_record;
                         for i in 1..rec_cnt
                         loop 
                                    if :block2.TEST_ID =: block1.TEST_CODE then
                                        flg_tst := 'T';
                                        exit;
                                  else
                                       next_record;
                                end if;          
                         end loop;   
                      if (flg_tst = 'F')then
                              exit;
                         else
                           next_record;
                      end if;   
               end loop;
            if flg_tst = 'F' then
                                message('For'||'  '||:block1.PD_DOC_CODE||' '|| 'doc code med test has not been added, please add the test or delete the doc code');                  
            end if;
          end ;
    end;
          but still the problem persist.
    Edited by: SB on Dec 7, 2011 5:22 AM

  • Noob needs help with Logic and Motu live setup.

    Hello everyone,
    I'm a noob / semi noob who could use some help with a live setup using 2 MOTU 896HD's and Logic on a Mac.
    Here's the scenario:
    I teach an outdoor marching percussion section (a drumline and a front ensemble of marimbas and vibes). We have an amazing setup of live sound to amplify and enhance the mallet percussion. There is a yamaha PA system with 2 subs and 2 mains which are routed through a rack unit that processes the overall PA balance. I'm pretty sure that the unit is supposed to avoid feedback and do an overall cross-over EQ of the sound. Other then that unit, we have 2 motu896hd units which are routed via fire-wire. I also have a coax cable routing the output of the secondary box to the input of the primary box (digital i/o which converts to ADAT in (i think?)..?
    Here's the confusion:
    There are more then 8 inputs being used from the ensemble itself, so I need the 16 available inputs to be available in Logic. I was lead to believe that the 2nd motu unit would have to be sent digitally to the 1st motu unit via coax digital i/o. Once in Logic, however, I cannot find the signal or any input at all past the 8th input (of the 1st unit).
    Here's the goal:
    All of my performers and inputs routed via firewire into a Mac Mini running OSX and Logic pro.
    I want to be able to use MainStage and run different patches of effects / virt. instruments for a midi controller keyboard / etc.
    I want to be able to EQ and balance the ensemble via Logic.
    Here's another question:
    How much latency will I be dealing with? Would a mac mini with 4gb of ram be able to handle this load? With percussion, I obviously want the sound as latency free as possible. I also, however, want the flexibility of sound enhancement / modification that comes with Logic and the motu896hd units.
    Any help would be REALLY appreciated. I need the routing assistance along with some direction as to whether or not this will work for this type of application. I'm pretty certain it does, as I have spoken with some other teachers in similar venues and they have been doing similar things using mac mini's / logic / mainstage / etc.
    Thanks in advance,
    Chris

    You'll definitely want to read the manual to make sure the 896HDs are connected together properly. ADAT is a little tricky, it's not just a matter of cabling them together. Go to motunation.com if you need more guidance on connecting multiple devices. Beyond that initial hookup, here are a couple of quick suggestions:
    1. Open CueMix and see if both devices are reported there. If not, your connections aren't correct. Be sure to select 44.1kHz as your sample rate, otherwise you are reducing the number of additional channels. For instance at 88.2kHz you would get half the additional channels via ADAT.
    2. You may need to create an aggregate device for the MacBook to recognize more than the first 896HD. Lots of help on this forum for how to do that. Again, first make sure you have the 896HDs connected together properly.
    3. As for latency with Mainstage on the Mini, no way to know until you try it. Generally MOTU is fantastic for low latency work but Mainstage is a question mark for a lot of users right now. If the Mini can't cut the mustard, you have a great excuse to upgrade to a MacBook Pro.

  • Need help authorizing Logic Pro 7

    Hello everyone,
    I have purchased a version of Logic Pro 7.
    I have the install and content dvd's and XSkey. When I install the software and launch the program it is asking for an activation code which I do not have.....Can someone please help?
    I need to find the answers to how i can get a new code from the XSkey to authorize the program.
    The guy that i purchased from said that this is all i should need.
    I have read the same on several blogs...
    Need info on how to make this work.
    Thanks
    SP

    That means the XSKey never got a final license and that the demo expired. There were only two possible options:
    The XSKey is damaged. You could have used the XSKey Updater http://support.apple.com/kb/TA23387 to check and repair the XSKey, if needed. That said: the XSKey servers http://xskey.apple.com are long gone and so this doesn't work anymore.
    Return the copy and say that it doesn't contain a full license.
    Sorry. I hope you didn't spend a significant amount of money on it (considering that Logic Pro 9 only cost $199)

  • Need help with Logic Error(I think?)

    Hello. The following is a program I am creating to calculate the start value of a gymnastics routine, the basics are as follows(And not everything is implemented yet):
    In gymnastics there are the aparatuses, then skill group codes, then "skills" a-g or something like that(My brother is the gymnast, i'm the programmer). Basically as of right now im testing the logic of actually adding up the values based on which option they choose, since the options are strings, i set the strings into an array and then i have a score value array(Values are random at this point).
    The problem is, the totalvalue(i think its called that) number is not showing up. There is something wrong in the way i order the things.
    This compiles PERFECTLY and runs, and everything is right except the showing up of a number which should show when you choose options in the combo boxes.
    Here is the code, help please :)!!!
    Main:
    //GymnasticsMain.java
    //The Main top program - calls the panels.
    //By: Ian Coolidge
    //June 5, 2007
    import javax.swing.*;
    public class GymnasticsMain
         //Calls all the panels, they can be found under their names
         public static void main (String[] args)
          JFrame frame = new JFrame ("Gymnastics Super Program");
          frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
          GymnasticsControls controlPanel = new GymnasticsControls();
          frame.getContentPane().add(controlPanel);
          frame.pack();
          frame.setVisible(true);
    }The Guts of the program:
    //GymnasticsCrontrols.java
    //This creates the actual guts of the program, you know, the buttons and menus and the such
    //By: Ian Coolidge
    //June 5, 2007
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.net.URL;
    import java.lang.*;
    public class GymnasticsControls extends JPanel
         private JComboBox GymApparatus;
         private JComboBox GymGroupCode;
         private JLabel label;
         private JLabel scoreLabel;
         private double currentApparatus;
         private double currentCode;
         private String ScoreLine;
         private double TotalValue;
         private double[] score = new double[20];
         public GymnasticsControls()
         score[0] = 1.2;
         score[1] = 1.4;
         score[2] = 0.5;
         score[3] = 0.2;
         score[4] = 2.2;
         score[5] = 0.7;
         score[6] = 0.2;
         score[7] = 0.2;
         score[8] = 6.2;
         score[9] = 3.2;
         score[10] = 2.2;
         score[11] = 0.76;
         score[12] = 0.378;
         score[13] = 0.87;
         score[14] = 0.19784;
         score[15] = 0.1278;
         score[16] = 0.2834;
         score[17] = 0.3534;
         score[18] = 0.323;
         score[19] = 0.45;
              ScoreLine = "Your starting value is: "+TotalValue;
              scoreLabel = new JLabel(ScoreLine);
              //The following is the declaration of the list of options in the drop down menus
              String[] Apparatus = {"Apparatus", "Floor", "Pommel", "Vault", "Rings", "PBars", "High Bar"};
              GymApparatus = new JComboBox (Apparatus);
              GymApparatus.setAlignmentX (Component.LEFT_ALIGNMENT);
              String[] GroupCode = {"Group Code", "I", "II", "III", "IV", "V"};
              GymGroupCode = new JComboBox (GroupCode);
              GymGroupCode.setAlignmentX (Component.LEFT_ALIGNMENT);
              //Sets up the panel
              add (scoreLabel);
              setPreferredSize (new Dimension (300, 100));
              setBackground (Color.cyan);
              setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymApparatus);
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymGroupCode);
              add (Box.createRigidArea (new Dimension(0,5)));
              GymApparatus.addActionListener (new ComboListener());
              GymGroupCode.addActionListener (new ComboListener());
              TotalValue = currentApparatus + currentCode;
              private class ComboListener implements ActionListener
                   public void actionPerformed (ActionEvent event)
                        //Should assign a number based on the number string to whatever is chosen in the drop down menu
                        currentApparatus = score[GymApparatus.getSelectedIndex()];
                        currentCode = score[GymGroupCode.getSelectedIndex()];
    }I tried moving stuff all around, and it still doesn't work. Thanks very much for all the help!
    -Ian

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.applet.AudioClip;
    import java.net.URL;
    import java.lang.*;
    public class GymnasticsControls extends JPanel
         private JComboBox GymApparatus;
         private JComboBox GymGroupCode;
         private JLabel label;
         private JLabel scoreLabel;
         private double currentApparatus;
         private double currentCode;
         private String ScoreLine;
         private double TotalValue;
         private double[] score = new double[20];
         public GymnasticsControls()
         score[0] = 1.2;
         score[1] = 1.4;
         score[2] = 0.5;
         score[3] = 0.2;
         score[4] = 2.2;
         score[5] = 0.7;
         score[6] = 0.2;
         score[7] = 0.2;
         score[8] = 6.2;
         score[9] = 3.2;
         score[10] = 2.2;
         score[11] = 0.76;
         score[12] = 0.378;
         score[13] = 0.87;
         score[14] = 0.19784;
         score[15] = 0.1278;
         score[16] = 0.2834;
         score[17] = 0.3534;
         score[18] = 0.323;
         score[19] = 0.45;
              ScoreLine = "Your starting value is: "+TotalValue;
              scoreLabel = new JLabel(ScoreLine);
              //The following is the declaration of the list of options in the drop down menus
              String[] Apparatus = {"Apparatus", "Floor", "Pommel", "Vault", "Rings", "PBars", "High Bar"};
              GymApparatus = new JComboBox (Apparatus);
              GymApparatus.setAlignmentX (Component.LEFT_ALIGNMENT);
              String[] GroupCode = {"Group Code", "I", "II", "III", "IV", "V"};
              GymGroupCode = new JComboBox (GroupCode);
              GymGroupCode.setAlignmentX (Component.LEFT_ALIGNMENT);
              //Sets up the panel
              add (scoreLabel);
              setPreferredSize (new Dimension (300, 100));
              setBackground (Color.cyan);
              setLayout (new BoxLayout (this, BoxLayout.Y_AXIS));
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymApparatus);
              add (Box.createRigidArea (new Dimension(0,5)));
              add (GymGroupCode);
              add (Box.createRigidArea (new Dimension(0,5)));
              GymApparatus.addItemListener(new ComboListener());
              GymGroupCode.addItemListener(new ComboListener());
              TotalValue = currentApparatus + currentCode;
              private class ComboListener implements ItemListener
                   public void itemStateChanged(ItemEvent event)
                        //Should assign a number based on the number string to whatever is chosen in the drop down menu
                        currentApparatus = score[GymApparatus.getSelectedIndex()];
                        currentCode = score[GymGroupCode.getSelectedIndex()];
                        TotalValue = currentApparatus ;
                        scoreLabel.setText("Your starting value is: " + TotalValue);
    }Check the above modified code. Its an example. ItemListener added instead of ActionListener

  • Need help in Logic to how to use dates

    i need to generate a report using JSP where i need to get the deatials of all the employes in who have worked on a project in a particular month and the count the no of days he had worked for the project in that particular month
    input will be given as november 2005
    can ne one help me out plz

    <%
    int month=Integer.parseInt( request.getParameter("month"));
    int year=Integer.parseInt(request.getParameter("year"));
    int count=0;
    Vector v1 =new Vector();
    String From=null;
    String To=null;
    Calendar cal = null;
    if(month == 12){
         To= month+"/01/"+year;
         year = year+1;
         From = 1+"/01/"+year;
         else
              To=month+"/"+01+"/"+year;
              month=month+1;
              From=month+"/"+01+"/"+year;
         try
         Class.forName("hi");
         Connection Con=DriverManager.getConnection("l","i","i");
         Statement St=Con.createStatement();
         String Query="select c.empid,c.empname,a.fromdate,a.todate, b.ccvalue,b.cclink from pcctrans a , pccval b,pempmast c where b.ccid = a.cc2 and a.eid = c.eid and a.fromdate < '"+From+"' and a.todate > = '"+To+"' order by b.ccvalue ";
         ResultSet rs=St.executeQuery(Query);
         while(rs.next())
         v1.add(rs.getString(1));
         v1.add(rs.getString(2));
         java.sql.Date d= rs.getDate(3);
         java.sql.Date d1= rs.getDate(4);
         cal=new GregorianCalendar(year, month, 01) ;
         if(d.getMonth()<=month && d1.getMonth()>=month)
              count=cal.getActualMaximum(cal.DAY_OF_MONTH );
         System.out.println(count);
         v1.add(d);
         v1.add(d1);
         v1.add(new Integer(count));
         v1.add(rs.getString(5));
         v1.add(rs.getString(6));
         catch(Exception e)
              e.printStackTrace();
         for(int i=0;i<v1.size();i++)
              out.println(v1.get(i));
         }

  • NEED HELP : MacOSX / Logic pro 8 / M-audio Firewire 410

    Hi,
    I'm in complete distress right now.
    I have a big problem and I really don't know what it is.
    I'm a professional musician and I have a kind of buzz on my hardware. Every time i try to record on my logic ...I have a buzz. Please check this link where you can hear what I'm talking about. I putted an explanation and some example on a mp3 player to make you understand better my problem.
    http://www.gemi-productions.com/yuli/squizz/index.html
    If you have any idea please let me know.
    My MAC configuration :
    Mac book pro OSX 10.4.11 / 2.4 Ghz intel core duo / 2Go 667 Mhz DDR2
    Sound card M-Audio Firewire 410 / Logic Pro 8
    I have all the lasted Mac update !
    Thx a lot for your help.
    Nailian.

    Hi,
    Back from my "rescue mission" ...
    Firstable, to answer the last post, yes I tried on different computers but it was windows PC.
    Anyway, I tried ...older drivers (1.8/1.7/1.7.2) ...not working.
    I tried to close airport (not bluetooth cause my mouse use it) ...not working.
    So I decided to buy and install Leopard ...and it's working great.
    In fact, after some research my problem was a frequency problem who came from a disfunction between my card and my mac. But why this problem ...because of apple !!!
    Yes It seems the last security update 2008-002 from apple can not be "trusted"
    Bring a lot of problem ...as mine.
    So maybe I bought leopard for nothing ...but is great too so I'm ok
    Thx again for all your ideas.
    See u.
    N.

  • I need help in logical system name in business system

    i created two business system with same logical system name and now am getting error in ID when i try to activate business system"" Logical system LSSUN already exists in service | BS_RCVESUN"" So,i again changed a logical system name in SLD and tried to activate it again but changes is not reflected back in ID.again it show logiacal system alredy exists.
    pls giv me a steps to reflect changes back in ID.
    thanks & Regards
    Manikandan Shanmugam

    open BS in edit mode,
    choose from menu: Adepter Specific Identifiers
    Here you push button: Compare SLD data
    Save and activate

  • Need help in logic change to avoid select statement inside loop .

    Hello all ,
    Please see the below code . Here i got the shipment number in internal table  IT_VTTK . So For this shipment number i want to get the details from Vekp table in to internal table  IT_VEKP  . There is no need for me to use For all entries . I have passed the value of it_vekp into work area wa_vekp and getting the details in to IT_vekp using loop.
    But since we should not use the select statement inside the loop , Can anybody please tell me how to achieve this functionality .
    Instead of passing into work area wa_vttk if i directly use the internal table I'm getting the following error .
    "IT_VTTK" is a table without a header line and therefore has no component called "TKNUM".
    Hence i have used select statement inside a loop . Please tell me is there any other way to avoid this ?
    types:begin of ty_likp,
            vbeln type likp-vbeln,
           end of ty_likp,
           begin of ty_vttk,
            tknum type vttk-tknum,
            end of ty_vttk.
    DATA: IT_VEKP TYPE STANDARD TABLE OF TY_VEKP,
          WA_VEKP TYPE TY_VEKP.
      data:it_likp type standard table of ty_likp,
           wa_likp type ty_likp,
           it_likp1 type standard table of ty_likp,
           it_vttk type standard table of ty_vttk,
           wa_vttk type ty_vttk.
      data:w_tknum type vttk-tknum.
    if not it_likp is initial .
        select vbeln
                from
                 vbfa
          into table it_vttk
           for all entries in it_likp where vbelv = it_likp-vbeln and vbtyp_n = '8'.
      endif .
    IF IT_VTTK[] IS NOT INiTIAL.
        loop at it_vttk into wa_vttk.
        SELECT venum
               EXIDV
               EXIDV2
               BRGEW
               NTGEW
               GEWEI
               TARAG
               GEWEI
               VHART
               INHALT
             FROM VEKP INTO TABLE IT_VEKP where VPOBJKEY = wa_vttk-tknum  and vpobj = '4'.
          endloop.
          endif.

    Hello,
    Why would you not like to use FOR ALL ENTRIES in the second select? Is it becasue of the length or type mismatch error between the fields VPOBJKEY and wa_vttk-tknum ?
    Vikranth

  • Need help in logic

    Hi Guys
    please find  the below details
    drop table data purge;
    create table data ( eid number, name varchar2(20), email varchar2(40));
    insert into data values ( 1, 'sad','[email protected]');
    insert into data values (2, 'agony','[email protected]');
    insert into data values ( 3, 'misery','[email protected]');
    insert into data values (4, 'anguish','[email protected]');
    insert into data values (5, 'joy','[email protected]');
    insert into data values ( 6, 'happy','[email protected]');
    insert into data values ( 7, 'cheer','[email protected]');
    insert into data values ( 8, 'bliss','[email protected]');
    insert into data values (9, 'tear','[email protected]');
    commit;
    My requirement is based on email id ( gmail or yahoo) , i need to retrieve datas. for that i created the below procedure
    create or replace procedure proc_email (p_email  varchar2)
    is
    v_name varchar2(40);
    cursor c1 is select substr(email,1) from data where instr(email,p_email) >0 ;
    begin
    open c1;
    loop
    fetch c1 into v_name;
    exit when c1%notfound;
    dbms_output.put_line(v_name);
    end loop;
    end;
    exec proc_email ('yahoo')
    [email protected]
    [email protected]
    [email protected]
    My question
    1) i dont want to give hard code values like yahoo, gmail as  actual paramaters to call above procedure , any other way to call my  procedure
    2) how i restricts my o/p further
    [email protected]
    [email protected]
    remove [email protected] from o/p . only 2 rows for yahoo
    Thanks
    lvr

    user7191373 wrote:
    But my question is
    1) can i pass the actual paramener through cursor so that i can get o/p for all domain
    Sorry, but I did not get what you are asking for. Did you mean to say, you want to retrieve all the EMail ID's for a Domain viz. Yahoo which includes .Com and .Co.In?
    If Yes, then you already have the Solution.
    Using INSTR or using LIKE operator.
    Or, Did you mean to ask, you need to fetch all emails, irrespective of the input, for eg. Yahoo, GMail in your example?
    If yes, then you might have to add another parameter which does the job:
    create or replace procedure proc_email (p_email  varchar2, p_domain_indicator varchar2 default 'N')
    is
    v_name varchar2(40);
    cursor c1 is select substr(email,1) from data where instr(email,p_email) >0 or decode(p_domain_indicator, 'Y', 1, 0) = 1;
    begin
    open c1;
    loop
    fetch c1 into v_name;
    exit when c1%notfound;
    dbms_output.put_line(v_name);
    end loop;
    end;
    This way your Procedure call becomes:
    exec proc_email ('gmail');  --> Searches only GMail users
    exec proc_email ('', 'Y') ; --> Searches all Users (GMail, Yahoo [.com, .co.in])
    user7191373 wrote:
    2) i want to modify the procedure to restrict the o/p of  domain YAHOO
    i want to get o/p only those end with yahoo.com
    [email protected]
    [email protected]
    i dont want to get below row
    [email protected]'
    i hope you understand my question
    Is it only Yahoo, for which you want to restrict to .Com domain or you want to generalize it and restrict the search?
    I have provided one suggestion in my previous reply to Original Thread, please have a check on it. And do opt to ignore the suggestion of hard coding the domain. You may instead use a Parameter/Variable to do so. However, my advice would be to pass the domain in your parameter viz. yahoo.com, gmail.com etc.
    I hope this answers your question. If this does not, then please describe what you are looking for.

  • Need Help with Logic

    Am on 10G.
    Inside my Table there is a field for PHONE, but we have other fields like PHONE2, 3 and 4. Some are like HOME, some are for CELL, some for WORK, and OTHER.
    I am not sure if this can be done with a Case Statement in SQL, but what I am looking for is something like this:
    Select column 1, 2, 3, 4 (whatever they might be),
    Then for the Phone_Field: (not sure if I can do this with Case ?)
    If PHONE1 is not null and PHONE1 > ‘1’ then USE PHONE1
    ELSEIF PHONE2 is not null and PHONE1 > ‘1’ then USE PHONE2
    ELSEIF PHONE3 is not null and PHONE1 > ‘1’ then USE PHONE3
    ELSEIF PHONE4 is not null and PHONE1 > ‘1’ then USE PHONE4
    And if none of these PHONE1-4 field are valid, just assign a null value in the return for that field.
    Thank you!

    Kodiak_Seattle wrote:
    Wow, so like this ?
    COALESCE (PHONE1, PHONE2, PHONE3, PHONE4)
    So if PHONE1 was null and PHONE2 wasn't it would pick PHONE2 ?Yes, it will take the first NOT NULL value in the list, parsing from left to right.
    Am also looking for it to be proper as well, not just not null, it could be not null, but have a value of 111, not a valid phone number, can it do that ?
    No, it will not do that. That's what you have data validation for (you validate BEFORE putting data in the table :)
    Edited by: Tubby on Jan 11, 2010 4:55 PM

  • Need some help in logic

    Hi,
    Need help in logic..My requirement is to calculate percentage of marks based on their grade..for example if we have marks like M1,M2,M3,M4,M5 and grades like A1,A2 ,A3 ..when grade is A1.. I want percentage of marks for M1,M4 and when grade is A2 i need percentage of Marks for M2,M3,M4 ..all I need is when i select A1 grade in my Dashboard prompt Report should display percentage of marks for M1,M4 and when I select A2 percentage of marks for M2,M3,M4....please tell me logic/workaround..

    Hi,
    our Requirement is like below...
    when a particular person written a test in particular Technology(like oracle,java..)and every technology contains their own sub technologies....we need to calculate subtopics score Percentage depend on their grade in company for example if he is an "SE" then if he choose test for Oracle then we need calculate only some mandatory subtopics marks percentage....if we have only 2 or 3 technology I can calculate using some case statements but we have plenty of technology test and each have multiple subtopics....how to do mapping between their grade and sub technology scores.......

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Thanks

    Help urgently needed, I have installed Logic Pro 9, since then my Final Cut Pro X keep freezing. Anyone what is wrong and how to solve it? I desperately need help on this. Apple support says I have to pay £85 for to help me. Thanks

    Just a word of advice. Never ever use the word "urgent" on this forum

  • Dataguard - logical standby - need help - not updating data at commit

    Hi
    Need help ?
    We have logical standby setup where data is not updated at standby when committed at Primary. It only updates when alter system swith logfile.
    On Primary:
    log_archive_dest_2='service=xxStandby LGWR ASYNC valid_for=(online_logfiles,primary_role) db_unique_name=xxStandby'
    On Standby:
    we have already created standby redo logs ( 1+ # redo logs)
    we used ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE NODELAY;
    The data only ships when we do the ALTER SYSTEM SWITCH LOGFILE whereas it should so when data is commited on the primary.
    Is there anything we are missing or need attention.
    Please help
    Thanks you so much

    Yes, I have standby redo logs = ( 1 + # redo logs on the primary) and are of same size.
    I also changed the log_archive_dest_2 setting for valid_for to ALL_LOGFILES, but the performance is still very slow... we are now overr 9 hrs behind the primary.
    log_archive_dest_2='service=xxStandby LGWR ASYNC valid_for=(ALL_LOGFILES,primary_role) db_unique_name=xxStandby'
    The Logical standby performance reallly not good at all. trying to increase sga/pga more ... hoping this will speed up some
    Paul

Maybe you are looking for

  • Change After Effects Default Settings?

    Hello Smarties! My output settings from the render que are generally very similar...and completely different from the default settings.  Is there a way to CHANGE the default setting permanently? More detail is avaialble if you need it.

  • Integration Service will not start

    When I try to start the SAP Business One Integration Service will not start. Windows says it could not start the service... see the System Event log...if this is a non-Windows service, contact the service vendor. This is what the System Event error i

  • IWeb, iPhoto, .Mac Homepage, Photopages and Photocasts

    I'm on the Apple dope since about 2003 or so... Used to one-click publish photo albums from iPhoto that automatically went to my .Mac Homepage. This worked great. Recently upgraded to a newer generation of iLife - Enter iWeb - and now have a web.mac.

  • How can I replace my current spanish version of PS CC to a english one?

    I have a PS CC in spanish, but most of "Actions" available are in english and have problems translating them. I want to replace my current versión to an english one. How can I do it? Thanks Rene

  • How to truncate  schema1 table from schema 2 -URGENT

    Hi all Please tell me is there any grant like that regards