Use Trim Function in this instance?

Oracle 10.2g
I have the following code (Thanks to michaels 2):
SQL> with t as (
select to_date('11/14/2003 7:39:00 PM','MM/DD/RRRR hh:mi:ss pm') time, 11122 home_team_id,null away_team_id,null home_team_name, 'parks' away_team_name,'Steve' offensive_player_moniker, 'Smith' offensive_player_last_name from dual union all                   
select to_date('11/14/2003 7:32:00 PM','MM/DD/RRRR hh:mi:ss pm'), null, 24555, null, 'bombers', 'Chris', 'Carter' from dual union all                
select to_date('12/14/2008 1:35:00 PM','MM/DD/RRRR hh:mi:ss pm'), null, 33211, null, 'carts', 'Marty', 'Booker' from dual union all  
select to_date('12/14/2008 1:30:00 PM','MM/DD/RRRR hh:mi:ss pm'), 15555, null, null, 'sharks', 'Bob', 'Sanders' from dual union all
select to_date('12/14/2008 1:38:00 PM','MM/DD/RRRR hh:mi:ss pm'), 15555, null, null, 'sharks', 'Marvin','Harrison' from dual
select away_team_name || ': ' || xmlagg(xmlelement(e, offensive_player_moniker || ' ' || offensive_player_last_name || ' (' || to_char(time,'hh:mi') || '), ')).extract('//text()') x from t
group by  away_team_name
X                                                                              
bombers: Chris Carter (07:32),                                                 
carts: Marty Booker (01:35),                                                   
parks: Steve Smith (07:39),                                                    
sharks: Bob Sanders (01:30), Marvin Harrison (01:38),
Desired output:
bombers: Chris Carter (07:32)                                                
carts: Marty Booker (01:35)                                                
parks: Steve Smith (07:39)                                                  
sharks: Bob Sanders (01:30), Marvin Harrison (01:38)How can i go about deleting the extra coma at the end when unnecessary. I' guessing the trim function could do it with an if-else clause, though i'm not sure what would go in the if-else clause

Since there's an additional blank as well you need to trim it as well
SQL>  with t as (
select to_date('11/14/2003 7:39:00 PM','MM/DD/RRRR hh:mi:ss pm') time, 11122 home_team_id,null away_team_id,null home_team_name, 'parks' away_team_name,'Steve' offensive_player_moniker, 'Smith' offensive_player_last_name from dual union all                   
select to_date('11/14/2003 7:32:00 PM','MM/DD/RRRR hh:mi:ss pm'), null, 24555, null, 'bombers', 'Chris', 'Carter' from dual union all                
select to_date('12/14/2008 1:35:00 PM','MM/DD/RRRR hh:mi:ss pm'), null, 33211, null, 'carts', 'Marty', 'Booker' from dual union all  
select to_date('12/14/2008 1:30:00 PM','MM/DD/RRRR hh:mi:ss pm'), 15555, null, null, 'sharks', 'Bob', 'Sanders' from dual union all
select to_date('12/14/2008 1:38:00 PM','MM/DD/RRRR hh:mi:ss pm'), 15555, null, null, 'sharks', 'Marvin','Harrison' from dual
select rtrim(away_team_name || ': ' || xmlagg(xmlelement(e, offensive_player_moniker || ' ' || offensive_player_last_name || ' (' || to_char(time,'hh:mi') || '), ')).extract('//text()'), ', ') x from t
group by  away_team_name
X                                                                              
bombers: Chris Carter (07:32)                                                  
carts: Marty Booker (01:35)                                                    
parks: Steve Smith (07:39)                                                     
sharks: Bob Sanders (01:30), Marvin Harrison (01:38)

Similar Messages

  • Error when trying to use trim function

    when i try to use trim function on a column it gives me following error for the below query
    select trim(first_name) name from table1@pa1;
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    DSNT408I SQLCODE = -440, ERROR: NO FUNCTION BY THE NAME TRIM HAVING COMPATIBLE ARGUMENTS WAS FOUND IN THE CURRENT PATH DSNT418I SQLSTATE = 42884 SQLSTATE RETURN CODE DSNT415I SQLERRP = DSNXORFN SQL PROCEDURE DETECTING ERROR DSNT416I SQLERRD = -100 0 0 -1 0 0 SQL DIAGNOSTIC INFORMATION DSNT416I SQLERRD = X'FFFFFF
    any idea gurus ???Thanks

    This might work:
    select trim(first_name) name from
      (select first_name from table1@pa1);The problem is that pa1 is a non-Oracle database and does not have a trim function. It may have another function that does the same thing but it's not called TRIM.

  • About using TRIM function...

    //I'm posting this after whole search of past discussion as everybody wants to do so. :-)
    Hi,
    I want to trim out white spaces from colums in my table when select executes.
    I've read about TRIM function, but it does not as documented I think.
    See below my pseudo-code from trimming.
    SELECT trim (' ' from col1) | | col2, FROM TH_ABLICEN WHERE..blah..blah..This SQL query return me "ORA-00907: missing right parenthesis".
    I don't know how can this returns...
    TRIM function works only when its parameter is a constant and fails always when columns were injected as a parameter.
    This situation is very obscure to me and make me wondering ORACLE's intention for this kind of inconvenience.
    And I've tried replace (col1, ' ', '') only to fail.
    So my question is...
    1. How can use trim function?
    2. What is the ordinary method being used by popular demand to trim out white spaces from a column?
    Thanks in advance
    Regards,
    Ryan

    <BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Adinath Kamode ([email protected]):
    Hello,
    Your query is correct. I tried it with 8.1.6 sql version. I modified it as follows.
    select trim(' ' FROM ENAME)| |JOB FROM EMP;
    about syntax you can specify column name in trim.
    hope reply from you.
    <HR></BLOCKQUOTE>
    As mentioned in my first posting, it returns "ORA-00907: missing right parenthesis" error.
    Anyway thanks for your concern.
    Regards,
    Ryan
    null

  • Using TRIM function in select statement

    Hi All,
    I'm using the TRIM function in my select statement to eliminate the white spaces.
    But while using in select the TRIM function is not working in SQL*PLUS client(The query returns the white spaces also)
    Kindly provide some pointers regarding the issue.........
    I want to get only the data without the spaces in select statement
    Regards,
    Mohan

    Hi, Mohan,
    SQL*Plus always pads columns to make them line up nicely.
    If you have a column declared as VARCHAR2 (20), then SQL*Plus will normally display 20 characters for that column, even in the maximum actual length is, say, 5 (or even if the column always happens to be NULL).
    If you want the output to include only the actual data, without the padding that SQL*Plus adds, then concatenate all the columns into one big string column.
    People often do something like the following to generate a CSV file, with no exta spaces:
    SELECT       TO_CHAR (empno)
    || ',' || ename
    || ',' || job
    || ',' || TO_CHAR (deptno)
    || ',' || TO_CHAR (hiredate, 'DD-Mon-YYYY')     AS all_data
    FROM          scott.emp;

  • Can I use analytical function in this problem?

    Hi,
    I want to use query only for the following . I don't want to wright any function or procedure for this.
    create temp table test_3 (user_id number, auth_id number);
    insert into test_3 values (133,609);
    insert into test_3 values (133,610);
    insert into test_3 values (133,611);
    insert into test_3 values (133,612);
    insert into test_3 values (133,613);
    insert into test_3 values (133,614);
    insert into test_3 values (144,1);
    insert into test_3 values (134,610);
    insert into test_3 values (135,610);
    insert into test_3 values (135,610);
    insert into test_3 values (135,610);
    insert into test_3 values (136,610);
    insert into test_3 values (136,610);
    insert into test_3 values (137,610);
    insert into test_3 values (137,610);
    insert into test_3 values (137,609);
    insert into test_3 values (137,11);
    I want to count:
    1. for each auth_id, how many users are there who is assigned to this aut_id only
    example
    user_id 134 and 135 is assigned to auth_id 610 only and the count is 3 and 2 respectively .
    user_id 144 is assigned to auth_id 1 only and the count is 1.
    2.how many user_id is common between auth_id 609 and 610
    how many user_id is common between auth_id 609 and 611
    how many user_id is common between auth_id 609 and 612
    and so on.
    I have re-written the problem bellow
    Regards,
    Edited by: user576726 on Feb 13, 2011 3:54 AM

    Hi,
    user576726 wrote:
    Hi,
    Thanks for the response.
    drop table test_3;
    create table test_3 (user_id number, auth_id number);
    insert into test_3 values (133,609);     --row 1
    ...Thanks. That makes the problem a lot clearer.
    My desired output is:
    auth_id_1 auth_id_2 count1 count2
    1 12 1 --(user_id 144) 2 --(row 15, row 16)
    1 610 1 --(user_id 144) 1 --(row 19)
    11 609 1 --(user_id 137) 1 --(row 13)
    11 610 1 --(user_id 137) 2 --(row 11, row 12)
    12 1 1 --(user_id 144) 1 --(row 4)
    12 610 1 --(user_id 144) 1 --(row 19)
    609 11 1 --(user_id 137) 1 --(row 14)
    609 610 2 --(user_id 133 & 137) 3      --(row 2, row 11 and row 12)
    609 611 1 --(user_id 133) 1 --(row 3)
    610 1 1 --(user_id 144) 1 --(row 4)
    610 11 1 --(user_id 137) 1 --(row 14)
    610 12 1 --(user_id 144) 2 --(row 15, row 16)
    610 609 2 --(user_id 133 & 137) 4 --(row 1, row 13, row 17 and row 18)
    610 611 1 --(user_id 133) 1 --(row 3)
    611 609 1 --(user_id 133) 3 --(row 1, row 17 and row 18)
    611 610 1 --(user_id 133) 1 --(row 2)               1 --(user_id 133)               1 --(row 2)
    Count1 is the number of common different user id between auth_id_1 and auth_id_2
    example
    for the first row in the output:-
    common user ids between 609 and 610 are 133 and 137. so the count1 should be 2
    Count2 is how many rows are there for auth_id_2 where user id is common for auth_id_1 and auth_id_2
    example
    for the first row in the output:-
    the common user_id for 609 and 610 are 133 & 137
    the rows in the test_3 table that has auth_id 610 and user_id 133 & 137 are
    row 2, row 11 and row 12 so the count is 3.
    What I have done is
    I have writtent the following query to get the first two columns of the output:
    select tab1.auth_id auth_id_1, tab2.auth_id auth_id_2
    from
    (select user_id, auth_id
    from test_3
    group by user_id, auth_id
    ) tab1,
    (select user_id, auth_id
    from test_3
    group by user_id, auth_id
    ) tab2
    where tab1.user_id = tab2.user_id
    and tab1.auth_id <> tab2.auth_id
    group by tab1.auth_id, tab2.auth_id
    order by 1,2;You're on the right track. You're doing a self-join and getting the right combinations of auth_id_1 and auth_id_2.
    Why are you doing the GROUP BY in sub-queries tab1 and tab2? Eventually, you'll need to count identical rows, like these:
    insert into test_3 values (137,610);     --row 11
    insert into test_3 values (137,610);     --row 12If you do a GROUP BY in the sub-queries, all you'll know is that user_id=137 was related to auth_id=610. You won't know how many times, which is what count2 is based on. So don't do a GROUP BY in the sub-queries; just do the GROUP BY in the main query. That means you won't need to do sub-queries; you might as well just join two copies of the original test_3 table.
    Count1 is the number of common different user id between auth_id_1 and auth_id_2Great; that's very clear. In SQL, how do you count the number of different user_ids in such a group? (Hint "different" means the same thing as "distinct".)
    Count2 is how many rows are there for auth_id_2 where user id is common for auth_id_1 and auth_id_2
    example
    for the first row in the output:-The first row in the output you posted was
    1 12 1 --(user_id 144) 2 --(row 15, row 16)Isn't this one that you're explaining here the 8th row of output?
    the common user_id for 609 and 610 are 133 & 137
    the rows in the test_3 table that has auth_id 610 and user_id 133 & 137 are
    row 2, row 11 and row 12 so the count is 3.So, for count2, you want to know how many distinct rows from tab2 are in each group. If you had a primary key in the table, or anything that uniquely identified the rows, you could count the distinct occurrences of that, but you're not storing anything unique on each row (at least you haven't mentioned it in your sample data). If that's really the case, then this is one place where the ROWID pseudocolumn is handy; it uniquely identifies any row in any table, so you can just count how many different values of tab2.ROWID are in each group.

  • How to use analytical function in this case

    SELECT COUNT (rms.status_code) rms_status_count,
    rms.status_name rms_status_name,
    TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date, 'YYYY') month_year,
    MAX (rtd.add_date) date_for_sort
    FROM ri_mast_status rms, ri_tran_data rtd
    WHERE rtd.status_code = rms.status_code
    AND TRUNC (MONTHS_BETWEEN (SYSDATE, rtd.add_date)) < 36
    AND NVL (rtd.delete_flg, '0') = '0'
    GROUP BY TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date, 'YYYY'),
    rms.status_name
    ORDER BY MAX (rtd.add_date);
    it gives output for the last 3 years based on month and year.

    r you trying this ?
    select *from
    select rms.*,
    row_number() over(partition by TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date,rms.status_name 'YYYY') order by rtd.add_date) RN,
    MAX(rtd.add_date) over(partition by TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date,rms.status_name 'YYYY')  order by rtd.add_date) date_for_sort,
    COUNT(rms.status_code) over(partition by TO_CHAR (rtd.add_date, 'MON')|| ' '|| TO_CHAR (rtd.add_date,rms.status_name 'YYYY')  order by rtd.add_date) rms_status_count
    FROM ri_mast_status rms, ri_tran_data rtd
    WHERE rtd.status_code = rms.status_code
    AND TRUNC (MONTHS_BETWEEN (SYSDATE, rtd.add_date)) < 36
    AND NVL (rtd.delete_flg, '0') = '0'
    where rn=1

  • How to use RTRIM function in ABAP

    Hey,
    I have a question on using trim function in ABAP. According to all documents, I should be able to use rtrim as
    shorttext = rtrim('abcde-xx', '-xx').
    But when I do that, it gives me an error message "Comma without preceding colon (after shorttest?)"
    Anyone can tell me why is this happening? how should I use this trim function? And for me to cut off variable's last few character, what else method can I use? 
    Thank you very much.

    DATA : T1    TYPE STRING VALUE 'abcde-xx',
                T2    TYPE STRING  VALUE '-xx'.
    REPLACE T2 INTO T1 WITH SPACE.
    WRITE :/, T1.
    result output is :    'abcde'.
    regards
    Guna

  • USE OF FUNCTION FORM_SUCCESS

    Hi,
    Can any one please tell me if i can use FORM_SUCCESS with CLIENT_HOST command?
    The code is as follows.
    l_host_cmnd := ' ftp –s:' || l_ftp_destination || '/' || 'temp.txt';
    HOST( l_host_cmnd, NO_SCREEN);
    if not form_success
    then
    message(The file has not been trasfered');
    do_key ('EXIT_FORM');
    end if;

    Hi,
    Are you using Client_Host from WebUtil, or just Host? Your message is slightly ambiguous.
    WebUtil provides more specific functions for getting the return value, and standard output/error. You can avoid using Form_Success.
    If this instance, you could say:
    l_host_cmnd := ' ftp –s:' || l_ftp_destination || '/' || 'temp.txt';
    l_ftp_retval := WebUtil_Host.HOST(l_host_cmnd);
    if l_ftp_retval = 0 then
      message('Success');
    else
      -- start handling the errors
    end if;Even if you are using HOST, this will help you sometime in the future.
    Cheers

  • How to use  date function in my procedure

    hi Gurus,
    i have a requirement
    where user passes the end_date parametre from front end which get convered to
    End Date => 2012/05/31 00:00:00
    now i based on this end date value i have to calculate the start date which is only month less than the end date, i know i can use add_months function for this requirement but
    my problem is
    l_start_date :=add_months(fnd_date.canonical_to_date(p_end_date),-1);
    (OR)
    l_start_date := add_months(to_date(end_date,'DD-MON-YYYY'),-1);
    all these are returning date format as DD-MON-YYYY eg;
    if user passes from front end 31-may-2012 , in the backend to my procedure it is passing as 2012/05/31 00:00:00
    and my procedure calculating start date and returning as '01-MAY-12',
    but my requiremnt is
    it should return
    Start Date => 2012/05/01 00:00:00
    any pointers on this is highly appreciable,
    thanks in advancee

    HuaMin Chen wrote:
    BluShadow wrote:
    HuaMin Chen wrote:
    Try
    select trunc(to_date('22-AUG-03'), 'MONTH') from dual;?? That is so wrong.
    Is that date 22nd August 2003? 22nd August 1903? 3rd August 2022? 3rd August 1922?
    You have no date format specified in your to_date function.That is fine for 10g or above versions. Thank you.It way work, if you're lucky, but it depends on your sessions NLS settings...
    SQL>  select trunc(to_date('22-AUG-03'), 'MONTH') from dual;
    TRUNC(TO_DATE('22-AU
    01-AUG-0003 00:00:00
    SQL> alter session set nls_date_format = 'YYYY-MM-DD';
    Session altered.
    SQL>  select trunc(to_date('22-AUG-03'), 'MONTH') from dual;
    TRUNC(TO_D
    0022-08-01
    SQL> alter session set nls_date_format = 'HH:MI:SS YYYY-MM-DD';
    Session altered.
    SQL>  select trunc(to_date('22-AUG-03'), 'MONTH') from dual;
    select trunc(to_date('22-AUG-03'), 'MONTH') from dual
    ERROR at line 1:
    ORA-01849: hour must be between 1 and 12
    SQL>So it's certainly not "fine". It's bad practice.
    This must be fine
    select trunc(to_date('22-AUG-03','dd-MON-RR'), 'MONTH') from dual;That's better.

  • HOW TO USE TRANSLATE FUNCTION

    Hi
    in XSQL i am one getting one row like this
    <REASON_FOR_REJECTION>1.Overhead line is not existing in front of the premises,2.The distance from the pole to the serice is more than 30 meters.,3.Another service is existing in the same premises with arrears.</REASON_FOR_REJECTION>
    In the above String for every comma i want to put <br>
    the output should come like this:
    1.Overhead line is not existing in front of the premises
    2.The distance from the pole to the serice is more than 30 meters.
    3.Another service is existing in the same premises with arrears
    i have used translate function like this <xsl:value-of select="translate($REASON_FOR_REJECTION,',',&lt;br>)'"/>
    but i couldnt get proper result;how can i do this ??? PLZZ HELP

    Hi Jayant,
    please have a look at the following link: http://help.sap.com/saphelp_nw04s/helpdata/en/ae/48e7428d877276e10000000a1550b0/frameset.htm
    Regards,
    Christophe

  • Trim function on varchar2 data

    I just saw several programs, in which they have used TRIM function for a Varchar2 data type column. I thought it is not required. any thoughts?
    Thanks for your time.

    SQL> desc test_1;
    Name                                      Null?    Type
    SNO                                                NUMBER
    SNAME                                              VARCHAR2(13)
    SQL> select * from test_1;
           SNO SNAME
             1 abc
             2    xyz
             3 mno
             4     pqr
    SQL> select sno,sname,trim(sname),length(sname) len1,length(trim(sname)) len2 from test_1;
           SNO SNAME         TRIM(SNAME)         LEN1       LEN2
             1 abc           abc                    3          3
             2    xyz        xyz                    6          3
             3 mno           mno                   11          3
             4     pqr       pqr                   13          3
    SQL> alter table test_1 modify sname char(13);
    Table altered.
    SQL> desc test_1;
    Name                                      Null?    Type
    SNO                                                NUMBER
    SNAME                                              CHAR(13)
    SQL> select sno,sname,trim(sname),length(sname) len1,length(trim(sname)) len2 from test_1;
           SNO SNAME         TRIM(SNAME)         LEN1       LEN2
             1 abc           abc                   13          3
             2    xyz        xyz                   13          3
             3 mno           mno                   13          3
             4     pqr       pqr                   13          3
    SQL>

  • How do I use the TRIM function in my Query?

    I have a field that has called AP.service_user_defined_1 that houses a Code the code is like Alpha Num ie "AA01" then it has about 30 to 40 whites spaces and then the description of what the code means. I need to have the description to show in my report I don't necessarily need the code but I do need the description I tried putting the TRIM Function in as below and it will not work what do I need to do to correct this?? I need help ASAP this is due today! Thanks for any help!
    SELECT DISTINCT
              A1.AUTH_NUMBER,
    PM.LAST_NAME,
              A1.AUTH_TYPE,
              A1.PLACE_OF_SERVICE,
              A1.OVERALL_STATUS,
              A1.CLOSED_REASON,
              A1.DENIED_REASON,
    Case
    when A1.DENIED_REASON in ('HS001','HS002') then 'MED NECESS'
    when A1.DENIED_REASON in ('HS004','HS005','HS006','HS007','HS008','HS013','HS014','HS016','HS017','HS019','HS020') then 'Admin Denial'
    when A1.DENIED_REASON is NUll and ap.advisor_decision = 'AAPPR' then 'Approved'
    else 'Unknown'
    end DENIED,
    A1.admit_primary_date,
    A1.service_admit_type AS "IP ADMIT TYPE",
    A1.service_user_defined_1 AS "OP Serv Type",
    Trim (leading ('AA01                 ',)from dual,
    ap.contact_date,
    AP.decision_date,
    AP.ADVISOR_DECISION,
    PM.PROVIDER_ID,
         A1.INSERT_DATETIME,
    TO_CHAR (A1.insert_datetime,'MONTH-YY')AS "Month",
    A1.admit_primary_date,
              A1.ACTIVE_PHYSICIAN_ADVISOR,
              MV.LINE_OF_BUSINESS
    FROM Windsoradm.auth_master a1
    INNER JOIN Windsoradm.auth_phys_advisor ap
    ON a1.auth_number=ap.auth_number
    INNER JOIN windsoradm.prov_master pm
    ON ap.seq_prov_id=pm.seq_prov_id
    LEFT JOIN windsoradm.note_master nm
    ON nm.seq_memb_id=a1.seq_memb_id
    INNER JOIN windsoradm.member_mv mv
    ON mv.seq_memb_id=a1.seq_memb_id
    Where mv.Line_of_Business <>'SFS'
    /*AND A1.PLACE_OF_SERVICE IN ('11','21','22','24')*/
    /*AND a1.active_physician_advisor = 'Y'*/
    /*AND (a1.closed_reason ='A06' OR a1.closed_reason is Null)*/
    AND a1.insert_datetime Between To_Date ('04/01/2012', 'MM/DD/YYYY') and To_Date ('04/30/2012','MM/DD/YYYY')
    ORDER BY 1

    I don't know how to use this within my query I put it in as you suggest and get an error: I'm new to these functions can you show me how within my query I should code it? The field Name is A1.service_user_defined_1 There are about 50 Different Codes in a Drop down list within the application that have a different Code and Different Description it appears that the Codes are all 4 character alpha numeric then about 25 to 45 spaces and then the description. Please show me in my code how to get this I wish there was a table I could link to that housed both code and description but who ever created this did not make life easy. Thanks (I also tried the TRIM but could not get it to work ) I know it is because I do not know how to put it within my code to make it work.
    SELECT DISTINCT
              A1.AUTH_NUMBER,
    PM.LAST_NAME,
              A1.AUTH_TYPE,
              A1.PLACE_OF_SERVICE,
              A1.OVERALL_STATUS,
              A1.CLOSED_REASON,
              A1.DENIED_REASON,
    Case
    when A1.DENIED_REASON in ('HS001','HS002') then 'MED NECESS'
    when A1.DENIED_REASON in ('HS004','HS005','HS006','HS007','HS008','HS013','HS014','HS016','HS017','HS019','HS020') then 'Admin Denial'
    when A1.DENIED_REASON is NUll and ap.advisor_decision = 'AAPPR' then 'Approved'
    else 'Unknown'
    end DENIED,
    A1.admit_primary_date,
    A1.service_admit_type AS "IP ADMIT TYPE",
    A1.service_user_defined_1 AS "OP Serv Type",
    regexp_replace('AA01 Behavioral/Mental Health Service', '^[^ ]+ +')from dual,
    ap.contact_date,
         AP.decision_date,
         AP.ADVISOR_DECISION,
              PM.PROVIDER_ID,
         A1.INSERT_DATETIME,
    TO_CHAR (A1.insert_datetime,'MONTH-YY')AS "Month",
    A1.admit_primary_date,
              A1.ACTIVE_PHYSICIAN_ADVISOR,
              MV.LINE_OF_BUSINESS
    FROM Windsoradm.auth_master a1
    INNER JOIN Windsoradm.auth_phys_advisor ap
    ON a1.auth_number=ap.auth_number
    INNER JOIN windsoradm.prov_master pm
    ON ap.seq_prov_id=pm.seq_prov_id
    LEFT JOIN windsoradm.note_master nm
    ON nm.seq_memb_id=a1.seq_memb_id
    INNER JOIN windsoradm.member_mv mv
    ON mv.seq_memb_id=a1.seq_memb_id
    Where mv.Line_of_Business <>'SFS'
    /*AND A1.PLACE_OF_SERVICE IN ('11','21','22','24')*/
    /*AND a1.active_physician_advisor = 'Y'*/
    /*AND (a1.closed_reason ='A06' OR a1.closed_reason is Null)*/
    AND a1.insert_datetime Between To_Date ('04/01/2012', 'MM/DD/YYYY') and To_Date ('04/30/2012','MM/DD/YYYY')
    ORDER BY 1

  • I want to use the Function Generator VI to send command signals through the NI 7344 motion controller. This will be a closed loop servo valve system. I want to be able to change from say a square wave to a sine wave on the fly. Idea's?

    I am going to run tests that require an actuator to move using various types of arbitrary waveforms such as sine or square. The NI 7344 is hooked to the UMI that is going through a driver for a servo valve. The loop is analog and it is closed. I have played with some of the examples but can't get it to work. I have used the function generator VI to generate a signal but I think I am using the wrong input VI to the motion control board. When I use what I have it moves the servo and then stops. It doesn't continually generate the signal.
    I would love to use the controls on the function generator vi to control frequency and amplitude ect. Any help or pointer would be helpful. Thank you in advance.

    Hello,
    I'm not clear on exactly how you want to use the generated data but I'm assuming they will be used as your target points.
    There's a built-in example for motion called 'One-Axis Contour Move.vi'. This example demonstrates how to provide your target points as 1-D array. All you need to do is to replace the input array with the output of the function generator. In order to have it run continuously, use a while loop. You can further program your application so that it'll change the waveform on the fly by monitoring the user interface but this might be little little tricky as you will need to reset the move and load the new generated points while keeping track of your current position.
    I hope this helps. Let me know if you have further questions regarding this
    application.
    Best regards,
    Yusuf C.
    Applications Engineering
    National Instruments

  • How do I transfer itunes music to my iphone 4 without using the restore from this backup function?

    How do I transfer itunes music to my iphone 4 without using the restore from this backup function?  I cannot use the back up function as have been advised that therer are bugs in it and restoring it back to my phone will bring the bugs with it and phone will be back to apple again as will start playing up again.  But I need the music.  Whn I plug it in laptop and go to itunes icon it gives me 2 options:  Set up as new iphone? OR Restore from backup.
    Do I pick set up as new phone?  I dont know as the guy at the genius bar told me there would be an option asking if i want to sync itunes only...but there isn't.

    Set up as New and then... Re-Sync your Content from iTunes.
    SYNCING with iTunes
    See here  >  http://support.apple.com/kb/HT1386
    From Here  >  http://www.apple.com/support/iphone/syncing/

  • Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Hi fellow apple guys, i have this problem. Hope you can help me. I don't know how to use the function keys (F1 to F12) on my macbook air. Pls help

    Out of the box, to use the function keys as function keys, hold down the fn key when you press the key. Otherwise, you get the picture function on the key. You can reverse this behavior in the Keyboard system prefs.

Maybe you are looking for

  • HT4946 3gs unlocked need to be reset. will i need the unlock?

    I have an iphone 3GS unlocked but not jailbreak. Officailly unlocked, It allows me to upgrade and everything but recently I cannot opne any app. I doubble tap then and opnes and inmediatly shuts down. Facebook, games, whatsapp, etc. I read that I sho

  • Importing a custom class error

    In my testDB.jsp as follows, <body> <%@ page language="java" import="java.sql.*" %> <%@ page import="DBConn" %> <% DBConn DBConn1 = new DBConn(); out.print("bean test:" + DBConn1.test_bean()); %> </body > </html > I imported a custom class DBConn DBC

  • Unable to load content, it halts on the preloader half way.. anyone know what might be the problem..

    I posted the html code here, I’m not sure where I could be getting a problem, the preloader keeps loading half-way then stops and nothing loads up.. any ideas anybody? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xht

  • Error in transferring a Contract from R/3 to SRM

    Hi Gurus, we've implemented SAP SRM on an extended classic scenario with R/3 as the back-end system. I transfer contracts from the back-end system to SRM by using the BBP_CONTRACT_INITIAL_UPLOAD report. A problem occurs when the contract in the R/3 s

  • How to display the Japanese character

    Hi Im trying to display the Japanese characters in pdf report(Using iText Report). I have the method as follows which is encoding the characters in a particular format in my say, Reports.java public String stringFormat( String strData ) throws Except