Find the underlying datasource

Hi,
We have installed the SAP Netweaver2004s environemant with
a)Web AS Java
b)Web AS Java +  ABAP
Is there anu API or UME API or any programmatic approch form where we can know if the underlying datasource is of what type.
I require this as based on the server configuration my code flow will change.
How this can be done.
Best Regards
Manoj

Hi Manoj,
Use the UME API, here is a sample code that checks to which datasource a group belongs to, amend it to your needs:
IGroup group = groupFact.getGroup(<group_id>);
String[] datasources = group.getAttribute(IPrincipal.DEFAULT_NAMESPACE, IPrincipal.DATASOURCE);
if (datasources[0].equals("PRIVATE_DATASOURCE"))
    // This is a UME Group
else if (datasources[0].equals("R3_DATASOURCE"))
   // This is an ABAP Group
This code provides you with the data source id. To find out which data source id belongs to UME and which to ABAP user store have a look into your UME configuration file. Find more information on data sources in <a href="http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/8f0440a832e369e10000000a155106/frameset.htm">here</a>.
Hope it helps,
Roy

Similar Messages

  • Not able to find the related datasources ,, help..

    Hi Experts ,
    BI with CRM
    I am trying to find the relavent Datasources for the below mentioned Tables in CRM ,,plz help to find out the relavent Datasources ,,,I tried in all forms ,but not able to find ,, need your help.
    Thanks in advance
    Table ::
    CRMD_MKTATTR_SET----->>> Datasource???
    COMD_PAYPLAN_DC----->>> Datasource???
    COMD_PAYPLAN_D------->>> Datasource???
    TB033----
    >>> Datasource???
    ZUCORDSET----
    >>>>>Datasource???
    Regards
    Ramana

    package com.elevenworks.swing.treetable;
    //Here i dont have this dependency code
    //So i want a jar file for that
    import org.jdesktop.swingx.JXTreeTable;
    import javax.swing.*;
    import javax.swing.tree.TreeCellRenderer;
    import java.awt.*;
    public class BrushedMetalTreeCellRenderer implements TreeCellRenderer
         protected JLabel label;
         public BrushedMetalTreeCellRenderer()
              label = new JLabel();
         public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus)
              label.setForeground(Color.BLACK);
              if (selected)
                   Component vRenderPane = tree.getParent();
                   if (vRenderPane != null)
                        JXTreeTable vTable = (JXTreeTable)vRenderPane.getParent();
                        if (vTable != null)
                             if (vTable.hasFocus())
                                  label.setForeground(Color.WHITE);
              label.setText(value.toString());
              return label;
    }

  • How to find the Coditional datasource in MM-PUR

    Hi Expert,
                   I am trying to find the conditional datasource in MM-PUR(purchasing) module, i also search it on the Help.sap and sdn
    but i am not getting the proper answer, please help me to find out the conditional datasource in MM-PUR and also tell me that,
    how to identify that type of datasource.
    Thanks and Regards
    Lalit Kumar

    Hi Tamkris
    1. First go to help.sap.com and simply search for the datasource. You would come to a page where detailed description of the datasource is given.Just note that SAP sometimes plays spoilsport and for few Datassources it doesnt give the table names. But in your case for 0CO_OM_CCA_9, details are given.
    2. If in some cases table names are not given, simply go to rsa3. open another session ST05. Activate the trace.In Rsa3, enter the datasource name. And then run extraction. Go to ST05 switch off the trace and then view the log.
    In the log, all tables that are hit are shown
    3. And if all this doesnt help, start debugging the datasource. TYpically these would be function module based. So dig in!
    Hope this info helps
    Prakash
    Assigning points is a way of saying thanks on SDN!

  • Help in finding the Standard Datasource

    Hi to all
    I need to generated  report in BI for the details of the Transport Status of Solution Manager.
    Can any suggest me to wich Standard datasource sholud i look for these details 
    Thank u
    gopu77
    Edited by: gopu77 on Apr 9, 2010 9:35 AM

    You would have to go with generic extraction....i dont think there is standard extractor that pulls records from these tables...and we have a generic extractor on our system

  • How to find the required Data Source??

    I have identified the requirement of Infocube 0CCA_C11..now how do I find the associated DataSource for the dataelements of the cube. Really appriciate all the help

    Claudia,
    There are a number of Datasources you could use. You could start with the infosource level. Explore Business Content. Ex:
    0CO_OM_CCA_9
    0CO_OM_CCA_1
    It depends totally on your requirement: what fields you want, whether you delta functionality or not etc..
    Importantly, whether you want actual costs, plan, commitments or budget.
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/1f383fe58d5900e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/8d/1f383fe58d5900e10000000a114084/frameset.htm
    Hope this helps,
    Farhan

  • Can't find the J2EE Application JDBC Module Datasource in Weblogic

    Hello,
    I am trying to locate the JDBC Module J2EE application Datasource details in weblogic but I cant find it.
    Can someone help me where I can find any Mbean in Weblogic which will specify all the details about the DataSource.
    You can see in the image that under deployment I have an application which has Data source(saasreporef).
    I have already discovered this target in one of my agent and I want to locate some Mbean which can give me details about this Datasource in Weblogic.

    I've solved it myself. It changed to NWDS from the Visual Administrator. It can be undepolyed using undepoly view in the NWDS.
    I can find the answer using keword 'Deploying and Running the Application from NWDS' in the help portal.

  • In my Macbook Pro finder folder under All Images, there are duplicate files, but one is small and the other is full size. I wanted to clean up the files, but don't know why I have two of everything. Any Ideas?

    In my Macbook Pro, the Finder folder has duplicate images in the 'all images' file. One image is small and the other is full size. First question is why do I have two of every image? Why is one small and the other large. Do I need two of everything? If not, which do I delete?
    thanks, Jean

    Hello fane,
    Re: duplicate images in finder.
    Nearly all images are JPG with a few GIF and PNG sprinkled in.
    I opened the inspector so I do get info when opening each image, but it a slow process.
    It seems that one image is around 70k while its twin can be up to 4Mb which is what comes unedited from my camera. Sometimes there will be 3 or 4 identical images in finder, but when I open iPhoto to see what ‘s really in the file, I find only one image, and it’s full sized.
    Are all these extra images, even if they are aliases, taking up space on my drive? And should I delete them? The info bar says I have over 10,000 images, which is rather a lot  for what I do.
    I am unable to add the file size on the view menu as it is grayed out. Don’t know why it’s gray, but having that info on the screen would save a lot of time and fiddling with each image.
    I am trying to resize selected pix so I can upload them to e-bay, which requires less than 70k. I have looked at resizing programs but most are for PC platform and not Mac, so I am trying to resize in the finder window under tools. Tedious at best. Any suggestions will be appreciated
    Thanks for your help,
    jeanfromwilsonville

  • How can I find the TV shows that are on my iPod? They don't all appear under my Video icon.

    I know they are on my iPod because if I search for them, they are there. I would like to be able to find them under one of my apps though. They used to appear under "Video". Is my iPod just too old by Apple standards?

    What type of videos?
    Videos can be coded to appear in the music app because there are Music videos. You can change the coding by going to iTunes on the computer and selecting the video and right clicking the and selecting Get Info. The selection for Medi Kind is under the Option tab
    How did the videos get on the iPod

  • "Safari Can't Find the Server" is chronic in Safari under Snow Leopard...

    Since moving to Snow Leopard (or perhaps it is just an updated Safari in SL and otherwise not related to SL??) when my Mac starts up from sleep with Safari being already open, I typically find a blank message with "Safari Can't Find the Server"... And just clicking on pages, I sometimes get that same message. Sometimes I get the spinning gear (for way too long) and I've learned to stop it and just click the same link again and more often than not, it opens immediately the second time...
    Any ideas??? Is this a bug that Apple needs to fix or do I need to do something to Safari (or something else) to fix this problem???
    thanks... bob...

    Robert Paris wrote:
    Whoa... Now I'm really confused... When I go to my System Preferences, then Network, highlight Airport, then click on Advanced, then choose the DNS tab, all I see under DNS Servers is the internal IP address of my Apple Router (10.x.x.x).. And next to that under Search Domains is hsd1.ca.comcast.net... And that is all there is... And I didn't set any of that up... When I bought my Apple Extreme Router a couple years ago, I was so impressed because I came home, plugged it in, basically said "GO" and the router set it all up and just worked... And I'm pretty sure (though not positive) that the Router put the 10.x.x.x in that preference panel, in other words, pointed to itself for DNS services...
    This is effectively saying that the DNS configured in the router will be the default.
    So help me understand... If I change the DNS settings on the mac from 10.x.x.x to the OpenDNS values, the router would still have the Comcast values in it??? How does that work??? And if I only change them on my mac, then the rest of the computers on my home network would still be using the original Comcast DNS servers as established on the router, yes??? I mean I think that would have to be...
    If you change your Mac, that is what it will use. Other computers will use whatever
    they are configured to use.
    See my confusion??? Again, I know only enough about Network settings to know that if I click a wrong button I could make a lot of trouble... So I don't move until I understand what at least a little more than clearly I know now...
    So how do local (mac) settings for DNS play (or not) with DNS settings up at the router level???
    The local settings should override anything else since that is what will
    be used first. They have no interaction with what is at the router level.
    thanks... bob..
    Dave

  • Error when opening Find Examples under the Help menu

    Today when I tried opening the Find Examples under the Help menu in LabVIEW 6.1, it would not open correctly. The Find Examples window appears and then an error window appears on top of it with the following description -
    "Error 1 occurred at open or create file (function 1)."
    Then ther is a list of possible reasons.
    I have had this version of LabVIEW installed for over 6 months and had no problems until today. I tried running the installation program for LabVIEW and repairing LabVIEW but had no success.
    What should I do next? Is there a file/s I can delete and then install manually?
    Thanks,
    Rodney

    I've never actually heard of this error ocurring with the Examples Finder before. If it continues, I would probably just reinstall LabVIEW. That should clear up the problem.
    J.R. Allen

  • How to find out what the underlying table/query of a form in Oracle Apps.

    Hi
    I am trying to find out who owns the underlying objects of a query when a user runs the Transactions > Line_Items form for Receivables .
    I have selected Help > Record History but I get a message Record History not available here.
    The query is running slow and I'd like to see if the objects have been analyzed lately.
    Thanks
    Andy

    Hi
    I should have said in the ticket that this is version 11.5.10
    It was close to giving me the answer I need. It gives me the following details. Unfortunately it doesn't give me the underlying sql. I hhave tried using v$session and sys.v_$sql but the sql is over 1000 characters long so I dont get to see the table/object being referenced.
    I appreciate the feedback.
    Thanks
    Andy
    Database Server
    RDBMS : 10.2.0.4.0
    Oracle Applications : 11.5.10.2
    Machine : alabama
    User : APPS
    Oracle SID : accausr1
    System Date : 12-SEP-2011 13:33:58
    Database Server PID : 16875
    Session SID : 1065
    SERIAL# : 1273
    AUDSID : 201640233
    Database CPU Usage (in secs) : 8.85
    Forms Server
    Oracle Forms Version : 6.0.8.27.0
    Application Object Library : 11.5.0
    Machine : AUSTIN
    Forms User CPU (secs) : 3.430000
    Forms System CPU (secs) : 0.840000
    Forms Process ID : 6347
    Forms Server Environment Variables
    AU_TOP : /oracle/finapps/accausr1/accausr1appl/au/11.5.0
    FDBDMCHK : [Unset]
    FDFGCXDBG : [Unset]
    FDSQLCHK : [Unset]
    FDUDEBUG : [Unset]
    FNDNAM : APPS
    FND_TOP : /oracle/finapps/accausr1/accausr1appl/fnd/11.5.0
    FORMS60_APPSLIBS : APPCORE FNDSQF APPDAYPK APPFLDR GLCORE HR_GEN HR_SPEC ARXCOVER
    FORMS60_CATCHTERM : 1
    FORMS60_ERROR_DATETIME_FORMAT : [Unset]
    FORMS60_ERROR_DATE_FORMAT : [Unset]
    FORMS60_FORCE_MENU_MNEMONICS : 0
    FORMS60_MAPPING : http://austin.accanet.org:8002/OA_TEMP
    FORMS60_MMAP : [Unset]
    FORMS60_OUTPUT : /oracle/finapps/accausr1/accausr1comn/temp
    FORMS60_OUTPUT_DATETIME_FORMAT : [Unset]
    FORMS60_OUTPUT_DATE_FORMAT : [Unset]
    FORMS60_PATH : /oracle/finapps/accausr1/accausr1appl/au/11.5.0/resource:/oracle/finapps/accausr1/accausr1appl/au/11.5.0/resource/stub:/oracle/finapps/accausr1/accausr1appl/au/11.5.0/forms/US
    FORMS60_RESOURCE : [Unset]
    FORMS60_TIMEOUT : 5
    FORMS60_USER_DATETIME_FORMAT : DD-MON-RRRR HH24:MI:SS
    FORMS60_USER_DATE_FORMAT : DD-MON-RRRR
    FORMS60_USE_CBO : [Unset]
    GWYUID : APPLSYSPUB/PUB
    NLS_DATE_FORMAT : DD-MON-RR
    NLS_DATE_LANGUAGE : AMERICAN
    NLS_LANG : AMERICAN_UNITED KINGDOM.WE8ISO8859P1
    NLS_NUMERIC_CHARACTERS : .,
    ORACLE_HOME : /oracle/finapps/accausr1/accausr1ora/8063
    ORACLE_PATH : [Unset]
    ORA_NLS_CHARSET_CONVERSION : [Unset]
    TNS_ADMIN : /oracle/finapps/accausr1/accausr1ora/8063/network/admin/accausr1_austin
    TWO_TASK : accausr1
    Current Form
    Form Application : Receivables
    Form Name : ARXTWMAI
    Form Path : /oracle/finapps/accausr1/accausr1appl/ar/11.5.0/forms/US/ARXTWMAI.fmx
    Form Version : 11.5.200
    Form Last Modified : $Date: 2005/01/07 11:50 $
    Forms
    APPSTAND : 11.5.33
    ARXRWMAI : 11.5.21
    ARXRWMAI : 11.5.21
    ARXTWMAI : 11.5.200
    FNDSCSGN : 11.5.122
    Form Menus
    FNDMENU : 11.5.51
    Forms PL/SQL
    APPCORE : 11.5.151
    APPFLDR : 11.5.55
    ARXARWIN : 11.5.65
    ARXBOEIF : 11.5.2
    ARXCWUTL : 11.5.8
    ARXPLCOM : 11.5.68.15104.2
    ARXQRCIF : 11.5.2
    ARXRCTIF : 11.5.2
    ARXRWBAT : 11.5.96
    ARXRWMAI : 11.5.19
    ARXTWBAT : 11.5.11
    ARXTWMAF : 11.5.27
    ARXTWMAI : 11.5.302.15104.9
    ARXTWUTL : 11.5.39.15104.2
    FNDSQF : 11.5.111
    GHR : 11.5.174
    GLOBE : 11.5.38
    GMS : 11.5.230.90.7
    IGILUTIL2 : 11.5.97
    IGILUTIL : 11.5.29
    OPM : 11.5.33.115100.2
    PQH_GEN : 11.5.124
    PSA : 11.5.162
    PSAC : 11.5.16
    PSB : 11.5.24
    VERT : 11.5.6

  • How to find the total number of pair under particular parent according to pattern 1:2or2:1,1:1 day to day maximum up to 5 pair caping daily

    Dear friends,
    I provide full details here ,my database table structure ,data and stored procedure and my problem ,
    please review it and provide the solution or any idea to solve my problem.
    I am working on a project in which members are added in a tree pattern, and get the payment accordingly.
    below is my table structure ,data and stored procedure
    CREATE TABLE Associate_Income
    ID varchar(30) NOT NULL,
    ParentID varchar(30) NULL,
    IsLeft tinyint NULL,
    IsRight tinyint NULL,
    joingdate datetime NOT NULL
    go
    INSERT Associate_Income
    (ID, ParentID, IsLeft, IsRight, joingdate)
    SELECT 'Ramesh123', NULL, NULL, NULL '2014-01-03 16:31:15.000' UNION ALL
    SELECT 'Sonu', 'Ramesh123', 1, NULL, '2014-01-03 16:45:21.000' UNION ALL
    SELECT 'Pawan kumar', 'Ramesh123', NULL, 1, '2014-01-04 16:50:23.000' UNION ALL
    SELECT 'Ravi123', 'Sonu', 1, NULL, '2014-01-04 17:03:22.000' UNION ALL
    SELECT 'Vineet123', 'Sonu', NULL, 1, '2014-01-04 17:26:01.000' UNION ALL
    SELECT 'dev123', 'Ravi123', 1, NULL, '2014-01-05 19:35:16.000' UNION ALL
    SELECT 'Mukesh123', 'Ravi123', NULL, 1, '2014-01-05 19:40:41.000' UNION ALL
    SELECT 'poonam123', 'Vineet123', 1, NULL, '2014-01-05 19:49:49.000' UNION ALL
    SELECT 'monu', 'Pawan kumar', 1, NULL, '2014-01-05 17:32:58.000' UNION ALL
    SELECT 'Arti123', 'Pawan kumar', NULL, 1, '2014-01-05 19:54:35.000' UNION ALL
    My  database table Associate_Income  structure and data is as follow:
    ID ParentID IsLeft IsRight joingdate
    Ramesh123 NULL NULL NULL 2014-01-03 16:31:15.000
    Sonu Ramesh123 1 NULL 2014-01-03 16:45:21.000
    Pawan kumar Ramesh123 NULL 1 2014-01-04 16:50:23.000
    Ravi123 Sonu 1 NULL 2014-01-04 17:03:22.000
    Vineet123 Sonu NULL 1 2014-01-04 17:26:01.000
    dev123 Ravi123 1 NULL 2014-01-05 19:35:16.000
    Mukesh123 Ravi123 NULL 1 2014-01-05 19:40:41.000
    poonam123 Vineet123 1 NULL 2014-01-05 19:49:49.000
    monu Pawan kumar 1 NULL 2014-01-05 17:32:58.000
    Arti123 Pawan kumar NULL 1 2014-01-05 19:54:35.000
    by using below stored procedure i can count the total number of pairs under particular node in 2:1,1:1 ratio means first pair is completed when two node added to the left side of given parent node and one node added
    right side of given parent node after that all pairs are completed when one node added left side and one node added right side of parent node (1:1 ratio)
    example if i execute my stored procedure as follows it would return following.
    EXEC count_pairs 'Ramesh123'
    3
    so there is 3 pairs as shown in my figure.
    when we execute my stored procedure for ParentID 'sonu' it would return following.
    EXEC count_pairs 'sonu'
    2
    so there is 2 pairs as shown in my figure.
    My problem is to find the query which can return the total number of pair under particular node any given parent  node. day to
    day maximum 5 pairs in a day please any one can suggest us
    CREATE proc [dbo].[count_pairs]
    @ParentID nvarchar(50)
    as
    begin
    Declare @ParentSUM SMALLINT = 0
    Declare @SubLeftID nvarchar(50)
    Declare @SubRightID nvarchar(50)
    SELECT @SubLeftID = CASE WHEN [IsLeft] = 1 THEN [ID] ELSE @SubLeftID END
    ,@SubRightID = CASE WHEN [IsRight] = 1 THEN [ID] ELSE @SubRightID END
    FROM Associate_Income
    WHERE ParentID = @ParentID
    IF @SubLeftID IS NOT NULL AND @SubRightID IS NOT NULL AND EXISTS(SELECT 1 FROM Associate_Income WHERE [IsLeft] = 1 AND ParentID = @SubLeftID)
    BEGIN
    SET @ParentSUM = 1
    ;WITH Associate_Income_CTE AS
    SELECT [ID], [ParentID], [IsLeft], [IsRight], 0 AS [Level]
    FROM Associate_Income
    WHERE [ParentID] = @ParentID
    UNION ALL
    SELECT RecursiveMember.[ID], RecursiveMember.[ParentID], RecursiveMember.[IsLeft], RecursiveMember.[IsRight], Level + 1
    FROM Associate_Income RecursiveMember
    INNER JOIN Associate_Income_CTE AnchorMember
    ON RecursiveMember.[ParentID] = AnchorMember.[ID]
    SELECT @ParentSUM = @ParentSUM + COUNT([ParentID])
    FROM
    SELECT [ParentID]
    ,'IsLeft' AS [Direction]
    ,1 AS [Value]
    FROM Associate_Income
    WHERE [IsLeft] = 1
    AND [ID] <> @ParentID --AND [ID] NOT IN (@SubLeftID, @ParentID)
    AND [ParentID] NOT IN (@ParentID, @SubLeftID)
    UNION ALL
    SELECT [ParentID]
    ,'IsRight' AS [Direction]
    ,1 AS [Value]
    FROM Associate_Income
    WHERE [IsRight] = 1
    AND [ParentID] <> @ParentID
    ) AS Associate_Income
    PIVOT
    MAX([Value]) FOR [Direction] IN ([IsLeft], [IsRight])
    ) PVT
    WHERE [IsLeft] IS NOT NULL AND [IsRight] IS NOT NULL
    END
    SELECT @ParentSUM
    Jitendra Kumar Sr. Software Developer at Ruvixo Technologies 7895253402

    I don't think this is homework, I am not sure how helpful it was by Kalman to merge the two threads. It appears that two different persons posted the questions. It could be though, that it is the same problem and Jitendra has taken over Chandra's
    task.
    However, I was not able to understand the problem nor the figure. And nor the definition of pairs in this context. My assumption is that what Jitendra posted is an abstraction of the actual problem in order to not reveal intellecutal property. Possibly this
    makes the problem more difficult to understand for us outsiders.
    I've come so far that I worked out a table definition and INSERT statements with sample data, as well as a call to the procedure which returns 3 and this appears to map to the figure, but I don't know what it means. Since I don't know what this
    is about, I have not made any attepmts to understand the code, but I would appreciate clarification about the underlying business rules as well as the expected results for various test cases.
    CREATE TABLE Associate_Income(ID varchar(30) NOT NULL,
    ParentID varchar(30) NULL,
    IsLeft tinyint NULL,
    IsRight tinyint NULL,
    joingdate datetime NOT NULL)
    go
    INSERT Associate_Income (ID, ParentID, IsLeft, IsRight, joingdate)
    SELECT 'Ramesh123', NULL, NULL, NULL, '2014-01-03 16:31:15.000' UNION ALL
    SELECT 'Sonu', 'Ramesh123', 1, NULL, '2014-01-03 16:45:21.000' UNION ALL
    SELECT 'Pawan kumar', 'Ramesh123', NULL, 1, '2014-01-04 16:50:23.000' UNION ALL
    SELECT 'Ravi123', 'Sonu', 1, NULL, '2014-01-04 17:03:22.000' UNION ALL
    SELECT 'Vineet123', 'Sonu', NULL, 1, '2014-01-04 17:26:01.000' UNION ALL
    SELECT 'dev123', 'Ravi123', 1, NULL, '2014-01-05 19:35:16.000' UNION ALL
    SELECT 'Mukesh123', 'Ravi123', NULL, 1, '2014-01-05 19:40:41.000' UNION ALL
    SELECT 'poonam123', 'Vineet123', 1, NULL, '2014-01-05 19:49:49.000' UNION ALL
    SELECT 'monu', 'Pawan kumar', 1, NULL, '2014-01-05 17:32:58.000' UNION ALL
    SELECT 'Arti123', 'Pawan kumar', NULL, 1, '2014-01-05 19:54:35.000'
    go
    CREATE proc [dbo].[count_pairs]
    @ParentID nvarchar(50)
    as
    begin
    Declare @ParentSUM SMALLINT = 0
    Declare @SubLeftID nvarchar(50)
    Declare @SubRightID nvarchar(50)
    SELECT @SubLeftID = CASE WHEN [IsLeft] = 1 THEN [ID] ELSE @SubLeftID END
    ,@SubRightID = CASE WHEN [IsRight] = 1 THEN [ID] ELSE @SubRightID END
    FROM Associate_Income
    WHERE ParentID = @ParentID
    IF @SubLeftID IS NOT NULL AND @SubRightID IS NOT NULL AND EXISTS(SELECT 1 FROM Associate_Income WHERE [IsLeft] = 1 AND ParentID = @SubLeftID)
    BEGIN
    SET @ParentSUM = 1
    ;WITH Associate_Income_CTE AS
    SELECT [ID], [ParentID], [IsLeft], [IsRight], 0 AS [Level]
    FROM Associate_Income
    WHERE [ParentID] = @ParentID
    UNION ALL
    SELECT RecursiveMember.[ID], RecursiveMember.[ParentID], RecursiveMember.[IsLeft], RecursiveMember.[IsRight], Level + 1
    FROM Associate_Income RecursiveMember
    INNER JOIN Associate_Income_CTE AnchorMember
    ON RecursiveMember.[ParentID] = AnchorMember.[ID]
    SELECT @ParentSUM = @ParentSUM + COUNT([ParentID])
    FROM
    SELECT [ParentID]
    ,'IsLeft' AS [Direction]
    ,1 AS [Value]
    FROM Associate_Income
    WHERE [IsLeft] = 1
    AND [ID] <> @ParentID --AND [ID] NOT IN (@SubLeftID, @ParentID)
    AND [ParentID] NOT IN (@ParentID, @SubLeftID)
    UNION ALL
    SELECT [ParentID]
    ,'IsRight' AS [Direction]
    ,1 AS [Value]
    FROM Associate_Income
    WHERE [IsRight] = 1
    AND [ParentID] <> @ParentID
    ) AS Associate_Income
    PIVOT
    MAX([Value]) FOR [Direction] IN ([IsLeft], [IsRight])
    ) PVT
    WHERE [IsLeft] IS NOT NULL AND [IsRight] IS NOT NULL
    END
    SELECT @ParentSUM
    END
    go
    EXEC count_pairs 'Ramesh123'
    go
    DROP PROCEDURE count_pairs
    DROP TABLE Associate_Income
    Erland Sommarskog, SQL Server MVP, [email protected]

  • I need to authorize my computer and I can't find the link for it. I went under Itunes store and there is no link "advanced" or "authorize computer"

    I need to authorize my computer and I can't find the link for it. I looked under Itunes store and there are no links that say "advanced" or "authorize computer"

    Authorization
    Macs:  iTunes Store- About authorization and deauthorization.
    Windows: How to Authorize or Deauthorize iTunes | PCWorld.
    In iTunes you use the Authorize This Computer or De-authorize This Computer option under the Store menu in iTunes' menubar. For Windows use the ALT-S keys to access it. Or turn on Windows 7 and 8 iTunes menus: iTunes- Turning on iTunes menus in Windows 8 and 7.

  • Connect macbook pro and imacac shows up in the finder window under shared b

    I have turned on file sharing on both. My imac shows up in the finder window under shared but the macbook won't connect. Is there something else i need to do?

    Same problem. Let me know if you find anything please. Thanks.

  • I just downloaded 950 photos on iPhoto and deleted them off my camera and now under last import there is only 4 photos and i can't find the others?? There is a whole bunch of blank events in the library with no photos in them all with todays date? Help!!

    I just downloaded 950 photos on iPhoto and deleted them off my camera and now under last import there is only 4 photos and i can't find the others?? There is a whole bunch of blank events in the library with no photos in them all with todays date? Help!!

    Yes - you need a min of 10 GB just to operate - with just 1 you certainly can lose photos and other critical things - you need to make space immediately - probably by moving your iPhoto library to a volume formatted Mac OS extended -
    Moving the iPhoto library is safe and simple - quit iPhoto and drag the iPhoto library intact as a single entity to the external drive - depress the option key and launch iPhoto using the "select library" option to point to the new location on the external drive - fully test it and then trash the old library on the internal drive (test one more time prior to emptying the trash)
    And be sure that the External drive is formatted Mac OS extended (journaled) (iPhoto does not work with drives with other formats) and that it is always available prior to launching iPhoto
    And backup soon and often - having your iPhoto library on an external drive is not a backup and if you are using Time Machine you need to check and be sure that TM is backing up your external drive
    LN

Maybe you are looking for