Complex SQL help for a

I do not know if this is the right place for thius type of post. If it is not please advise where the right place is.
I need help generating a report, hopefully with SQL in 8.1.7
SQL Statement which produced the data below the query :
SELECT CHANGE.change_number, CHANGE.route_date as DATE_TO_CCB, nodetable.description AS Approver_required, (TRIM(BOTH ',' FROM CHANGE.PRODUCT_LINES)) AS PRODUCT_LINES /*, PROPERTYTABLE.VALUE as PRODUCT_LINES */
FROM CHANGE, signoff, workflow_process, nodetable /*, PROPERTYTABLE */
WHERE ( (CHANGE.ID = signoff.change_id)
AND (CHANGE.process_id = signoff.process_id)
AND ((nodetable.id = signoff.user_assigned) or (nodetable.id=signoff.user_signed))
AND (CHANGE.process_id = workflow_process.ID)
AND (CHANGE.ID = workflow_process.change_id)
AND (CHANGE.workflow_id = workflow_process.workflow_id)
AND (SIGNOFF.SIGNOFF_STATUS=0 )/* in (0, 2, 3)) */ /* 0=request needs attention, 2=request approved, 3=request rejected */
AND (SIGNOFF.REQUIRED=5 or SIGNOFF.REQUIRED=1) /* 1=Approver 5= Ad Hoc Approver */
AND (CHANGE.IN_REVIEW=1)
AND (CHANGE.RELEASE_DATE IS NULL)
AND (CHANGE.CLASS != '4928')
/* AND (PROPERTYTABLE.PROPERTYID IN (SELECT TRIM(BOTH ',' FROM CHANGE.PRODUCT_LINES) FROM CHANGE)) */
order by change.route_date desc
**** Results **********
CHANGE_NUMBER|DATE_TO_CCB|APPROVER_REQUIRED|PRODUCT_LINES
C02190|11/14/2008 3:34:02 PM|Anurag Upadhyay|270354,270362|
C02190|11/14/2008 3:34:02 PM|Dennis McGuire|270354,270362|
C02190|11/14/2008 3:34:02 PM|Hamid Khazaei|270354,270362|
C02190|11/14/2008 3:34:02 PM|Mandy York|270354,270362|
C02193|11/14/2008 3:05:18 PM|Hamid Khazaei|274279,266339,266340,266341|
C02193|11/14/2008 3:05:18 PM|Rob Brogle|274279,266339,266340,266341|
C02193|11/14/2008 3:05:18 PM|Xavier Otazo|274279,266339,266340,266341|
C02193|11/14/2008 3:05:18 PM|san|274279,266339,266340,266341|
C02194|11/14/2008 2:51:34 PM|Diana Young|271503|
C02194|11/14/2008 2:51:34 PM|Carl Krentz|271503|
C02194|11/14/2008 2:51:34 PM|Dennis Yen|271503|
C02194|11/14/2008 2:51:34 PM|Gordon Ries|271503|
C02194|11/14/2008 2:51:34 PM|Sunil Khatana|271503|
M00532|11/13/2008 1:34:42 PM|Dennis Yen|270356,270354,270360,274279,266339,266340,266341,276780,260784|
M00532|11/13/2008 1:34:42 PM|Jin Hong|270356,270354,270360,274279,266339,266340,266341,276780,260784|
M00532|11/13/2008 1:34:42 PM|Sunil Khatana|270356,270354,270360,274279,266339,266340,266341,276780,260784|
Each value in the numeric comma delimited string has a corresponding ID for the actual test string value in another table as shown below.
PROPERTYID|VALUE
260775|product 1
260776|Product 2
260777|Product x
260778|Product y
260779|Internal
260780|ORCA
260781|Tiger
260782|Orange product
260783|Restricted
260784|Product zz
266259|Product YYY
266260|Hercules
266261|Tangerine
*****Desired output****
CHANGE_NUMBER|DATE_TO_CCB|APPROVER_REQUIRED|PRODUCT_LINES
C02190|Nov/14/2008 03:34:02 PM|Anurag Upadhyay, Dennis McGuire, Hamid Khazaei, Mandy York|Product Y,Product 1
C02193|Nov/14/2008 03:05:18 PM|Hamid Khazaei, Rob Brogle, Xavier Otazo, san|Hercules,Apple,Product 3,Product zz
C02194|Nov/14/2008 02:51:34 PM|Diana Young, Carl Krentz, Dennis Yen, Gordon Ries, Sunil Khatana|Product 2
M00532|Nov/13/2008 01:34:42 PM|Dennis Yen, Jin Hong, Sunil Khatana|Product 1,Product 4,product yy,product YYY,ORCA,Tiger,Orange product,Restricted

Hi,
Here's how you can do it in Oracle 8.1.
To get the individual sub-strings from product_lines, join your current result set to this "counter table"
(   SELECT  ROWNUM  AS n
    FROM    all_objects
    WHERE   ROWNUM <= 10 -- upper bound on number of items
)  cntrIf you don't know the worst case of how many items might be in product_lines, it's a little more complicated:
(   SELECT  ROWNUM  AS n
    FROM    all_objects
    WHERE   ROWNUM <= 1 +
            SELECT  MAX ( LENGTH (product_lines)
                        - LENGTH (REPLACE (product_lines, ','))
            FROM    table_name
)  cntrJoin this to the existing result set like this
WHERE   ...
AND     INSTR ( product_lines || ','    -- one extra comma added
              , 1
              , n
              ) > 0When you do the join, you will have
one copy of all the rows with one item in producgt_lines,
two copies of all the rows with two items in producgt_lines,
three copies of all the rows with three items in producgt_lines,
and so on.
When a row has been copied, each copy will have a different value of cntr.n.
To extract the n-th substring from product_lines:
SELECT  ...
        SUBSTR ( product_lines
               , INSTR ( ',' || product_lines,   ',',   1,   n)
               , ( INSTR (product_lines || ',',   ',',   1,   n)
                 - INSTR (',' || product_lines,   ',',   1,   n)
               )  AS product_lines_itemWhen you have derived this column, you can join to the table with the translations
WHERE  TO_NUMBER (product_lines_item) = propertyidTo combine these rows into one row with a comma-delimited list, GROUP BY all the columns you want to select except the property_value ('produc 1', 'tangerine', etv.), and SELECT:
LTRIM ( MAX (CASE WHEN n =  1 THEN ',' || property_value END) ||
        MAX (CASE WHEN n =  2 THEN ',' || property_value END) ||
        MAX (CASE WHEN n = 10 THEN ',' || property_value END)
      )I don't know a good way to re-combine the rows in Oracle 8 without assuming some limit on the number of items. I assumed there would never be more than 10 in the example above. You can say 20 or 100, I suppose, if you want to. If you guess too high, everything will still work: the query will just be slower.
This is a just one example of why packing several values into a single column is a bad idea.

Similar Messages

  • SQL Help for System Analysis

    Hi all,
    Can we seek for help in SQL?
    I have an system analysis which calculate the concurrent usage of a computer system.
    I have add all data which is stored in .CSV file and then insert into a table named as Activity.
    Can we select the data from activity and generate an Excel file which report the calculation on the concurrent usage of a computer system?

    fionanycheng wrote:
    Hi all,
    Can we seek for help in SQL?
    I have an system analysis which calculate the concurrent usage of a computer system.
    I have add all data which is stored in .CSV file and then insert into a table named as Activity.
    Can we select the data from activity and generate an Excel file which report the calculation on the concurrent usage of a computer system?
    So, you have data in a .csv file
    Then you load that data into a relational database.
    Now you want to select that data and place it back into a file for Excel ......
    Hmm..   Makes me wonder why you bothered with the database in the middle.
    the database itself is more than capable of efficiently performing your calculations (assuming a reasonably rational table design).
    Maybe you could provide a better description of the business problem to be solved, instead of a pre-conceived (and possibly ill-conceived) technical solution to that unspecified business problem.  The we could provide better advice.

  • SQL Help for Date Range display

    Gurus,
    I have a sql statement like
    select MIN(HIREDATE), MAX(HIREDATE) FROM EMP WHERE DEPTNO = 30My output looks like
    MIN(HIREDATE)     MAX(HIREDATE)
    12/30/1998        12/30/2001Based on the values of MIN(HIREDATE) , MAX(HIREDATE) values
    I need a SQL to generate the output like
    12/30/1998
    1/30/1999
    2/28/1999
    until Max(HIREDATE) value
    In Feb we dont have 30th day, In that case take the last day of the month.
    Thanks for great help
    C 007

    With 10g.
    Regards Salim.WITH t AS
         (SELECT min(hiredate) min_hiredate,
                 max(hiredate) max_hiredate
            FROM emp_test
            where deptno=30)
    SELECT min_hiredate dt
      FROM t
    model
    dimension by ( 1 rn)
    measures(min_hiredate,months_between(max_hiredate,min_hiredate) diff )
    (min_hiredate[for rn from 1 to diff[1] increment  1]=add_months( min_hiredate[1],cv(rn)-1))
    order by rn
    SQL> WITH t AS
      2       (SELECT min(hiredate) min_hiredate,
      3               max(hiredate) max_hiredate
      4          FROM emp_test
      5          where deptno=30)
      6  SELECT min_hiredate dt
      7    FROM t
      8  model
      9  dimension by ( 1 rn)
    10  measures(min_hiredate,months_between(max_hiredate,min_hiredate) diff )
    11  (min_hiredate[for rn from 1 to diff[1] increment  1]=add_months( min_hiredate[1],cv(rn)-1))
    12  order by rn
    13  /
    DT
    1998-12-30
    1999-01-30
    1999-02-28
    1999-03-30
    1999-04-30
    1999-05-30
    1999-06-30
    1999-07-30
    1999-08-30
    1999-09-30
    1999-10-30
    1999-11-30
    1999-12-30
    2000-01-30
    2000-02-29
    2000-03-30
    2000-04-30
    2000-05-30
    2000-06-30
    2000-07-30
    2000-08-30
    2000-09-30
    2000-10-30
    2000-11-30
    2000-12-30
    2001-01-30
    2001-02-28
    2001-03-30
    2001-04-30
    2001-05-30
    2001-06-30
    2001-07-30
    2001-08-30
    2001-09-30
    2001-10-30
    2001-11-30
    SQL> 

  • SQL Help for a computation

    Hi
    I am trying to create a Stock Market Technical Indicator named - Commodity Channel Index (CCI)
    Date  High_Price     Low_Price     Close_Price     True_Price     TPMA     MD
    02-Jan-07     2297     2238     2273     2269               
    03-Jan-07     2320     2273     2311     2301               
    04-Jan-07     2325     2275     2285     2295               
    05-Jan-07     2305     2256     2275     2279               
    08-Jan-07     2280     2193     2206     2226     2274     21     
    09-Jan-07     2235     2173     2190     2200     2260     38     
    10-Jan-07     2200     2153     2164     2173     2234     42     
    11-Jan-07     2215     2095     2183     2164     2208     35     
    12-Jan-07     2232     2200     2223     2218     2196     22     
    15-Jan-07     2248     2230     2243     2240     2199     24     
    16-Jan-07     2250     2216     2222     2229     2205     29     
    17-Jan-07     2245     2197     2205     2216     2214     20     
    Where Date, HighPrice,LowPrice,CLosePrice is the input from a table
    Below is the computation of other columns
    True_Price = (HighPrice+LowPrice+Closeprice)/3
    TPMA = 5 Days Average True_Price (last 5 values of True_Price includeing the current) [Note:First 4 values will be 0/Null ]
    MD = ABS(TPMA[5]-True_Price[5]) + ABS(TPMA[5]-True_Price[4]) + ABS(TPMA[5]-True_Price[3])+ ABS(TPMA[5]-True_Price[2])+ ABS(TPMA[5]-True_Price[1]) [Note:First 4 values will be 0/Null ]
    Please note this 5 days average is a parameter so it can be 5 days , 10 day, 20 day etc so the calculation will based on this parameter+
    For Example if parameter is 10 days then
    TPMA = 10 Days Average of True_Price(last 10 values of True_Price includeing the current) [Note:First 9 values will be 0/Null ]
    MD = ABS(TPMA[10]-True_Price[10]) ABS(TPMA[10]-True_Price[9]) ABS(TPMA[10]-True_Price[8]) ABS(TPMA[10]-True_Price[7]) ABS(TPMA[10]-True_Price[6]) ABS(TPMA[10]-True_Price[5]) ABS(TPMA[10]-True_Price[4]) + ABS(TPMA[10]-True_Price[3])+ ABS(TPMA[10]-True_Price[2])+ ABS(TPMA[10]-True_Price[1]) [Note:First 9 values will be 0/Null ]
    I am really struck with computation of column MD and not sure how to make it generic to work for any value
    Thanks in advance for your help
    Regards
    Rakesh

    Hi
    I am trying to create a Stock Market Technical Indicator named - Commodity Channel Index (CCI)
    Date  High_Price     Low_Price     Close_Price     True_Price     TPMA     MD
    02-Jan-07     2297     2238     2273     2269               
    03-Jan-07     2320     2273     2311     2301               
    04-Jan-07     2325     2275     2285     2295               
    05-Jan-07     2305     2256     2275     2279               
    08-Jan-07     2280     2193     2206     2226     2274     21     
    09-Jan-07     2235     2173     2190     2200     2260     38     
    10-Jan-07     2200     2153     2164     2173     2234     42     
    11-Jan-07     2215     2095     2183     2164     2208     35     
    12-Jan-07     2232     2200     2223     2218     2196     22     
    15-Jan-07     2248     2230     2243     2240     2199     24     
    16-Jan-07     2250     2216     2222     2229     2205     29     
    17-Jan-07     2245     2197     2205     2216     2214     20     
    Where Date, HighPrice,LowPrice,CLosePrice is the input from a table
    Below is the computation of other columns
    True_Price = (HighPrice+LowPrice+Closeprice)/3
    TPMA = 5 Days Average True_Price (last 5 values of True_Price includeing the current) [Note:First 4 values will be 0/Null ]
    MD = ABS(TPMA[5]-True_Price[5]) + ABS(TPMA[5]-True_Price[4]) + ABS(TPMA[5]-True_Price[3])+ ABS(TPMA[5]-True_Price[2])+ ABS(TPMA[5]-True_Price[1]) [Note:First 4 values will be 0/Null ]
    Please note this 5 days average is a parameter so it can be 5 days , 10 day, 20 day etc so the calculation will based on this parameter+
    For Example if parameter is 10 days then
    TPMA = 10 Days Average of True_Price(last 10 values of True_Price includeing the current) [Note:First 9 values will be 0/Null ]
    MD = ABS(TPMA[10]-True_Price[10]) ABS(TPMA[10]-True_Price[9]) ABS(TPMA[10]-True_Price[8]) ABS(TPMA[10]-True_Price[7]) ABS(TPMA[10]-True_Price[6]) ABS(TPMA[10]-True_Price[5]) ABS(TPMA[10]-True_Price[4]) + ABS(TPMA[10]-True_Price[3])+ ABS(TPMA[10]-True_Price[2])+ ABS(TPMA[10]-True_Price[1]) [Note:First 9 values will be 0/Null ]
    I am really struck with computation of column MD and not sure how to make it generic to work for any value
    Thanks in advance for your help
    Regards
    Rakesh

  • Sql help for columns to rows

    Hi all,
    Here is my requirement for reporting purpose…….
    Can you please help me? See below example.
    with t as (select 1 id, 'missing' col1,'expired' col2,'duplicate' col3,'other' col4 from dual union all
    select 2 id, 'missing' col1,'expired' col2,'duplicate' col3,'other' col4 from dual
    select * from t
    id     col1          col2          col3          col4
    1     missing     expired     duplicate     other
    2     missing     expired     duplicate     other
    Required out is
    id new_col
    1 missing
    1 expired
    1 duplicate
    1 other
    2 missing
    2 expired
    2 duplicate
    2 other
    Thanks in advance,

    Isn't fun to play around and see what happens?
    WITH t AS
      (SELECT 1 id,
        'missing' col1,
        'expired' col2,
        'duplicate' col3,
        'other' col4
      FROM dual
      UNION ALL
      SELECT 2 id,
        'missing' col1,
        'expired' col2,
        'duplicate' col3,
        'other' col4
      FROM dual
    SELECT id,
      new_col
    FROM t unpivot include nulls (new_col FOR col IN (col1, col2, col3, col4));gives
    ID                     NEW_COL  
    1                      missing  
    1                      expired  
    1                      duplicate
    1                      other    
    2                      missing  
    2                      expired  
    2                      duplicate
    2                      other    
    8 rows selectedNow this only works in 11g, so it's a great reason to get there.
    -Andy

  • SQL Help for FMS needed

    Hi
    Can somebody please tell me what's wrong with this:
    declare @result as varchar(30)
    if $[$OWTR.Filler] = 'NFE-1'
    begin
      set @result = (select t1.wareHouse from WOR1 t1 inner join OWOR t2 on t1.DocEntry=t2.DocEntry
    where t2.DocNum=$[OWTR.U_SIA_ProdAusg] and t1.VisOrder=$[$23.0.1]-1 AND t1.IssueType='M')
    end
    else
    set @result = 'NFE-1'
    select @result
    Thanks
    Franz

    That was not it.
    I found it ... sometimes it seems to help to ask for help ...
    set @temp = $[$OWTR.Filler]
    changed to
    set @temp = $[OWTR.Filler]
    Thanks anyway
    Franz

  • Some SQL Help for a Complete Beginner

    ...........

    Use ROLLUP then
    SQL> select id,
      2         case when grouping(id)=1 and grouping(pro_name)=1 then 'Total' else pro_name end pro_name
      3         sum(quantity) quantity
      4    from product
      5   group by rollup(id, pro_name)
      6  having (grouping(id)=0 and grouping(pro_name)=0)
      7      or (grouping(id)=1 and grouping(pro_name)=1)
      8  /
    ID    PRO_NAME               QUANTITY
    11011 Socket Type 3                20
    11110 Wrench Type 2                44
    11111 Bolt Type 1                  40
    22022 Hammer                       30
    22220 Wrench Type 3                44
    22222 Bolt Type 2                  40
    33330 Wrench Type 4                44
    33333 Bolt Type 3                  40
    44440 Nut Type 1                   80
    44444 Bolt Type 4                  40
    55550 Nut Type 2                   80
    55555 Nail Type 1                 400
    66660 Nut Type 3                   80
    66666 Nail Type 2                 400
    77770 Nut Type 4                   80
    77777 Nail Type 3                 400
    88880 Socket Type 1                20
    88888 Nail Type 4                 400
    99990 Socket Type 2                20
    99999 Wrench Type 1                44
          Total                      2346
    21 rows selected.Your price field is CHAR data type. You cant use it with quantity field which is a NUMBER data type.
    The basic structure of your table is wrong you need to modify it.
    Edited by: Karthick_Arp on May 8, 2009 11:47 PM

  • Easiest way to search for a keyword in over 100 dts packages on a complex SQL 2000 server

    Hi,
    Can anyone tell me the easiest way to search for a keyword (e.g. myfilename.txt) in over 100 dts packages on a complex SQL 2000 server please. I've searched the internet for a solution, and there seem to be various third party tools available, etc. However
    ideally I would like to be able to run a block of code which returns the result within query analyser, since this SQL 2000 server is a production server and I'd rather not have to go through change management for investigation purposes.
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    See if this helps
    http://www.sqlservercentral.com/Forums/Topic169278-19-1.aspx
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Nested SQL statements for complex, detailed queries.

    Is it  possible to write nested SQL statements for complex, detailed queries. A nested query
    has a WHERE clause that includes a SELECT statement ? Is it true or false ?

    Hi wahid,
    Here are pretty good examples: 
    http://www.databasejournal.com/features/mssql/article.php/3464481/Using-a-Subquery-in-a-T-SQL-Statement.htm
    http://technet.microsoft.com/en-us/library/aa213252(v=sql.80).aspx
    Regards Harsh

  • Help out:SQL Assistant for oracle

    Any time i use the logminer utility from the SQLaps SQL Assistant for oracle to query either my redo or archive logs i get this error, but the dictionary.txt file exist in the location specified;
    Please help out with details on how to solve this error:
    ORA-01284: file C\oracle\product\10.2.0\db_1\dictionary.txt cannot be opened
    ORA-06512: at "SYS.DBMS_LOGMNR", line 58
    ORA-06512: at line 1
    kindly help out on the reason for this error and detailed steps to solve this issue

    NAIJA-EXBOY wrote:
    That is how the error appears when you use the GUI utility for the logminer to query the alert logs,
    Does anybody have ideas on how logminer utility works using this software "SQL Assistant for oracle""SQL Assistant for Oracle" doesn't seem to be a tool provided by Oracle, but a third-party tool. Therefore I suggest you contact their technical support for your inquiry.
    As a workaround, as already suggested, you might want to use the DBMS_LOGMNR package to use the LogMiner. It's not that complicated at all and just needs a couple of calls to the DBMS_LOGMNR and optionally DBMS_LOGMNR_D packages. You can check the documentation on how to use it.
    If you have Oracle Enterprise Manager you could access the LogMiner interface using the Java Console version prior to 11g.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Need help on SQL Statement for UDF

    Hi,
    as I am not so familiar with SQL statements on currently selected values, I urgently need help.
    The scenario looks as follows:
    I have defined two UDFs named Subgroup1 and Subgroup2 which represent the subgroups dependent on my article groups. So for example: When the user selects article group "pianos", he only sees the specific subgroups like "new pianos" and "used pianos" in field "Subgroup1". After he has selected one of these specific values, he sees only the specific sub-subgroups in field "Subgroup2", like "used grand pianos".
    I have defined UDTs for both UDFs. The UDT for field "Subgroup1" has a UDF called "ArticleGroup" which represents the relation to the article group codes. The UDT for field "Subgroup2" has a UDF called "Subgroup1" which represents the relation to the subgroups one level higher.
    The SQL statement for the formatted search in field "Subgroup1" looks as follows:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP1]  T0 WHERE T0.[U_ArticleGroup]  = (SELECT $[OITM.ItmsGrpCod])
    It works fine.
    However, I cannot find the right statement for the formatted search in field "Subgroup2".
    Unfortunately this does NOT WORK:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2]  T0 WHERE T0.[U_Subgroup1]  = (SELECT $[OITM.U_Subgroup1])
    I tried a lot of others that didn't work either.
    Then I tried the following one:
    SELECT T0.[Name] FROM [dbo].[@B_SUBGROUP2]  T0 WHERE T0.[U_Subgroup1] = (SELECT T1.[Code] FROM [dbo].[@B_SUBGROUP1] T1 WHERE T1.[U_ArticleGroup] = (SELECT $[OITM.ItmsGrpCod]))
    Unfortunately that only works as long as there is only one specific subgroup1 for the selected article group.
    I would be sooooo happy if there is anyone who can tell me the correct statement for my second UDF!
    Thanks so much in advance!!!!
    Edited by: Corinna Hochheim on Jan 18, 2010 10:16 PM
    Please ignore the "http://" in the above statements - it is certainly not part of my SQL.
    Please also ignore the strikes.

    Hello Dear,
    Use the below queries to get the values:
    Item Sub Group on the basis of Item Group
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP]  T0 WHERE T0.[U_GroupCod] =$[OITM.ItmsGrpCod]
    Item Sub Group 1 on the basis of item sub group
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP1]  T0 WHERE T0.[U_SubGrpCod]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP]  T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp])
    Sub group 2 on the basis of sub group 1
    SELECT T0.[Name] FROM [dbo].[@SUBGROUP2]  T0 WHERE T0.[U_SubGrpCod1]=(SELECT T0.[Code] FROM [dbo].[@SUBGROUP1]  T0 WHERE T0.[Name] =$[OITM.U_ItmsSubgrp1])
    this will help you.
    regards,
    Neetu

  • Please help me resolve the Lync server 2013 deployment error: "An error occurred while applying SQL script for the feature BackendStore."

    I am getting an error in "Step 2 - Setup or Remove Lync Server Components" of "Install or Update Lync Server System" step.
    "An error occured while applying SQL script for the feature BackendStore. For details, see the log file...."
    Additionally, all previous steps such as: Prepare Active Directory, Prepare first Standard Edition server, Install Administrative Tools, Create and publish topology are done without any errors. The user that I used to setup the Lync server is member of:
    Administrators
    CSAdministrator
    Domain Admins
    Domain Users
    Enterprise Admins
    Group Policy Creator Owners
    RTCComponentUniversalServices
    RTCHSUniversalServices
    RTCUniversalConfigReplicator
    RTCUniversalServerAdmins
    Schema Admins
    I have tried to re-install all the things and started to setup a new one many times but the same error still occurred. Please see the log below and give me any ideas/solutions to tackle this problem.
    ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.BlobStore'****
    Initializing DbSetupBase
    Parsing parameters...
    Found Parameter: SqlServer Value lync.lctbu.com\rtc.
    Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
    Found Parameter: Publisheracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group;RTC Local Administrators;LCTBU\RTCUniversalServerAdmins.
    Found Parameter: Replicatoracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group.
    Found Parameter: Consumeracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group;RTC Local Read-only Administrators;LCTBU\RTCUniversalReadOnlyAdmins.
    Found Parameter: DbPath Value D:\CsData\BackendStore\rtc\DbPath.
    Found Parameter: LogPath Value D:\CsData\BackendStore\rtc\LogPath.
    Found Parameter: Role Value master.
    Trying to connect to Sql Server lync.lctbu.com\rtc. using windows authentication...
    Sql version: Major: 11, Minor: 0, Build 2100.
    Sql version is acceptable.
    Validating parameters...
    DbName rtcxds validated.
    SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
    DbFileBase rtcxds validated.
    DbPath D:\CsData\BackendStore\rtc\DbPath validated.
    Effective database Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath.
    LogPath D:\CsData\BackendStore\rtc\LogPath validated.
    Effective Log Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    Checking state for database rtcxds.
    Checking state for database rtcxds.
    State of database rtcxds is detached.
    Attaching database rtcxds from Data Path \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath, Log Path \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    The operation failed because of missing file '\\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath\rtcxds.mdf'
    Attaching database failed because one of the files not found. The database will be created.
    State of database rtcxds is DbState_DoesNotExist.
    Creating database rtcxds from scratch. Data File Path = D:\CsData\BackendStore\rtc\DbPath, Log File Path= D:\CsData\BackendStore\rtc\LogPath.
    Clean installing database rtcxds.
    Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    ****Creating DbSetupInstance for 'Microsoft.Rtc.Common.Data.RtcSharedDatabase'****
    Initializing DbSetupBase
    Parsing parameters...
    Found Parameter: SqlServer Value lync.lctbu.com\rtc.
    Found Parameter: SqlFilePath Value C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup.
    Found Parameter: Serveracct Value LCTBU\RTCHSUniversalServices;RTC Server Local Group.
    Found Parameter: DbPath Value D:\CsData\BackendStore\rtc\DbPath.
    Found Parameter: LogPath Value D:\CsData\BackendStore\rtc\LogPath.
    Trying to connect to Sql Server lync.lctbu.com\rtc. using windows authentication...
    Sql version: Major: 11, Minor: 0, Build 2100.
    Sql version is acceptable.
    Validating parameters...
    DbName rtcshared validated.
    SqlFilePath C:\Program Files\Common Files\Microsoft Lync Server 2013\DbSetup validated.
    DbFileBase rtcshared validated.
    DbPath D:\CsData\BackendStore\rtc\DbPath validated.
    Effective database Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\DbPath.
    LogPath D:\CsData\BackendStore\rtc\LogPath validated.
    Effective Log Path: \\lync.lctbu.com\D$\CsData\BackendStore\rtc\LogPath.
    Checking state for database rtcshared.
    Reading database version for database rtcshared.
    Database version for database rtcshared - Schema Version5, Sproc Version 0, Update Version 1.
    Thanks and Regards,
    Thanh Le

    Thanks Lạc
    Phạm 2
    I Had similar issue i end up uninstalling and reinstallting but same issue, then i change the drive but same issue. It was I/O issue. After adjusting my I/O it fix our issue and installation went on without any issue. 
    If any one using KVM here is detail article 
    We just  give this option cache=‘writeback
    using this article http://www.ducea.com/2011/07/06/howto-improve-io-performance-for-kvm-guests/ and http://itscblog.tamu.edu/improve-disk-io-performance-in-kvm/ this fix my issue thanks 

  • Need help on Sql command for count

    Hi,
    I have the following table.
    Temp_Set Table
    ID Names Action
    1 John Delete
    2 John Add
    3 Mary Update
    4 Sim Add
    5 Sim Update
    How do I do a SELECT sql command for count(names) > 1 ?
    Please kindly advise me. Thank you very much.

    It doesnt work when I do this
    SELECT * FROM Temp_Set
    HAVING Count(names) > 1
    It prompts me the following error:
    ORA-00937: not a single-group group function
    00937.00000 - "not a single-group group function"
    *Cause:
    *Action:
    Error at Line:16 Column:7i am not sure but you can try this:
    SELECT B.* FROM
    (SELECT NAMES, COUNT(1) CNT FROM TEMP_SET GROUP BY NAMES) A, TEMP_SET B
    WHERE A.NAMES = B.NAME
    AND CNT > 1

  • Need help for the sql statement !!!!!

    hi all,
    i need a sql statement for a query, how can i get the result from the rownum between 100 and 150?
    plz help

    use a scrollable statement:
    PreparedStatement stat = Connection.prepareStement("select * from blah", ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_UPDATABLE);
    ResultSet rs = stat.executeQuery();
    rs.absolute(100);
    while (rs.next()) {
    String something = rs.get(1);
    Look into the JDK API reference for ResultSet to get an expalantion of scrollable statements.

  • Quick Question... About SQL Developer for MAC - MAC Users please help.

    Hello everyone, I hope that someone out there can tell me that I am not crazy.
    I have installed SQL Developer for Mac OSX to access a MS-SQL database, and perform simple query operations. For the most part, I have been thrilled to have a Mac version of software that's fully featured.
    Details on my current setup:
    SQL Developer
    Version 2.1.1.64
    Build MAIN-64.45
    Mac OSX V10.6.3
    JTDS-1.2.5 JDBC driver
    Database connection is SQL Server 2005
    Anyway, my problem is this... I cannot locate the Query Builder function within this software. I have found the tutorials on how to use it, and it would appear to be located when you right-click the SQL worksheet to open the context menu. This option is not present in my software, and I need to figure out why. This screenshot is what I see when I right-click.
    Does anyone know if this is related to MS-SQL-2005?
    http://img10.imageshack.us/img10/1195/screenshot20100523at102.png
    Any assistance you could provide would be AWESOME! Thank you!
    Edited by: user13118614 on May 23, 2010 3:05 PM

    First of all you need an active connection in the worksheet (upper right drop-down).
    But even then it might not work. Sorry you were "thrilled to have a Mac version of software that's fully featured", because even if it is, MsSQL isn't. The tool is mainly focussed in providing a migration platform to Oracle, so a lot of the cool stuff is Oracle only.
    Regards,
    K.

Maybe you are looking for

  • Unable to install OS X 10.5.2 upgrade from OS X 10.4.11

    Hello, I've been trying to install an upgrade on OS X 10.4.11 on my iMac G5 PowerPC from OS. X 10.5.2 discs. I keep getting the error message "Mac OS X cannot be installed on this computer". I've checked the discussion posts and tried all of the foll

  • Unable to extend tablespace.

    Dear Guru's, When i try to extend PSAPUNDO tablespace, faced the following error. BR0370I Directory /oracle/WIQ/sapreorg/seekobzp created BR0280I BRSPACE time stamp: 2010-10-25 16.53.22 BR0301E SQL error -1587 at location BrCtlCopy-1, SQL statement:

  • Financial Reporting Studio: Formula for percentages in Dynamic report

    Hi, I have a formula problem in Financial Reporting Studio vers. 9.20.582. I created a dynamic report with four columns: 1. Column: Entities Entity A, Entity B 2. Column: Accounts Account A, Account B, Account C 3. Column A: Accounts Data for a selec

  • Exporting pdf with spot colour

    Hi, Im having trouble exporting a pdf with a spot colour from ID. Just one part of my logo is showing as thicker once its exported. I can place in the exact same artwork but using a CYMK colour and the thick shape doesnt show. does any one know why t

  • Ive downloaded and installed Adobe Pro XI but can't open it. What do I need to do?

    I have downloaded and installed the trial for Adobe Pro XI on my Macbook Pro. Its on my desktop. I can see it, but when I try to open, all i get is a list of files and the option to EJECT! What do I need to do to get the program to open? I need to ex