Need help on comma seperated vales

Hi,
I need a help on converting string parameter to column.
select jan, feb, mar,' a,b,c,d,e,f,g' from dual
to
select jan,feb,mar,a,b,c,d,e,f,g from dual
Thanks
--KP                                                                                                                                                                                                                                                                                                                                                                               

Assuming you're talking about a SQL statement in a stored procedure, you would need to use dynamic SQL, i.e.
EXECUTE IMMEDIATE 'SELECT jan, feb, mar, ' || ' a,b,c,d,e,f,g' || ' FROM dual' INTO ...Of course, since JAN, FEB, MAR, A, B, etc. are not columns in DUAL, the statement you are trying to build won't execute. I assume you meant to use a table in your database that does have all those columns.
There is also the question of what you're going to do with the query once you've executed it. Using EXECUTE IMMEDIATE would require that you know the number of columns you will be selecting in advance in order to be able to specify a list of variables to select the data into. If you don't know that, you'd need to use the DBMS_SQL package instead, which gets quite a bit more complicated. If there are multiple rows, you could open a cursor rather than doing a SELECT ... INTO, but you would again need to resort to DBMS_SQL if the number of columns is not known at compile time.
Justin

Similar Messages

  • How to retrieve comma seperated vales in the same column in Oracle SQL

    Dear Members
    Please provide me the solution to the below question
    Oracle table
    Ename Product
    A 1,2,3
    B 1,2,3
    Product column has data like that only separated by commas
    Output should be like this.
    Ename, Product
    A 1
    A 2
    A 3
    B 1
    B 2
    B 3
    Can we get the above output using Just Oracle SQL select statement?.
    I have tried in Google I got an answer in SQL server,it has something called “Cross apply split” function, I am not sure in Oracle.

    876639 wrote:
    Thanks for your answer, it's perfectly worked.Efficiency wise it is quite costly solution it builds hierarchy betwenn every row/level. As a result we end up building huge hierarchy while we need just few rows:
    with t as (
               select 'A' ename, '1' product from dual union
               select 'B', '1,2' from dual union
               select 'C', '1,2,3' from dual union
               select 'D', '1,2,3,4' from dual union
               select 'E', '1,2,3,4,5' from dual
    SELECT count(*),
           count(distinct ename || regexp_substr (product, '[^,]+', 1, level)) 
       FROM t
       CONNECT BY LEVEL <= LENGTH (REGEXP_REPLACE (product, '[^,]+'))  + 1
      COUNT(*) COUNT(DISTINCTENAME||REGEXP_SUBSTR(PRODUCT,'[^,]+',1,LEVEL))
           325                                                           15
    SQL> As you can see, code builds 325 row hierarchy while returns just 15 rows. The following solution builds exactly as many rows as we need:
    with t as (
               select 'A' ename, '1' product from dual union
               select 'B', '1,2' from dual union
               select 'C', '1,2,3' from dual union
               select 'D', '1,2,3,4' from dual union
               select 'E', '1,2,3,4,5' from dual
    SELECT  count(*),
            count(ename || regexp_substr(product,'[^,]+',1,column_value))
      FROM  t,
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= length(product) - length(replace(product,',')) + 1
                       as sys.OdciNumberList
      COUNT(*) COUNT(ENAME||REGEXP_SUBSTR(PRODUCT,'[^,]+',1,COLUMN_VALUE))
            15                                                          15
    with t as (
               select 'A' ename, '1' product from dual union
               select 'B', '1,2' from dual union
               select 'C', '1,2,3' from dual union
               select 'D', '1,2,3,4' from dual union
               select 'E', '1,2,3,4,5' from dual
    SELECT  ename,
            regexp_substr(product,'[^,]+',1,column_value)
      FROM  t,
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= length(product) - length(replace(product,',')) + 1
                       as sys.OdciNumberList
    E REGEXP_SU
    A 1
    B 1
    B 2
    C 1
    C 2
    C 3
    D 1
    D 2
    D 3
    D 4
    E 1
    E REGEXP_SU
    E 2
    E 3
    E 4
    E 5
    15 rows selected.
    SQL> SY.

  • Need help with complex query with comma seperated

    Oracle version - 11.1.0.7.0
    Consider there are two tables table1 and table2
    Key---- ID
    A ---- 1
    A ---- 2
    A---- 3
    B ---- 4
    B ---- 5
    C ---- 6
    C ---- 8
    C ---- 9
    C ---- 10
    D ---- 11
    D ---- 12
    Table2
    ID
    1
    2
    6
    8
    11
    12
    I need result as in usedID column I should get comma seperated list of ID which are in table1 and table2 and in NOTUSEDID comma seperated list of ID which are in table1 but not in table2
    Key---- USEDID---- NOTUSEDID
    A ---- 1,2 ---- 3
    B ---- null ---- 4,5
    C ---- 6,8 ---- 9,10
    D ---- 11,12 ---- null

    Hi!
    Solution for Oracle 11g:
    SELECT A.KEY,
           listagg(decode(b.id, null, null, a.id), ',') WITHIN GROUP (ORDER BY  A.ID) AS USEDID,
           listagg(decode(b.id, null, a.id), ',') WITHIN GROUP (ORDER BY  A.ID) AS NOTUSEDID
      FROM TABLE1 A
           LEFT OUTER JOIN table2 b
           ON (A.ID = b.ID)
    GROUP BY a.key;
    Solution for databases prior to Oracle 11g:
    Please note that the function wm_concat is undocumented and can't be sorted!
    SELECT A.KEY,
           wm_concat(decode(b.id, null, null, a.id)) AS USEDID,
           wm_concat(decode(b.id, null, a.id)) AS NOTUSEDID
      FROM TABLE1 A
           LEFT OUTER JOIN table2 b
           ON (A.ID = b.ID)
    GROUP BY A.KEY;I used the following test case:
    create table table1(key varchar2(255), id number);
    CREATE TABLE table2(ID NUMBER);
    insert into table1 values('A', 1);
    INSERT INTO table1 VALUES('A', 2);
    INSERT INTO table1 values('A', 3);
    INSERT INTO table1 VALUES('B', 4);
    INSERT INTO table1 VALUES('B', 5);
    INSERT INTO table1 VALUES('C', 6);
    INSERT INTO table1 values('C', 8);
    INSERT INTO table1 VALUES('C', 9);
    INSERT INTO table1 VALUES('C', 10);
    INSERT INTO table1 values('D', 11);
    insert into table1 values('D', 12);
    insert into table2 values(1);
    insert into table2 values(2);
    insert into table2 values(6);
    insert into table2 values(8);
    insert into table2 values(11);
    insert into table2 values(12);
    commit;Best regards,
    Matt
    Edited by: Matt Schulz on Oct 12, 2011 12:43 PM

  • 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

  • I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".

    Hello,
    I want to create stored procedure which will give output rows from "values that are passed as one parameter (comma seperated) to store procedure".
    Suppose , 
    Parameter value : person 1,person2,person3 
    table structure : 
    Project Name | officers 1 | officers 2
    here, officers 1 or officers 2 may contain names of multiple people.
    expected OUTPUT : distinct list(rows) of projects where person 1 or person 2 or person 3 is either officer1 or officer 2. 
    please explain or provide solution in detail 
    - Thanks

    Hi Visakh,
    Thanks for reply.
    But the solution you provided giving me right output only if officer 1 or officer 2 contains single value , not with comma seperated value.
    Your solution is working fine for following scenario : 
    Project 
    Officers 1
    Officers 2
    p1
    of11
    off21
    p2
    of12
    off22
    with parameter : of11,off22 : it will give expected output
    And its not working in case of :
    Project 
    Officers 1
    Officers 2
    p1
    of11,of12
    off21,off23
    p2
    of12,of13
    off22,off24
    with parameter : of11,off22 : it will not give any row in output
    I need patten matching not exact match :) 
    ok
    if thats the case use this modified logic
    CREATE PROC GetProjectDetails
    @PersonList varchar(5000)
    AS
    SELECT p.*
    FROM ProjectTable p
    INNER JOIN dbo.ParseValues(@PersonList,',')f
    ON ',' + p.[officers 1] + ',' LIKE '%,' + f.val + ',%'
    OR ',' + p.[officers 2] + ',' LIKE '%,' + f.val + ',%'
    GO
    Keep in mind that what you've done is a wrong design approach
    You should not be storing multiples values like this as comma separated list in a single column. Learn about normalization . This is in violation of 1st Normal Form
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Splitting comma seperated column data into multiple rows

    Hi Gurus,
    Please help me for solving below scenario. I have multiple value in single column with comma seperated values and my requirement is load that data into multiple rows.
    Below is the example:
    Source Data:
    Product         Size                                 Stock
    ABC              X,XL,XXL,M,L,S                 1,2,3,4,5,6
    Target Data:
    Product         Size                                 Stock
    ABC              X                                     1
    ABC              XL                                   2
    ABC              XXL                                 3
    ABC              M                                    4
    ABC              L                                      5
    ABC             S                                        6
    Which transformation we need to use for getting this output?
    Thanks in advance !

    Hello,
    Do you need to do this tranformation through OWB mapping only? And can you please tell what type of source you are using? Is it a flat file or a table?
    Thanks

  • Excel comma seperated .csv files save as semicolon seperated

    Hi
    I work with excel 360 student version danish and i'm trying to convert an siemens .xmls generated file to an .csv comma seperated file but excel save it as an semi colon though it's written in help file it should save it as an comma seperated file.
    Any solution on that what i would call a bug thats been there for over a year?

    Kent, I think you're posting a complaint about Excel, which is off topic for the TechNet Website Feedback forum. The best place to post that would be over at http://answers.microsoft.com in the office section.  Below is some boilerplate that
    I've written up that might also help you.
    Thanks,
    Mike
    Unfortunately your post is off topic here, in the TechNet Site Feedback forum, because it is not Feedback about the TechNet Website or Subscription.  This is only one forum among the many that are on the TechNet Discussion Forums, and given
    your post, you likely chose the wrong forum.  This is a standard response I’ve written up in advance to help many people (thousands, really.) who post their question in this forum in error, but please don’t ignore it.  The links I share below I’ve
    collected to help you get right where you need to go with your issue.
    For technical issues with Microsoft products that you would run into as an
    end user of those products, one great source of info and help is
    http://answers.microsoft.com, which has sections for Windows, Hotmail, Office, IE, and other products. Office related forums are also here:
    http://office.microsoft.com/en-us/support/contact-us-FX103894077.aspx
    For Technical issues with Microsoft products that you might have as an
    IT professional (like technical installation issues, or other IT issues), you should head to the TechNet Discussion forums at
    http://social.technet.microsoft.com/forums/en-us, and search for your product name.
    For issues with products you might have as a Developer (like how to talk to APIs, what version of software do what, or other developer issues), you should head to the MSDN discussion forums at
    http://social.msdn.microsoft.com/forums/en-us, and search for your product or issue.
    If you’re asking a question particularly about one of the Microsoft Dynamics products, a great place to start is here:
    http://community.dynamics.com/
    If you really think your issue is related to the subscription or the TechNet Website, and I screwed up, I apologize!  Please repost your question to the discussion forum and include much more detail about your problem, that could include screenshots
    of the issue (do not include subscription information or product keys in your screenshots!), and/or links to the problem you’re seeing. 
    If you really had no idea where to post this question but you still posted it here, you still shouldn’t have because we have a forum just for you!  It’s called the Where is the forum for…? forum and it’s here:
    http://social.msdn.microsoft.com/forums/en-us/whatforum/
    Moving to off topic. 
    Thanks, Mike
    MSDN and TechNet Subscriptions Support
    Did Microsoft call you out of the blue about your computer?
    No, they didn't.

  • How to query the comma seperated values stored in Database

    Hi,
    I have a strange scenario, I am storing the specific data as a comma seperated value in the database. I want to query the DB with the comma seperated value as a Bind variable against the comma seperated value stored in DB.
    For eg : The data stored in DB has
    Row1 - > 1,2,3,4,5,6,7,8
    Row2 - > 4,5,6,7,8,9,10
    When I pas the Bind variable as '4,8' I should get Row1 and Row2 .
    Quick help his highly appreciated.. Thanks in Advance

    Oh, and if you actually wanted the data returned rather than just the row primary keys....
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as rw, '1,2,3,4,5,6,7,8' as txt from dual union all
      2             select 2, '4,5,6,7,8,9,10' from dual union all
      3             select 3, '1,6,7,9' from dual)
      4  -- end of test data
      5      ,r as (select '4,8' as req from dual)
      6  -- end of required data
      7      ,split_t as (select rw, regexp_substr(txt, '[^,]+', 1, rn) as val
      8                   from t, (select rownum rn from dual connect by rownum <= (select max(length(regexp_replace(t.txt, '[^,]'))+1) from t))
      9                   where regexp_substr(txt, '[^,]+', 1, rn) is not null
    10                  )
    11      ,split_r as (select regexp_substr(req, '[^,]+', 1, rownum) as val
    12                   from r
    13                   connect by rownum <= length(regexp_replace(req, '[^,]'))+1
    14                  )
    15  --
    16  select distinct t.rw, t.txt
    17  from   split_t st join split_r sr on (st.val = sr.val)
    18                    join t on (t.rw = st.rw)
    19* order by 1
    SQL> /
            RW TXT
             1 1,2,3,4,5,6,7,8
             2 4,5,6,7,8,9,10
    SQL>

  • Create datastore for complex comma seperated file

    I am trying to integrate a comma seperated file to an Oracle database. The files contain multiple record types each of which have different number of fields and a different order of datatypes within those fields. The order that the records types are listed in the file determines the relationship between them, e.g.
    The file could contained the following record types in the order shown:
    Segment
    Fixture
    Position
    Position
    Segment
    Segment
    Fixture
    Position
    Position
    Position
    So there is a parent-child relationship between the Segement record and the Fixture record that immediately follows it and similarly the position records are child records to the Fixture record.
    How can I create datastores that represents this relationship when there is no parent field in the child record types?

    I dont think ODI would be able to help you much with Out of the box functionality. You will need to modify the LKM (SQLLDR) to achieve this.
    The following entry illustrates the logic:
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7526680049479]
    Hope that helps

  • Send mail as comma seperated file from abap

    Hi,
    i need to send mail from my program...as a comma seperated file...can u help me out.
    regards
    shankar

    See function module SO_NEW_DOCUMENT_ATT_SEND_API1, there is an example in the documentation. The example is for a .BMP file but you should be able to use the similar code for a text file (you might need to use object RAW). The content of comma-separated file must be in an internal table when you'll call this function module.
    There are also lots of examples available all over the Internet, use search by FM name.

  • Need to Convert Comma separated data in a column into individual rows from

    Hi,
    I need to Convert Comma separated data in a column into individual rows from a table.
    Eg: JOB1 SMITH,ALLEN,WARD,JONES
    OUTPUT required ;-
    JOB1 SMITH
    JOB1 ALLEN
    JOB1 WARD
    JOB1 JONES
    Got a solution using Oracle provided regexp_substr function, which comes handy for this scenario.
    But I need to use a database independent solution
    Thanks in advance for your valuable inputs.
    George

    Go for ETL solution. There are couple of ways to implement.
    If helps mark

  • Comp 3 new user needs help !! (please)

    Not sure which setting to use, have tried MPEG-2 5.0 2 pass and had no audio. Do I need to select audio seperately (eg AIFF 48-16).
    Anyway, now I can't seem to submit. I've daged and dropped the destination (desktop) and I've draged and droped the source (MPEG 2 and draged and dropped AIFF 48-16) and now as I try to submit I'm getting the message "One or more targets are incomplete-each target assigned to a job needs a setting and destination "---- which is what I thought I'd done.
    Am I missing something, it's driving me mad ..........many thanks

    Thanks Luke,
    I've just realised my mistake. The apple store in London couldn't help me, but I think I found the answer with the apple online Studio 2 tutorial, and yes, It automaticaly seperates video and audio, it's cooking right now so we'll see if I can get it into DVD SP fingers crossed. For anyone elses information in compressor 3 there is a lot of ctrl and clicking (or right clicking if you have that mouse) something I'm not used to with Macs !!

  • I need help with a VB Application

    I need help with building an application and I am on a tight deadline.  Below I have included the specifics for what I need the application to do as well as the code that I have completed so far.  I am having trouble getting the data input into
    the text fields to save to a .txt file.  Also, I need validation to ensure that the values entered into the text fields coincide with the field type.  I am new to VB so please be gentle.  Any help would be appreciated.  Thanx
    •I need to use the OpenFileDialog and SaveFileDialog in my application.
    •Also, I need to use a structure.
    1. The application needs to prompt the user to enter the file name on Form_Load.
    2. Also, the app needs to use the AppendText method to write the Employee Data to the text file. My project should allow me to write multiple Employee Data to the same text file.  The data should be written to the text file in the following format (comma
    delimited)
    FirstName, MiddleName, LastName, EmployeeNumber, Department, Telephone, Extension, Email
    3. The Department dropdown menu DropDownStyle property should be set so that the user cannot enter inputs that are not in the menu.
    Public Class Form1
    Dim filename As String
    Dim oFile As System.IO.File
    Dim oWrite As System.IO.StreamWriter
    Dim openFileDialog1 As New OpenFileDialog()
    Dim fileLocation As String
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    openFileDialog1.InitialDirectory = "c:\"
    openFileDialog1.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*"
    openFileDialog1.FilterIndex = 1
    openFileDialog1.RestoreDirectory = True
    If openFileDialog1.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
    fileLocation = openFileDialog1.FileName
    End If
    'filename = InputBox("Enter output file name")
    'oWrite = oFile.CreateText(filename)
    cobDepartment.Items.Add("Accounting")
    cobDepartment.Items.Add("Administration")
    cobDepartment.Items.Add("Marketing")
    cobDepartment.Items.Add("MIS")
    cobDepartment.Items.Add("Sales")
    End Sub
    Private Sub btnSave_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
    'oWrite.WriteLine("Write e file")
    oWrite.WriteLine("{0,10}{1,10}{2,10}{3,10}{4,10}{5,10}{6,10}{7,10}", txtFirstname.Text, txtMiddlename.Text, txtLastname.Text, txtEmployee.Text, cobDepartment.SelectedText, txtTelephone.Text, txtExtension.Text, txtEmail.Text)
    oWrite.WriteLine()
    End Sub
    Private Sub btnExit_Click(ByValsender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
    oWrite.Close()
    End
    End Sub
    Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click
    txtFirstname.Text = ""
    txtMiddlename.Text = ""
    txtLastname.Text = ""
    txtEmployee.Text = ""
    txtTelephone.Text = ""
    txtExtension.Text = ""
    txtEmail.Text = ""
    cobDepartment.SelectedText = ""
    End Sub
    End Class

    Hi Mikey81,
    Your issue is about VB programming, so Visual Basic forum is a better forum for your case. I moved this thread there,
    Thanks,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Need help with home work see what you got

    1. The MEMBERS table has the phone number broken into three fields:
       CountryCode - e,g., '1' for the United States
       AreaCode - e.g., three digits for the United States
       Phone - e.g., 7 digits, with or without a dash between the first three digits (Exchange) and last four digits (Line)
       Any or all of the fields may be missing (null) or blank or contain only spaces.
       Write a T-SQL statement to concatenate the three fields into a complete phone number
       with the format: CountryCode(AreaCode)Exchange-Line, e.g., 1(816)123-4567
       If no Phone is present, return a blank string.
       If no area code is present, return only the Phone number. Do not return an empty pair of parentheses or the CountryCode.
    2. The PERSON_CAMPAIGN table contains a row for each war/conflict the member served in. A member may have served in multiple conflicts
       For this purpose, each row contains:
       PersonID - unique member identifier
       Campaign - name of war/conflict
       Write a T-SQL statement to return one row per member with all campaigns concatenated into a single field and separated by commas
       E.g., PersonID    Campaigns
             12345678    Global War on Terror, Iraq, Afghanistan
    3. The MEMBER_STATISTICS table contains one row per post.
       For this purpose, each row contains the post's:
       Division - a way of grouping posts by their member size
       Department - the state in which the post is located
       PostNumber - unique post identifier
       Reinstated - count of members whose annual subscription had lapsed for at least two years but who have now subscribed for the current year
       Write a T-SQL statement to determine the top ten posts in each division based on the number of reinstated members, with a minimum of 50 reinstated members.
       Rank them by highest to lowest reinstated count.
       Return their Division, Rank, Department, PostNumber, Reinstated

    I got 3 home work questions think i have the first two need help with the last one please.
    Kinda stuck on #3 hard I can see data not sure witch to sum or count?
    1. The MEMBERS table has the phone number broken into three fields:
       CountryCode - e,g., '1' for the United States
       AreaCode - e.g., three digits for the United States
       Phone - e.g., 7 digits, with or without a dash between the first three digits (Exchange) and last four digits (Line)
       Any or all of the fields may be missing (null) or blank or contain only spaces.
       Write a T-SQL statement to concatenate the three fields into a complete phone number
       with the format: CountryCode(AreaCode)Exchange-Line, e.g., 1(816)123-4567
       If no Phone is present, return a blank string.
       If no area code is present, return only the Phone number. Do not return an empty pair of parentheses or the CountryCode.
    ANSWER******************
    Notes: created a funtion to format the phone 
    Then used the this function in a select to concatenate Phone 
     CREATE FUNCTION dbo.FORMATPHONE (@CountryCode int, @AreCode int, @Phone VARCHAR(14))
    RETURNS VARCHAR(14)
        AS BEGIN
           DECLARE @ReturnPhone VARCHAR(14)
           DECLARE @NewPhone VARCHAR(14)
    -- Note case sets newphone to null if phone null or '' also to see if phone has '-' in it if not inserts into newphone
           case 
                when @Phone is null or @Phone  = ''
                   Then SET @NewPhone = Null
                when @Phone = substring(@Phone,4,1)='-'
          Then SET @NewPhone = @Phone 
           else  
                SET @NewPhone = substring(@Phone,1,3)+'-'+ substring(@Phone,4,4)
           End     
           case 
                when @NewPhone is null then SET @ReturnPhone = @NewPhone            
           elese case
                    when @AreCode is null or @AreCode = '' then SET @ReturnPhone = @NewPhone
                 else 
          SET @ReturnPhone = @CountryCode + '(' + @AreCode + ')' +  @NewPhone
                END
           END
        RETURN @ReturnPhone 
    END
    select dbo.FORMATPHONE(CountryCode,AreCode,Phone)
    from MEMBERS 
    2. The PERSON_CAMPAIGN table contains a row for each war/conflict the member served in. A member may have served in multiple conflicts
       For this purpose, each row contains:
       PersonID - unique member identifier
       Campaign - name of war/conflict
       Write a T-SQL statement to return one row per member with all campaigns concatenated into a single field and separated by commas
       E.g., PersonID    Campaigns
             12345678    Global War on Terror, Iraq, Afghanistan
    ANSWER******************
    SELECT      PersonID,
                STUFF((    SELECT ',' + Campaign AS [text()]
                            FROM PERSON_CAMPAIGN 
                            WHERE (PersonID = Results.ID)
                            FOR XML PATH('') 
                            ), 1, 1, '' )
                AS Campaigns
    FROM  PERSON_CAMPAIGN Results
    3. The MEMBER_STATISTICS table contains one row per post.
       For this purpose, each row contains the post's:
       Division - a way of grouping posts by their member size
       Department - the state in which the post is located
       PostNumber - unique post identifier
       Reinstated - count of members whose annual subscription had lapsed for at least two years but who have now subscribed for the current year
       Write a T-SQL statement to determine the top ten posts in each division based on the number of reinstated members, with a minimum of 50 reinstated members.
       Rank them by highest to lowest reinstated count.
       Return their Division, Rank, Department, PostNumber, Reinstated

  • How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    How can I add a new Template to My Templates in Pages? I've read most of the discussions on the subject but it doesn't work for me. By the time I reach the Templates folder, I only see templates for Numbers and not for Pages. Need help, please.  Thanks

    Si vous avez utilisé la commande Save As Template depuis Pages, il y a forcément un dossier
    iWork > Pages
    contenant Templates > My Templates
    comme il y a un dossier
    iWork > Numbers
    contenant Templates > My Templates
    Depuis le Finder, tapez cmd + f
    puis configurez la recherche comme sur cette recopie d'écran.
    puis lancez la recherche.
    Ainsi, vous allez trouver vos modèles personnalisés dans leur dossier.
    Chez moi, il y en a une kyrielle en dehors des dossiers standards parce que je renomme wxcvb.template quasiment tous mes documents Pages et wxcvb.nmbtemplate à peu près tous mes documents Numbers.
    Ainsi, quand je travaille sur un document, je ne suis pas ralenti par Autosave.
    Désolé mais je ne répondrai plus avant demain.
    Pour moi il est temps de dormir.
    Yvan KOENIG (VALLAURIS, France)  mercredi 23 janvier 2011 22:39:28
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

Maybe you are looking for

  • N70 Firmware v5.07xx.x.x.x BUG - memory card corru...

    Hi there, I have N70 and I brought 1GB Kingston MMC card. Here is the firmware bug... First, when i bought my Nokia N70 it had firmware version v2.xxx.x.x.x.x ( i do not rimember all numbers ) and the 1GB and 32 MB MMC worked just fine... After updai

  • Custom Iview on portal Netweaevr 2004s

    Hy , i have a question: i must create a iview compose by a section of a web page and in another section some link to web page. So , i must create a page with two iview and if yes how i can create a iview that contain some link to web page? Thank's a

  • Wacom Intuos4 tablet settings keep resetting after reboot

    I am not sure if anyone else is seeing this but on my fresh install of 10.6, I installed the latest drivers for my Wacom Intuos4 tablet and every time I reboot, the configurations are reset to defaults. I've also noticed that when I go into the Wacom

  • Prevent DVD player from starting up when I insert a DVD

    I know that I can setup DVD player to not start playing a DVD when one is inserted, but how do I prevent it from even starting up whenever I insert a DVD?

  • How do I re-install Skype professional?

    I recently had to reformat my hard drive. How can I re-install skype professionl in order to use my existing subscription?  When a try to re-install it I am asked to extend my subscription which still has 6 months on it.