Multi col query

I have a dataset with cols such as Year, FW, Defect, Area, Resp. I need to sum the defects where Year, FW, Area and Resp are the same.
For the life of me I cannot thinnk of how to find similar data in cols like I need.
TIA guys

Ok, thanks, can I replace the table name with a dataset (recordset) from another query?yes, you can:
select
  sum(defect), year, fw, area, resp
from (<your_query_here>)
group by year, fw, area, resp;as long as the inline view "(<your_query_here>)" has all the columns or column aliases (defect, year, fw, area, resp) in the SELECT column list.
pratz

Similar Messages

  • SQL+-MULTI TABLE QUERY PROBLEM

    HAI ALL,
    ANY SUGGESTION PLEASE?
    SUB: SQL+-MULTI TABLE QUERY PROBLEM
    SQL+ QUERY GIVEN:
    SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
    HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
    DLC_POLYMORPHS_NORMAL_VALUE FROM PATIENTS_MASTER1, HAEMATOLOGY1,
    DIFFERENTIAL_LEUCOCYTE_COUNT1
    WHERE PATIENT_NUM = HMTLY_PATIENT_NUM AND PATIENT_NUM = DLC_PATIENT_NUM AND PATIENT_NUM
    = &PATIENT_NUM;
    RESULT GOT:
    &PATIENT_NUM =1
    no rows selected
    &PATIENT_NUM=2
    no rows selected
    &PATIENT_NUM=3
    PATIENT_NUM 3
    PATIENT_NAME KKKK
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 4
    HMTLY_RBC_NORMAL 4.6-6.0
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     60
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    ACTUAL WILL BE:
    &PATIENT_NUM=1
    PATIENT_NUM 1
    PATIENT_NAME BBBB
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 5
    HMTLY_RBC_NORMAL 4.6-6.0
    &PATIENT_NUM=2
    PATIENT_NUM 2
    PATIENT_NAME GGGG
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     42
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    &PATIENT_NUM=3
    PATIENT_NUM 3
    PATIENT_NAME KKKK
    HMTLY_TEST_NAME HAEMATOLOGY
    HMTLY_RBC_VALUE 4
    HMTLY_RBC_NORMAL 4.6-6.0
    DLC_TEST_NAME DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE     60
    DLC_POLYMORPHS_NORMAL_VALUE     40-65
    4 TABLES FOR CLINICAL LAB FOR INPUT DATA AND GET REPORT ONLY FOR TESTS MADE FOR PARTICULAR
    PATIENT.
    TABLE1:PATIENTS_MASTER1
    COLUMNS:PATIENT_NUM, PATIENT_NAME,
    VALUES:
    PATIENT_NUM
    1
    2
    3
    4
    PATIENT_NAME
    BBBB
    GGGG
    KKKK
    PPPP
    TABLE2:TESTS_MASTER1
    COLUMNS:TEST_NUM, TEST_NAME
    VALUES:
    TEST_NUM
    1
    2
    TEST_NAME
    HAEMATOLOGY
    DIFFERENTIAL LEUCOCYTE COUNT
    TABLE3:HAEMATOLOGY1
    COLUMNS:
    HMTLY_NUM,HMTLY_PATIENT_NUM,HMTLY_TEST_NAME,HMTLY_RBC_VALUE,HMTLY_RBC_NORMAL_VALUE     
    VALUES:
    HMTLY_NUM
    1
    2
    HMTLY_PATIENT_NUM
    1
    3
    MTLY_TEST_NAME
    HAEMATOLOGY
    HAEMATOLOGY
    HMTLY_RBC_VALUE
    5
    4
    HMTLY_RBC_NORMAL_VALUE
    4.6-6.0
    4.6-6.0
    TABLE4:DIFFERENTIAL_LEUCOCYTE_COUNT1
    COLUMNS:DLC_NUM,DLC_PATIENT_NUM,DLC_TEST_NAME,DLC_POLYMORPHS_VALUE,DLC_POLYMORPHS_
    NORMAL_VALUE,
    VALUES:
    DLC_NUM
    1
    2
    DLC_PATIENT_NUM
    2
    3
    DLC_TEST_NAME
    DIFFERENTIAL LEUCOCYTE COUNT
    DIFFERENTIAL LEUCOCYTE COUNT
    DLC_POLYMORPHS_VALUE
    42
    60
    DLC_POLYMORPHS_NORMAL_VALUE
    40-65
    40-65
    THANKS
    RCS
    E-MAIL:[email protected]
    --------

    I think you want an OUTER JOIN
    SELECT PATIENT_NUM, PATIENT_NAME, HMTLY_TEST_NAME, HMTLY_RBC_VALUE,
    HMTLY_RBC_NORMAL_VALUE, DLC_TEST_NAME, DLC_POLYMORPHS_VALUE,
    DLC_POLYMORPHS_NORMAL_VALUE
    FROM PATIENTS_MASTER1, HAEMATOLOGY1,  DIFFERENTIAL_LEUCOCYTE_COUNT1
    WHERE PATIENT_NUM = HMTLY_PATIENT_NUM (+)
    AND PATIENT_NUM = DLC_PATIENT_NUM (+)
    AND PATIENT_NUM = &PATIENT_NUM;Edited by: shoblock on Nov 5, 2008 12:17 PM
    outer join marks became stupid emoticons or something. attempting to fix

  • Can PQO been used in DML statements to speed up multi-dimension query ?

    We have
    limit dim1 to var1 ne na
    where dim1 is a dimension.
    var1 is a variable dimensioned by dim1.
    This is pretty much like SQL table scan to find the records. Is there a PQO (parallel query option)-like option in DML to speed up multi-dimension query ?

    This is one of the beauties of the OLAP Option, all the query optimisation is managed by the engine itself. It resolves the best way to get you the result set. If you have partitioned your cube the query engine will perform the same way as the relational query engine and employ partition elimination.
    Where things can slow down is where you used compression, since to answer a question such as "is this cell NA?" all rows in the cube need to be uncompressed before the query can be answered and result set generated. Compression technology works best (i.e. is least intrusive in terms of affecting query performance) where you have a very fast CPU. However, the overall benefits of compression (smaller cubes) nearly always outweigh the impact of having to uncompress data to answer a specific question. Usually the impact is minimal if you partition your cube, since the un-compress function only needs to work on a specific partition.
    In summary, the answer to your question is "No", because the OLAP engine automatically optimises the allocation of resources to return the result-set as fast as possible.
    Is there a specific problem you are experiencing with this query?
    Keith Laker
    Oracle EMEA Consulting
    OLAP Blog: http://oracleOLAP.blogspot.com/
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    DM Blog: http://oracledmt.blogspot.com/
    OWB Blog : http://blogs.oracle.com/warehousebuilder/
    OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • Multi-fact Query

    Hi all,
    Our software group is looking at creating a tool that will query multi-fact star schema environment. What are my options?
    So far, we have 7 fact tables and 6 dimensions (all shared by the facts). There are no aggregate tables.
    My first thought was one large aggregate table, however the dimensions are all normalized to their particular fact table. So, a customer dimension (for instance) would repeat customers if they fall into multiple fact tables. The dimensions are more complicated than that, but you get the idea. There are only two that are truly normalized...and yes one is TIME. :)

    If you have data that shares all the same dimensions, it almost always makes sense to keep it together in a single fact table. The general guideline is only to split out a new fact table if the dimensionality of the data is different.
    Unions and joins typically just end up slowing things down.
    The only exception I've really seen to this rule is when one set of facts has orders of magnitude more data points then the others. I.e. if you have actuals data that has 100 million rows, but budget data (with the same dimensionality) with only 200,000 rows. This doesn't happen often, but I suppose it could potentially occur.
    Scott

  • Transferring multi-column query result into MS Excel

    Hello everybody!
    An ultimate novice in Oracle, with some database concepts, is here.
    The very first challenge; which I encoutered is that I want to transfer a Select query result, with multiple columns, into MS Excel sheet in a way that each field occupies a separate column in the sheet.
    I hope the forum members will show me a simple way to get around the problem.
    Thanks in anticipation.
    Rabi

    what will happen the query returns too many rows that
    Excel cant hold? I faced this problem and divided the
    report into "n" numbers based on the number of rows
    returned. Is there any internal logic for it in
    oracle?Excel is capable of holding 65536 rows of data on a sheet.
    Oracle is capable of writing data out to files.
    Oracle does not know or care whether the file it is writing is for Excel or any other product, as the file you are likely to be writing is CSV (comma seperate format) which is an open format, not specifically for Excel. If you need to limit the number of rows per CSV file then you will have to code this "business logic" into your code that produces the CSV file from Oracle.

  • Multi Provider Query Problem

    Hi Friends,
    I was created a new multiprovider which contains two InfoCubes, First infocube contains the Site & Material and second infocube contains only Material, so when i executed the query it is Showing the first cube Values in some rows, after ending the first query values, it is showing the second query values, i am unable to finding the solution.
    Plz help me.
    Regards,
    Rams.
    Message was edited by:
            Rams Rams

    Hi,
    Check in the multiprovider option if you have selected the material number to match with both infoproviders, in order to do this :
    1)Double click in MultiProvider
    2)Next
    3)Characteristic Tab, click in Identification Button.
    4)Check if the material number is selected in both infoprovider
    End
    Regards
    Asign point if useful

  • Button/multi state query

    Hello all
    I’m encountering a challenge which I believe has been discussed on these forums.
    This relates to pixelated, blurry text within buttons and multi-state objects.
    One solution to this issue is not using the objects containing text as buttons or multi-state objects. Instead, you insert shapes with no fill/stroke on top of text graphics and then grouping them.
    This ensures the text is sharp and clear.
    However, if you wish to have a roll over state, with a different fill/stroke/text colour as part of the roll-over state, then this poses problems as the shape serving as a button has to have no fill/stroke or text within them.
    Has around a work around for this problem?
    Many thanks
    H

    For clear buttons with click states, the easiest workaround is to place a dummy button over the image and change the stroke and perhaps even add a transparency fill. There is another more complicated workaround as well. For examples and instructions, see DPS Tips > Advanced Overlays > Sharp Buttons.
    http://contentviewer.adobe.com/s/DPS%20Tips/7f80a0ffed3a4ff08734bc905aac4a29/Advanced_Over lays/12_button_crisp.html

  • Run a SQL procedure with multi database querying from Excel

    I'm using SQL Server 2008 Enterprise. I created a procedure in one database. The procedure is composed of several queries to different databases and the final combined result set is being displayed.
    I try to execute it via Excel, so the results will appear automatically in Excel sheet, but I'm getting the error:
    "The query did not run, or the database table could not be opened. Check the database server or contact your DBA. Make sure the external
    database is available and hasn't been moved or recognized, then try the operation again".
    I created a simpler procedure that queries only one database, and the results displayed at the Excel sheet with no issues.
    I suspect that, the original procedure failed due to the fact that I'm querying several databases in the procedure, when in the connection details of the "External Data Properties", only one database is mentioned.
    My question is - can it be solved? Can I use multiple databases in the procedure and see it in the Excel?
    Thanks, Roni

    Use Global Temporary table(##) instead of Local Temporary table(#).
    The scope of the temp table is limited to one database and it dispose automatically when jump to another database.
    No, that is not correct. From where did you get that idea?
    USE tempdb
    go
    CREATE TABLE #a(a int NOT NULL)
    INSERT #a(a) VALUES(9)
    go
    USE master
    go
    SELECT a FROM #a
    go
    USE msdb
    go
    SELECT a FROM #a
    go
    DROP TABLE #a
    And Roni's stored procedure does not even change database.
    ...however, the temp tables may very well be the problem, but for a completely different reason. Excel may ask SQL Server for the shape of the result set before it runs the procedeure, and this does not work with the temp tables. For this reason, using a
    table variable my save the show.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Multi-layers query

    According to the definition of the layer given in Oracle Spatial documentation every layer is locating in its own table. I have a scheme there multiple layers share same coordinate system and exist some coordinate systems. For each coordinate system i have to define own table with geometries. It is clear. The question is why i have to separate multiple layers ti different tables and cannot keep all geometry primitives in on table no matter to which layer they belong ? I can add some kind of identification for layer id and do query according to the layer id first and then by RELATE function (for instance) ...
    Index can be defined for this layer id that will speed up query.
    From other side managment of multiple tables demands dynamic SQL scripts a lot of check ups etc.
    What is conventional way to design such a system ?
    I need an answer ASAP
    Thank you
    null

    I don't know anything about the requirements
    of your application.
    But, do you display 200 layers on
    your map at the same time?
    It seems like there would be too much data displayed to be meaningful to a user.
    If for example you are drawing 10 of the
    200 layers, it will probably be more efficient to query the 10 layers (each in their own table), than to query a single table with all 200 layers and sift out
    the 10 layers you are interested in by some
    attribute ID.
    The spatial index would not have to
    sift through the index records for the
    190 layers you are not interested in.
    Hope this helps. Thanks.
    Dan

  • Multi-Schema Query

    Hello,
    Please forgive me if this is an elementary question...I'm trying to run a query against multiple schema's but it does not work. I've Associated both schema's with my workspace and I tried running it in the SQL Workshop and it runs fine there. When I create a report page and specify the query there it tells me that table/view does not exist. I also tried building it using the query builder utility, the second schema name does not appear on the drop down list at the top right of the page.
    Can anyone help out with this?
    Thanks!!!

    Hello:
    Generally, if a query runs from SQL Workshop you should be able to use the query in an APEX report.
    Check if making an explicit grant on the table in the other schema to the default schema of your application makes a difference.
    Example: If SchemaA and SchemaB are the two schemas allowed for your workspace and if TableA exists in SchemaA and TableB exists in SchemaB
    Grant select on SchemaA.TableA to SchemaB
    Grant select on SchemaB.TableB to SchemaAVarad

  • Multi Languel query

    Hi All,
    Need Help:
    If multi-language has been enabled in MDM, in order to provide a different language description for an item using portal, does the user have to login with a different language each time?
    Waiting for revert.
    Regards,
    Ms.Das

    Heyy ,
    I have not came across with particular API functions with multilingual.
    but you can refer below URL's
    http://help.sap.com/javadocs/MDM/SP04/com/sap/mdm/data/MultilingualString.html
    Re: SAP MDM API 7.1, Region Codes
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0e8aedc-cdfe-2c10-6d90-bea2994455c5?quicklink=index&overridelayout=true
    Hope it helps.
    Deep

  • Multi database query

    Is it possible to query two databases at the same time?
    If not is there a workaround for this issue?
    Thanks

    Hi,
    i'm trying to understand your query but i have seen that i have an archive log that for oracle hasn't been transferred but it is already on the standby site. So if i run it (let's say every 10 minutes in a script to check what happens) i always have that this archive has not been transferred.
    Is this right what i'm running?
    SELECT name,sequence#
    FROM v$archived_log
    WHERE standby_dest = 'NO'
    AND sequence#
    NOT IN (SELECT sequence#
    FROM v$archived_log
    WHERE standby_dest = 'YES')
    AND sequence# >
    (SELECT min(sequence#)
    FROM v$archived_log
    WHERE standby_dest = 'YES');
    About what i'm doing is as i told you run the gapcheck on the standby site, if there's a check stop managed, copy the file from primary (with rcp) apply it and the go back to managed.
    Do you know a way that if the archiving fails on the standby site sends a message, email or something so that we are awared of what's happening?

  • Need help w/pivot table. dsplay multi cols as col delimited, data fm 2 tbls

    I need to disply data from tbl 1 with qty's from tbl2.
    disply qty's i.e. (if qyt_type = 'past', display column in ',' deliminated) as "Past_qty"
    colmns in 1st tbl
    name,pgm,type,code
    aaa bbb 3 x
    aaa ccc 3 z
    colmns in 2nd tbl (first three cols are refer integ to the 1st tbl)
    name,pgm,type,qty_type,qty
    data in tbl 2
    name pgm type qty_type qty
    aaa bbb 3 past 0
    aaa bbb 3 past 0
    aaa ccc 3 past 1
    aaa ccc 3 past 3
    aaa bbb 3 present 0
    aaa bbb 3 present 0
    aaa bbb 3 future 0
    aaa bbb 3 future 0
    need it to look like this
    name pgm type past_qty present_qty future_qty, code
    aaa bbb 3 0,0 0,0 0,0 x
    aaa ccc 3 1,3 z
    there are 12 past qtys, 38 present qtys and 60 future qtys
    thank you in advance

    Oh well, guess I needed some little exercise.
    Here it is:
    SQL> create table first_table
      2  as
      3  select 'aaa' name, 'bbb' pgm, 3 type, 'x' code from dual union all
      4  select 'aaa', 'ccc', 3, 'z' from dual
      5  /
    Tabel is aangemaakt.
    SQL> create table second_table
      2  as
      3  select 'aaa' name, 'bbb' pgm, 3 type, 'past' qty_type, 0 qty from dual union al
      4  select 'aaa', 'bbb', 3, 'past', 0 from dual union all
      5  select 'aaa', 'ccc', 3, 'past', 1 from dual union all
      6  select 'aaa', 'ccc', 3, 'past', 3 from dual union all
      7  select 'aaa', 'bbb', 3, 'present', 0 from dual union all
      8  select 'aaa', 'bbb', 3, 'present', 0 from dual union all
      9  select 'aaa', 'bbb', 3, 'future', 0 from dual union all
    10  select 'aaa', 'bbb', 3, 'future', 0 from dual
    11  /
    Tabel is aangemaakt.
    SQL> select f.name
      2       , f.pgm
      3       , f.type
      4       , stragg(decode(s.qty_type,'past',s.qty)) past_qty
      5       , stragg(decode(s.qty_type,'present',s.qty)) present_qty
      6       , stragg(decode(s.qty_type,'future',s.qty)) future_qty
      7       , f.code
      8    from first_table f
      9       , second_table s
    10   where f.name = s.name
    11     and f.pgm = s.pgm
    12     and f.type = s.type
    13   group by f.name
    14       , f.pgm
    15       , f.type
    16       , f.code
    17  /
    NAM PGM        TYPE PAST_QTY             PRESENT_QTY          FUTURE_QTY           C
    aaa bbb           3 0,0                  0,0                  0,0                  x
    aaa ccc           3 1,3                                                            z
    2 rijen zijn geselecteerd.Regards,
    Rob.

  • Need help with multi database query.

    Hello,
    I am working on a query between multiple databases to be view on a web app.  We have multiple web apps and we are integrating some functionality between them all into one page. 
    The data will be for a delegate someone sets for themselves (they can have more then one also).  I need a way to pull the data view it as follows.
    User, UserNumber, DelegateName, ForApp, ForApp, ForApp, ForApp, ForApp, ForApp
    I have had no problem pulling the delegates themselves and which apps they are a delegate for,  but not which person they are the delegate for.
    SELECT DISTINCT
    dbo.Employee.Position_Num AS Delegate_Position, dbo.Employee.Name AS [Delegate Name],
    (CASE WHEN Hierarchy.dbo.Employee.Position_Num = CVI_Delegate.Delegate THEN 1 ELSE 0 END) AS For_CVI,
    (CASE WHEN Hierarchy.dbo.Employee.Position_Num = Travel_Delegate.Delegate THEN 1 ELSE 0 END) AS For_Travel,
    (CASE WHEN Hierarchy.dbo.Employee.Position_Num = Dept_Deposits_Delegate.Delegate THEN 1 ELSE 0 END) AS For_DeptDeposit,
    dbo.OKCorral_Delegate.For_UserRoles AS For_OkCorralUR, dbo.OKCorral_Delegate.For_FiscalApprover AS For_OkCorralFA,
    (CASE WHEN Hierarchy.dbo.Employee.Position_Num = Reqs_Delegate.Delegate THEN 1 ELSE 0 END) AS For_Reqs
    FROM dbo.Employee LEFT OUTER JOIN
    Reqs.dbo.Delegate AS Reqs_Delegate ON dbo.Employee.Position_Num = Reqs_Delegate.Position LEFT OUTER JOIN
    DeptDeposits.dbo.Delegate AS Dept_Deposits_Delegate ON dbo.Employee.Position_Num = Dept_Deposits_Delegate.Position LEFT OUTER JOIN
    CVI.dbo.Delegate AS CVI_Delegate ON dbo.Employee.Position_Num = CVI_Delegate.Position LEFT OUTER JOIN
    dbo.OKCorral_Delegate ON dbo.Employee.Position_Num = dbo.OKCorral_Delegate.Position LEFT OUTER JOIN
    Travel.dbo.Delegate AS Travel_Delegate ON dbo.Employee.Position_Num = Travel_Delegate.Position
    This query works fine.  The problem I run into is I have to use the same Employee table to get the EmployeeName and Number
    Which will be used for both the person and the delegate.  Any ideas will be a great help.  It had been suggested I use a procedure to accomplish this, but I have no idea where to start that at.  I also have tried a nested sbu-query but since
    a person can have more then one delegate for an app,  this through errors.  Thanks.
    George Fields

    Ok,  here are the tables Travel Application Database/Delegate Table
    INSERT INTO [Travel].[dbo].[Delegate]
    ([Position]
    ,[Delegate]
    ,[StartDate]
    ,[EndDate]
    ,[CreateDate]
    ,[EditDate])
    VALUES
    (<Position, char(6),>
    ,<Delegate, char(6),>
    ,<StartDate, datetime,>
    ,<EndDate, datetime,>
    ,<CreateDate, datetime,>
    ,<EditDate, datetime,>)
    GO
    Requistions Application /Table Delegates
    INSERT INTO [Reqs].[dbo].[Delegate]
    ([Position]
    ,[Delegate]
    ,[StartDate]
    ,[EndDate]
    ,[CreateDate]
    ,[EditDate])
    VALUES
    (<Position, char(6),>
    ,<Delegate, char(6),>
    ,<StartDate, datetime,>
    ,<EndDate, datetime,>
    ,<CreateDate, datetime,>
    ,<EditDate, datetime,>)
    GO
    Heirarchy Database for Purchasing Application / Delegates Table
    INSERT INTO [Hierarchy].[dbo].[OKCorral_Delegate]
    ([Dept_Campus]
    ,[For_DeptNum]
    ,[Position]
    ,[Delegate]
    ,[StartDate]
    ,[EndDate]
    ,[CreateDate]
    ,[EditDate]
    ,[For_FiscalApprover]
    ,[For_UserRoles])
    VALUES
    (<Dept_Campus, char(2),>
    ,<For_DeptNum, char(5),>
    ,<Position, char(6),>
    ,<Delegate, char(6),>
    ,<StartDate, datetime,>
    ,<EndDate, datetime,>
    ,<CreateDate, datetime,>
    ,<EditDate, datetime,>
    ,<For_FiscalApprover, bit,>
    ,<For_UserRoles, bit,>)
    GO
    Heirarchy Database / Employee Table
    INSERT INTO [Hierarchy].[dbo].[Employee]
    ([Dept_Num]
    ,[Position_Num]
    ,[Email]
    ,[Name]
    ,[Campus]
    ,[CWID]
    ,[Student]
    ,[Employee]
    ,[OPID]
    ,[Gender]
    ,[Birth_Date])
    VALUES
    (<Dept_Num, char(5),>
    ,<Position_Num, char(6),>
    ,<Email, varchar(75),>
    ,<Name, varchar(150),>
    ,<Campus, char(2),>
    ,<CWID, varchar(16),>
    ,<Student, char(1),>
    ,<Employee, char(1),>
    ,<OPID, char(4),>
    ,<Gender, char(1),>
    ,<Birth_Date, char(8),>)
    GO
    The other two databases also have a delegate table similar to the ones above.  As you can see all information about an employee is linked by their position number in the Employee Table.
    The Position Number is used in the Position field and Delegate field of all the Delegate tables.
    I am needing to pull an employee (actually all of them) List them and then show delegates for them by which applications the delegate holds permissions too. Which is the purpose of the delegate.  So a delegate may only be a delegate for one application
    or multiple which is why I am pulling from multiple databases.
    George Fields

  • SSRS : Reporting Services - Multi-Value Parameter Issue

    Hi,
    This problem is been around the blogs and forums for while now but may be it's not answered to the fullest. I couldn't get any satisfactory or completed solution on the issue so far, any clues/help will be highly appreciated.
    My scenario is very simple :-
    I am using SQL Server 2005 and SSRS. I need to develop a report which has a parameter value called Customer Name. The users should be able to select multiple customers from the list and sometimes Select All also.  I tried the following :-
    Created two data sets : Second dataset is just to populate the Customer Name
    Created a Report Parameter and mapped with the query parameter where it says  "Where CName in (@Parameter1)"
    Nothing seems to be working although I tried to apply all the existing half-way solutions currently available in the forums. May be I am not getting to the right solution.
    Here is what's happening :-
    When used '?' like "where CName = ?" then it's working fine for the single value. {Multi value query cannot be used with ?}
    But for multiple values when used @Parameter1 like "where CName in (@Parameter1)" it's giving the following error
    Cannot add multi value query parameter '@Parameter1' for data set 'Dataset1' because it is not supported by the data extension.
    However if commented this line it's pulling all the values whether or not selected from the parameter list.
    This is the basic thing which I was not able to get the desired result, in addition I was looking to get the Customer Name parameter selected with a partial entry as we use LIKE. Example :- If the user enters 'St' in the text box the list should show all the names starting from those two letters
    Starter
    Steve
    Steven
    Stevenson etc.
    I am not sure whether I'll will be able to get to this extent or not but until the multi value parameter, I am desperate to get the solution. So any sort of help/advise is highly appreciated.
    Regards,

    Hi,
    This problem is been around the blogs and forums for while now but may be it's not answered to the fullest. I couldn't get any satisfactory or completed solution on the issue so far, any clues/help will be highly appreciated.
    My scenario is very simple :-
    I am using SQL Server 2005 and SSRS. I need to develop a report which has a parameter value called Customer Name. The users should be able to select multiple customers from the list and sometimes Select All also.  I tried the following :-
    Created two data sets : Second dataset is just to populate the Customer Name
    Created a Report Parameter and mapped with the query parameter where it says  "Where CName in (@Parameter1)"
    Nothing seems to be working although I tried to apply all the existing half-way solutions currently available in the forums. May be I am not getting to the right solution.
    Here is what's happening :-
    When used '?' like "where CName = ?" then it's working fine for the single value. {Multi value query cannot be used with ?}
    But for multiple values when used @Parameter1 like "where CName in (@Parameter1)" it's giving the following error
    Cannot add multi value query parameter '@Parameter1' for data set 'Dataset1' because it is not supported by the data extension.
    However if commented this line it's pulling all the values whether or not selected from the parameter list.
    This is the basic thing which I was not able to get the desired result, in addition I was looking to get the Customer Name parameter selected with a partial entry as we use LIKE. Example :- If the user enters 'St' in the text box the list should show all the names starting from those two letters
    Starter
    Steve
    Steven
    Stevenson etc.
    I am not sure whether I'll will be able to get to this extent or not but until the multi value parameter, I am desperate to get the solution. So any sort of help/advise is highly appreciated.
    Regards,
    you speak spanish

Maybe you are looking for