One row totals

Hi, on Discoverer Viewer (Release 4.1.44) I created totals, but when there is only one row composing the total, is not showing the total on the report. On Discoverer Desktop is showing all the totals correctly, independently the amount of rows that compose that total. Is there a way to force the Discoverer Viewer to show all totals?
Is it a release issue (I'm using Desktop 4.1.37)?
Thanks,
Ivo

You are correct on both, it could the the outer join may
be wrong or he may have just an inner join, and I don't
believe there was a totaling issue in 4.1.37, but the totals
are working in the desktop and not the viewer.
Usually when I have an incorrect join I can't get totals
in the desktop either. I do remember going crazy one time
because I was getting totals in the desktop and plus
(web version I believe it was called in 4.x) but the viewer
would not show the totals, finally by accident I was reading
something on meta link and it talked about this issue. When
I looked at the properties for the field I was trying to total and
the default position was set to top I changed it to data point
and it took care of the problem.
I am not claiming with authority that that is the problem in this case,
I was just trying to suggest to check the default position.

Similar Messages

  • How to get the sum total of just one row in the dashboard

    How do I get the sum total of one row in the compound layer results. This is 11g
    Does anyone know?
    may be sales, I need the total at the bottom of the row..
    thx
    Chuck

    I fnd the answer,
    in the table view, click edit then nxt to the columns and measures there is total sum icon. Click that, and choose after

  • Discoverer Report Row Total

    We are running Oracle BI Discoverer Viewer version 11.1.1.4.0. When we upgraded to this version we lost some functionality. In the previous version the report displayed the number of rows the query returned. Now the row totals display only under certain conditions. For instance, I have a inventory report name INV-REP-120 and it prompts the user for 6 parameters & displays 6 columns of data. One of the parameters is named ‘Keyword' and I’ll use this one in the problem description. When I set the keyword parameter to ‘HINGE’ The bar at the top of the results sheet it displays:
    ‘Rows 1-25 of 81, Columns 1-6 of 9’
    When I change the keyword to ‘TUBE’ the viewer displays:
    ‘Rows 1-25, Columns 1-6 of 9’
    The total rows are not displayed but the number of pages. It appears that if the total number of rows is less than 200 then the row total is displayed. I changed the rows displayed from 25 to 100 and scrolled down to the last page and now the reports displays:
    ‘451 – 458 of 458, Columns 1-6 of 9’
    When I use the key word TEE I get :
    ‘Rows 1-50, Columns 1-6 of 9’
    There are 596 tees, which would be about 12 pages of 50 rows. I noticed that at the top of table there is a field ‘Page 1 of 5.’ It looks like if there are more than 5 pages it does not display the total number of rows.
    There seems to be some interaction between the total number of rows the number of rows per page and perhaps a setup on the back-end that determines whether or not the row total is displayed. How can I configure the viewer at the front-end and/or back-end to consistently display the row total for a report? Is there a Discoverer preference located in the pref.txt in the apps server that controls this?

    Hi,
    You can inform to your SP to edit the table EUL4_documents
    and ask him to modify the name of the report that is stored in the column DOC_NAME .There is absolutely no necessary to open the work book that is stored in the database and change the work book name
    Regards
    Swamy!

  • How do I sort my whole spreadsheet based on one row?

    I'm using Numbers on my iPad to inventory a school's computer systems.  I'm kind of doing it slowly as I get time, so I'm not inventorying in any particular order.  I just go in a room when I get a chance and then inventory everything in it. 
    I have different columns for room, asset #, make, model, serial, inventory date
    Just a few minutes ago, I was trying to sort my sheet by the asset # so I could see what gaps I have in the asset numbers.  I selected the top bar and it highlights the whole column.  Then I select sort and it only sorts the one column, which then totally screws up my sheet because my asset numbers are next to different random PCs that I just happened to inventory first.  So, of course, I undo it.  But I would like to be able to sort by asset # and have it sort all the cells based on the asset #, or sort by make or model and then I could see all the computers with a certain make or model and where they're at.  There has to be a way to do this.

    I probably said it backwards.  I've been calling them columns...  I think I mean rows.  The rows have data up and down.  I want to sort it so the lowest values at the top and highest values at the bottom.  But I want all the other cells to stay sorted.  Right now if I just select sort for the row, it sorts the one row and not the rest of them so it totally messes up my sheet.
    It's just an inventory that I have a field that says make, model, asset #, serial, room #, etc.
    I'd like to sort by asset # to see all the PCs and if I have a gap.  Then I'd like to sort it by room number so when I walk in a room, I can tell if I missed a PC in the room and verify what I have.  Then I might want to sort by the year row when we decide to upgrade so I can put all the oldest PCs first.  But if it just sorts the row and not all the other columns in the row, it totally messes up my sheet.  It just puts my years of pc from oldest to newest but didn't sort the rest of the fields.  In Excel, if I do that, it sorts all the fields based on the one row.
    I'm not sure how to give you a screenshot off my ipad.

  • SQL*Plus two fetches for getting one row.

    Hi all.
    I have tested following script.
    alter session set events '10046 trace name context forever, level 12';
    select * from dual;And achieved such results (extract from .trc file).
    SQL*Plus: Release 11.2.0.1.0; (Oracle Version 10.2.0.4.0, 11.2.0.1.0)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          0          0           1
    total        4      0.00       0.00          0          0          0           1SQL*Plus: Release 8.1.7.0.0; (Oracle Version 8.1.7.0.0)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        2      0.00       0.00          0          1          4           1
    total        5      0.00       0.00          0          1          4           1Allround Automations PL/SQL Developer 8.0.4; (Oracle Version 10.2.0.4.0, 11.2.0.1.0)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          0          0           1
    total        3      0.00       0.00          0          0          0           1Allround Automations PL/SQL Developer 8.0.4; (Oracle Version 8.1.7.0.0)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        1      0.00       0.00          0          1          4           1
    total        3      0.00       0.00          0          1          4           11) I can't figure out why sqlplus does TWO fetches for getting ONE row (instead of pl/sql developer).
    8i raw trace
    PARSING IN CURSOR #1 len=31 dep=0 uid=0 oct=3 lid=0 tim=0 hv=3549852361 ad='4a0155c'
    select 'hello world' from dual
    END OF STMT
    PARSE #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=0
    BINDS #1:
    EXEC #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=4,tim=0
    WAIT #1: nam='SQL*Net message to client' ela= 0 p1=1111838976 p2=1 p3=0
    FETCH #1:c=0,e=0,p=0,cr=1,cu=4,mis=0,r=1,dep=0,og=4,tim=0
    WAIT #1: nam='SQL*Net message from client' ela= 0 p1=1111838976 p2=1 p3=0
    FETCH #1:c=0,e=0,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,tim=0
    WAIT #1: nam='SQL*Net message to client' ela= 0 p1=1111838976 p2=1 p3=0
    WAIT #1: nam='SQL*Net message from client' ela= 0 p1=1111838976 p2=1 p3=0
    STAT #1 id=1 cnt=1 pid=0 pos=0 obj=195 op='TABLE ACCESS FULL DUAL '11g raw trace
    PARSING IN CURSOR #3 len=30 dep=0 uid=96 oct=3 lid=96 tim=1581355246985 hv=1158622143 ad='b8a1bcdc' sqlid='5h2yvx92hyaxz'
    select 'hello world' from dual
    END OF STMT
    PARSE #3:c=0,e=130,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1388734953,tim=1581355246984
    EXEC #3:c=0,e=40,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,plh=1388734953,tim=1581355247154
    WAIT #3: nam='SQL*Net message to client' ela= 7 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=1581355247252
    FETCH #3:c=0,e=18,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,plh=1388734953,tim=1581355247324
    STAT #3 id=1 cnt=1 pid=0 pos=1 obj=0 op='FAST DUAL  (cr=0 pr=0 pw=0 time=0 us cost=2 size=0 card=1)'
    WAIT #3: nam='SQL*Net message from client' ela= 193 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=1581355247735
    FETCH #3:c=0,e=2,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=0,plh=1388734953,tim=1581355247800
    WAIT #3: nam='SQL*Net message to client' ela= 5 driver id=1111838976 #bytes=1 p3=0 obj#=-1 tim=15813552478552) Is there any possibility to view data provided by each fetch?
    Thanks in advance!
    P.S.
    SQL> sho arraysize
    arraysize 15

    Thanks.
    I have tested two statements.
    select 'hello world' from dual where 1=1;
    select 'hello world' from dual where 1=0;When query returns no data, there is only one SQL*Net roundtrip (and one fetch)
    SQL> set autot on statistics
    SQL> select 'hello world' from dual where 1=1;
    'HELLOWORLD
    hello world
    Statistics
              0  recursive calls
              0  db block gets
              0  consistent gets
              0  physical reads
              0  redo size
            528  bytes sent via SQL*Net to client
            492  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> select 'hello world' from dual where 1=0;
    no rows selected
    Statistics
              0  recursive calls
              0  db block gets
              0  consistent gets
              0  physical reads
              0  redo size
            329  bytes sent via SQL*Net to client
            481  bytes received via SQL*Net from client
              1  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              0  rows processedBut in both cases i found in client trace this sequence of bytes:
    ] nsprecv: 00 00 36 01 00 00 00 00  |..6.....|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 90 19 43 13 00 00  |....C...|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 00 00 00 00 00 00  |........|
    ] nsprecv: 00 00 19 4F 52 41 2D 30  |...ORA-0|
    ] nsprecv: 31 34 30 33 3A 20 6E 6F  |1403:.no|
    ] nsprecv: 20 64 61 74 61 20 66 6F  |.data.fo|
    ] nsprecv: 75 6E 64 0A              |und.    |In first case - it was in 2nd packet and in second case (query returns no data) - part of 1st packet.

  • SQL Server 2012 Undetected Deadlock in a table with only one row

      We have migrated our SQL 2000 Enterprise Database to SQL 2012 Enterprise few days ago.
      This is our main database, so most of the applications access it.
      The day after the migration, when users started to run tasks, the database access started to experiment a total failure.
      That is, all processes in the SQL 2k12 database were in lock with each other. This is a commom case of deadlock, but the Database Engine was unable to detect it.
      After some research, we found that the applications were trying to access a very simple table with only one row. This table has a number that is restarted every day and is used to number all the transactions made against the system.   So, client
    applications start a new transaction, get the current number, increment it by one and commit the transaction.
      The only solution we found was to kill all user processes in SQL Server every time this situation occurs (no more than 5 minutes when all clients are accessing the database).
      No client application was changed in this migration and this process was working very well for the last 10 years.
      The problem is that SQL 2k12 is unable to handle this situation compared to SQL 2k.
      It seems to occurs with other tables too, but as this is an "entry table" the problem occurs with it first.
      I have searched internet and some suggest some workarounds like using table hints to completely lock the table at the begining of the transaction, but it can't be used to other tables.
      Does anyone have heard this to be a problem with SQL 2k12? Is there any fixes to make SQL 2k12 as good as SQL 2k?

    First off re: "Unfortunatelly, this can't be used in production environment as exclusive table lock would serialize the accesses to tables and there will be other tables that will suffer with this problem."
    This is incorrect. 
    Using a table to generate sequence numbers like this is a bad idea exactly because the access must be serialized.  Since you can't switch to a SEQUENCE object, which is the correct solution, the _entire goal_ of this exercise to find a way to properly
    serialize access to this table.  Using exclusive locking will not be necessary for all the tables; just for the single-row table used for generating sequence values with a cursor.
    I converted the sample program to VB.NET:
    Public Class Form1
    Private mbCancel As Boolean = False
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim soConn As ADODB.Connection
    Dim soRst As ADODB.Recordset
    Dim sdData As Date
    Dim slValue As Long
    Dim slDelay As Long
    'create database vbtest
    'go
    ' CREATE TABLE [dbo].[ControlNumTest](
    ' [UltData] [datetime] NOT NULL,
    ' [UltNum] [int] NOT NULL,
    ' CONSTRAINT [PK_CorreioNumTeste] PRIMARY KEY CLUSTERED
    ' [UltData] Asc
    ' )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
    ' ) ON [PRIMARY]
    mbCancel = False
    Do
    ' Configure the Connection object
    soConn = New ADODB.Connection
    With soConn
    .ConnectionString = "Provider=SQLNCLI11;Initial Catalog=vbtest;Data Source=localhost;trusted_connection=yes"
    .IsolationLevel = ADODB.IsolationLevelEnum.adXactCursorStability
    .Mode = ADODB.ConnectModeEnum.adModeReadWrite
    .CursorLocation = ADODB.CursorLocationEnum.adUseServer
    .Open()
    End With
    ' Start a new transaction
    Call soConn.BeginTrans()
    ' Configure the RecordSet object
    soRst = New ADODB.Recordset
    With soRst
    .ActiveConnection = soConn
    .CursorLocation = ADODB.CursorLocationEnum.adUseServer
    .CursorType = ADODB.CursorTypeEnum.adOpenForwardOnly
    .LockType = ADODB.LockTypeEnum.adLockPessimistic
    .Open("SELECT * FROM dbo.ControlNumTest")
    End With
    With soRst
    sdData = .Fields!UltData.Value ' Read the last Date (LOCK INFO 1: See comments bello
    slValue = .Fields!UltNum.Value ' Read the last Number
    If sdData <> Date.Now.Date Then ' Date has changed?
    sdData = Date.Now.Date
    slValue = 1 ' Restart number
    End If
    .Fields!UltData.Value = sdData ' Update data
    .Fields!UltNum.Value = slValue + 1 ' Next number
    End With
    Call soRst.Update()
    Call soRst.Close()
    ' Ends the transaction
    Call soConn.CommitTrans()
    Call soConn.Close()
    soRst = Nothing
    soConn = Nothing
    txtUltNum.Text = slValue + 1 ' Display the last number
    Application.DoEvents()
    slDelay = Int(((Rnd * 250) + 100) / 100) * 100
    System.Threading.Thread.Sleep(slDelay)
    Loop While mbCancel = False
    If mbCancel = True Then
    Call MsgBox("The test was canceled")
    End If
    Exit Sub
    End Sub
    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
    mbCancel = True
    End Sub
    End Class
    And created the table
    CREATE TABLE [dbo].[ControlNumTest](
    [UltData] [datetime] NOT NULL,
    [UltNum] [int] NOT NULL,
    CONSTRAINT [PK_CorreioNumTeste] PRIMARY KEY CLUSTERED
    [UltData] Asc
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = on, FILLFACTOR = 80) ON [PRIMARY]
    ) ON [PRIMARY]
    go insert into ControlNumTest values (cast(getdate()as date),1)
    Then ran 3 copies of the program and generated the deadlock:
    <deadlock>
    <victim-list>
    <victimProcess id="processf27b1498" />
    </victim-list>
    <process-list>
    <process id="processf27b1498" taskpriority="0" logused="0" waitresource="KEY: 35:72057594039042048 (a01df6b954ad)" waittime="1970" ownerId="3181" transactionname="implicit_transaction" lasttranstarted="2014-02-14T15:49:31.263" XDES="0xf04da3a8" lockMode="X" schedulerid="4" kpid="9700" status="suspended" spid="51" sbid="0" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-02-14T15:49:31.267" lastbatchcompleted="2014-02-14T15:49:31.267" lastattention="1900-01-01T00:00:00.267" clientapp="vbt" hostname="DBROWNE2" hostpid="21152" loginname="NORTHAMERICA\dbrowne" isolationlevel="read committed (2)" xactid="3181" currentdb="35" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128058">
    <executionStack>
    <frame procname="adhoc" line="1" stmtstart="80" sqlhandle="0x020000008376181f3ad0ea908fe9d8593f2e3ced9882f5c90000000000000000000000000000000000000000">
    UPDATE [dbo].[ControlNumTest] SET [UltData]=@Param000004,[UltNum]=@Param000005 </frame>
    <frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
    unknown </frame>
    </executionStack>
    <inputbuf>
    (@Param000004 datetime,@Param000005 int)UPDATE [dbo].[ControlNumTest] SET [UltData]=@Param000004,[UltNum]=@Param000005 </inputbuf>
    </process>
    <process id="processf6ac9498" taskpriority="0" logused="10000" waitresource="KEY: 35:72057594039042048 (a01df6b954ad)" waittime="1971" schedulerid="5" kpid="30516" status="suspended" spid="55" sbid="0" ecid="0" priority="0" trancount="1" lastbatchstarted="2014-02-14T15:49:31.267" lastbatchcompleted="2014-02-14T15:49:31.267" lastattention="1900-01-01T00:00:00.267" clientapp="vbt" hostname="DBROWNE2" hostpid="27852" loginname="NORTHAMERICA\dbrowne" isolationlevel="read committed (2)" xactid="3182" currentdb="35" lockTimeout="4294967295" clientoption1="671156256" clientoption2="128058">
    <executionStack>
    <frame procname="adhoc" line="1" sqlhandle="0x020000003c6309232ab0edbe0a7790a816a09c4c5ac6f43c0000000000000000000000000000000000000000">
    FETCH API_CURSOR0000000000000001 </frame>
    <frame procname="unknown" line="1" sqlhandle="0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000">
    unknown </frame>
    </executionStack>
    <inputbuf>
    FETCH API_CURSOR0000000000000001 </inputbuf>
    </process>
    </process-list>
    <resource-list>
    <keylock hobtid="72057594039042048" dbid="35" objectname="vbtest.dbo.ControlNumTest" indexname="PK_CorreioNumTeste" id="lockff6e6c80" mode="U" associatedObjectId="72057594039042048">
    <owner-list>
    <owner id="processf6ac9498" mode="S" />
    <owner id="processf6ac9498" mode="U" requestType="wait" />
    </owner-list>
    <waiter-list>
    <waiter id="processf27b1498" mode="X" requestType="convert" />
    </waiter-list>
    </keylock>
    <keylock hobtid="72057594039042048" dbid="35" objectname="vbtest.dbo.ControlNumTest" indexname="PK_CorreioNumTeste" id="lockff6e6c80" mode="U" associatedObjectId="72057594039042048">
    <owner-list>
    <owner id="processf27b1498" mode="U" />
    <owner id="processf27b1498" mode="U" />
    <owner id="processf27b1498" mode="X" requestType="convert" />
    </owner-list>
    <waiter-list>
    <waiter id="processf6ac9498" mode="U" requestType="wait" />
    </waiter-list>
    </keylock>
    </resource-list>
    </deadlock>
    It's the S lock that comes from the cursor read that's the villian here.  U locks are compatible with S locks, so one session gets a U lock and another gets an S lock.  But then the session with an S needs a U, and the session with a U needs an
    X.  Deadlock. 
    I'm not sure what kind of locks were taken by this cursor code on SQL 2000, but on SQL 2012, this code is absolutely broken and should deadlock.
    The right way to fix this code is to add (UPDLOCK,SERIALIZABLE) to the cursor
    .Open("SELECT * FROM dbo.ControlNumTest with (updlock,serializable)")
    So each session reads the table with a restrictive lock, and you don't mix S, U and X locks in this transaction.  This resolves the deadlock, but requires a code change.
    I tried several things that didn't require a code, which did not resolve the deadlock;
    1) setting ALLOW_ROW_LOCKS=OFF ALLOW_PAGE_LOCKS=OFF
    2) SERIALIZABLE isolation level
    3) Switching OleDB providers from SQLOLEDB to SQLNCLI11
    Then I replaced the table with a view containing a lock hint:
    CREATE TABLE [dbo].[ControlNumTest_t](
    [UltData] [datetime] NOT NULL,
    [UltNum] [int] NOT NULL,
    CONSTRAINT [PK_CorreioNumTeste] PRIMARY KEY CLUSTERED
    [UltData] Asc
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = on, FILLFACTOR = 80) ON [PRIMARY]
    ) ON [PRIMARY]
    go
    create view ControlNumTest as
    select * from ControlNumTest_t with (tablockx)
    Which, at least in my limited testing, resovlved the deadlock without any client code change.
    David
    David http://blogs.msdn.com/b/dbrowne/

  • Row totals in datagrid

    Hi,
    I have a datagrid with 5 rows and 3 columns and i am able to
    load data into it using http service but i want to calculate totals
    of each row and i have to print them on the labels placed below the
    datagrid for each column
    i want to calculate the row totals and display it on the
    label
    plz find me some solution
    thanks

    I guess one way to do it would be to calculate the total from
    your webservice (I am guessing you're using php to generate an xml
    file) and then pass that to your flex project using the http
    service.
    or you could simply write a script for it within your
    project.

  • Combining like results into one row

    The statement below works. However when the results are returned there are multiple values returned for the same "Period" that I would like to see returned into one row.
    SELECT "Request ID", "External Customer", "Staff Prof Id", "Period", "Planned External", "Actual External", "Planned Internal", "Actual Internal", "Total Planned", "Actual Total"
    FROM (
    SELECT ppl.request_id "Request ID", ppl.mdpr_bds_ext_customer "External Customer", cells.staff_prof_id "Staff Prof Id", period.period_short_name "Period", CELLS.PLANNED_FTE/100 "Planned External", CELLS.actual_fte/100 "Actual External", 0 "Planned Internal", 0 "Actual Internal", /*skills.skill_name,*/ total.plan_total_fte/100 "Total Planned", total.actual_total_fte/100 "Actual Total"
    FROM RML.MREQ_MDPR_PROJ PPL, knta.krsc_staff_prof_line_cells_v CELLS, knta.krsc_staff_prof_lines_v LINES, knta.knta_periods PERIOD, knta.krsc_skills_v SKILLS, knta.krsc_staff_prof_period_sum TOTAL
    where PPL.MDPR_BDS_SUB_PROJ IS NOT NULL AND PPL.KNTA_STAFFING_PROFILE = CELLS.STAFF_PROF_ID(+) AND cells.staff_prof_line_id = lines.staff_prof_line_id AND ppl.knta_staffing_profile = total.staff_prof_id
    AND cells.period_id = period.period_id AND lines.skill_id = skills.skill_id AND skills.skill_name like '%External%' AND total.period_id = period.period_id
    UNION
    SELECT ppl.request_id "Request ID", ppl.mdpr_bds_ext_customer "External Customer", cells2.staff_prof_id "Staff Prof Id", period.period_short_name "Period", 0 "Planned External", 0 "Actual External", CELLS2.planned_fte/100 "Planned Internal", CELLS2.actual_fte/100 "Actual Internal", /*skills.skill_name,*/ total.plan_total_fte/100 "Total Planned", total.actual_total_fte/100 "Actual Total"
    FROM RML.MREQ_MDPR_PROJ PPL, knta.krsc_staff_prof_line_cells_v CELLS2, knta.krsc_staff_prof_lines_v LINES, knta.knta_periods PERIOD, knta.krsc_skills_v SKILLS, knta.krsc_staff_prof_period_sum TOTAL
    where PPL.MDPR_BDS_SUB_PROJ IS NOT NULL AND PPL.KNTA_STAFFING_PROFILE = CELLS2.STAFF_PROF_ID(+) AND cells2.staff_prof_line_id = lines.staff_prof_line_id AND ppl.knta_staffing_profile = total.staff_prof_id
    AND cells2.period_id = period.period_id AND lines.skill_id = skills.skill_id AND skills.skill_name not like '%External%' AND total.period_id = period.period_id)
    ORDER BY "Request ID"

    Probably you are looking at something like GROUP BY "Request ID", "External Customer", "Staff Prof Id", "Period" and SUM () the other columns. As Enrico says, examples of actual and desired output would be helpful.
    At a glance a UNION of...
    AND    skills.skill_name LIKE '%External%'...and...
    AND    skills.skill_name NOT LIKE '%External%'...seems a slightly strange approach.

  • Looping over multiple rows of data to output one row

    My query is giving me the appropriate data, but I need to
    only have one row per 'MANAGER' in my output - not one for each
    'JOB'. Now the output looks like this:
    manager 1 ... period 1 $ .... period 2 $ .... period 3 $
    manager 1... period 1 $ .... period 2 $ .... period 3 $
    manager 1... period 1 $ .... period 2 $ .... period 3 $
    manager 1... period 1 $ .... period 2 $ .... period 3 $
    manager 2... period 1 $ .... period 2 $ .... period 3 $
    manager 2... period 1 $ .... period 2 $ .... period 3 $
    manager 2... period 1 $ .... period 2 $ .... period 3 $
    manager 2... period 1 $ .... period 2 $ .... period 3 $
    It needs to be:
    Manager 1 ... total period 1 $ .... total period 2 $ ....
    Manager 2 ... total period 1 $ .... total period 2 $ ....
    Any help would be wonderful. I am really new at something
    this complex. Thanks!!!

    To fix your immediate issue, you need to order and group by
    manager, not MPR_ID (whatever that is).
    What is dm_id? Use descriptive names!
    Anyway, change the ORDER BY clause to:
    ORDER BY
    RR.LastName+', '+RR.FirstName, <!--- Or maybe dm_id??
    --->
    AA.MPR_ID
    Then change the first <cfoutput> to:
    <cfoutput query="production" group="Rep_name">

  • BAM : Crosstab : Need to get percentage of row total for each cell

    Hi,
    I am new to BAM. I have a requirement for which I am using crosstab. Basically, I need to show number instances per human task per user. Human Task is the row header, user is the column header, and I am using count(instance id) to fetch the count of instances. I am able to show the sum of values for each row and column, but I also need to show the percentage for each cell(based on row total).
    I do not know if it is possible to fetch the total for further calculations. I believe the calculated field will be processed for each cell, and hence there will be no sum available.
    Also, crosstab does not have a percent of total aggregate function.
    Kindly advise.
    Regards,
    Himanshu

    Hi,
    For constructing summary, COLLECT is very useful.
    1. Create one new internal table STAB having two fields.
       a) licensetype
       b) cnt
    2. Suppose your original internal table is itab.
    Loop at ITAB.
    STAB-licensetype = itab-licensetype.
    STAB-CNT = 1.
    COLLECT STAB.
    EndLoop.
    3. In this way, you will get DISTINCT license types, and their count.
    Hope this helps.
    regards,
    amit m.

  • Change value of one row

    Microsoft SQL Server 2014 - 12.0.2254.0 (X64)
     Jul 25 2014 18:52:51
     Copyright (c) Microsoft Corporation
     Enterprise Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: )
    Hi,
    I have a little bit problem. I would like to change the value of one row calculated in this way:
    SELECT distinct ID,s7.Name_Account ,
    sum (s7.Y2006* 1.0 / t7.Y2006) as V2006,sum (s7.Y2007* 1.0 / t7.Y2007) as V2007,sum (s7.Y2008* 1.0/ t7.Y2008) as V2008,sum (s7.Y2009* 1.0/ t7.Y2009) as V2009,
    sum (s7.Y2010* 1.0/ t7.Y2010) as V2010,sum (s7.Y2011* 1.0 / t7.Y2011) as V2011,sum (s7.Y2012* 1.0/ t7.Y2012) as V2012,sum (s7.Y2013* 1.0/ t7.Y2013) as V2013
    FROM sumas7 as s7 , total1 as t7
    Where ID IS NULL and Name_Account IS NULL
    GROUP BY Name_Account, ID
    WITH ROLLUP
    As we know this Transact- SQL produce a NULL value as total. My intention is to change this value (NULL) by text value, for example, "NON Current Assets" . Is it possible?  and if it is possible How could I do it?
    Thanks in advance
    Un saludo

    which column has NULLs
    as per posted code I guess it should be Name_Account
    in which case what you need is this
    Also distinct here is meaningless as you're already applying GROUP BY
    SELECT ID,
    COALESCE(s7.Name_Account,'Non Current Assets') AS Name_Account,
    sum (s7.Y2006* 1.0 / t7.Y2006) as V2006,sum (s7.Y2007* 1.0 / t7.Y2007) as V2007,sum (s7.Y2008* 1.0/ t7.Y2008) as V2008,sum (s7.Y2009* 1.0/ t7.Y2009) as V2009,
    sum (s7.Y2010* 1.0/ t7.Y2010) as V2010,sum (s7.Y2011* 1.0 / t7.Y2011) as V2011,sum (s7.Y2012* 1.0/ t7.Y2012) as V2012,sum (s7.Y2013* 1.0/ t7.Y2013) as V2013
    FROM sumas7 as s7 , total1 as t7
    Where ID IS NULL and Name_Account IS NULL
    GROUP BY Name_Account, ID
    WITH ROLLUP
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to return one ROW with Multiple value seperated by Colon in a SQL Query

    Hi,
    I have a SQL query as mentioned.
    select deptno
      from deptI want to mofidfy this query, so that this should return me department list with colon delimeted in one ROW.
    10:20:30:40.......Thanks,
    Deepak

    In 10g:
    select rtrim(xmlagg(xmlparse(content deptno || ':')).getstringval(), ':') data
    from   dept;
    DATA                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    10:20:30:40with apologies for the abuse of XML...

  • How to Plot number and string in one row (data logger counter via MODBUS) ?

    hi all i made data log quantity using Digital Counter via modbus (RS-485) to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Solved!
    Go to Solution.
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Hi rhiesnand,
    right now you add 2 new rows to your array.
    The solution is to concatenate both row parts to one bigger 1D array before adding that array as new row to your 2D array!
    Like this:
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • How to Plot number and string in one row (data logger counter) ?

    hi all i made data log quantity using Digital Counter via modbus to monitoring quantity and reject that has and Name Operator, Machine and Part Number.
    i have problem about plot the number & string in one row, as shown on the picture below :
    how to move that string on one row ? i attach my vi.
    Thanks~
    Attachments:
    MODBUS LIB Counter.vi ‏39 KB

    Duplicate and answered - http://forums.ni.com/t5/LabVIEW/How-to-Plot-number-and-string-in-one-row-data-logger-counter-via/m-p...

  • Grouping all in one row

    Hi guys, I got a black out. I got this situation:
    Create table Forum ( Icity varchar(50), IMonth int, Iyear int, ACons int, BCons int, CCons int) insert into forum values ('Buenos Aires',1,2014,100,0,0), ('Buenos Aires',2,2014,140,0,0), ('Buenos Aires',3,2014,60,0,0), ('Toronto',1,2014,400,0,0), ('Toronto',2,2014,625,0,0), ('Toronto',3,2014,880,0,0), ('Buenos Aires',1,2014,0,330,0), ('Buenos Aires',2,2014,0,1230,0), ('Buenos Aires',3,2014,0,470,0), ('Toronto',1,2014,0,1100,0), ('Toronto',2,2014,0,1520,0), ('Toronto',3,2014,0,400,0), ('Buenos Aires',1,2014,0,0,300),('Buenos Aires',2,2014,0,0,440), ('Buenos Aires',3,2014,0,0,1080), ('Toronto',1,2014,0,0,640), ('Toronto',2,2014,0,0,1020), ('Toronto',3,2014,0,0,880)
    I had to run a huge union all taking data fro ACons, BCons, CCons, no way to do link or other stuff, we're talking about millions rows, different servers..anyway. I got this situation. Now I need an output like:
    Buenos Aires 1 2014 100 330 300
    Toronto  1 2014  400 1100 640
    Pratically Icity, Imonth, Iyear, Acons, Bcons, Ccons in one rows and not in three difefrent rows. I already did this stuff a lot of time but I'm going underpressure by another side ( a Cube that doesn't update correctly).
    Any suggestion? Thanks everyone.

    Are you looking for the below? If not, please let us know:
    Create table Forum ( Icity varchar(50), IMonth int, Iyear int, ACons int, BCons int, CCons int)
    insert into forum values
    ('Buenos Aires',1,2014,100,0,0), ('Buenos Aires',2,2014,140,0,0),
    ('Buenos Aires',3,2014,60,0,0), ('Toronto',1,2014,400,0,0),
    ('Toronto',2,2014,625,0,0), ('Toronto',3,2014,880,0,0),
    ('Buenos Aires',1,2014,0,330,0), ('Buenos Aires',2,2014,0,1230,0),
    ('Buenos Aires',3,2014,0,470,0), ('Toronto',1,2014,0,1100,0),
    ('Toronto',2,2014,0,1520,0), ('Toronto',3,2014,0,400,0),
    ('Buenos Aires',1,2014,0,0,300),('Buenos Aires',2,2014,0,0,440),
    ('Buenos Aires',3,2014,0,0,1080), ('Toronto',1,2014,0,0,640),
    ('Toronto',2,2014,0,0,1020), ('Toronto',3,2014,0,0,880)
    Select Icity,IMonth,Iyear,MAX(ACons),MAX(BCons),MAX(cCons) From Forum
    Group by Icity,IMonth,Iyear
    Drop table Forum

Maybe you are looking for