CR IX R2: SQL Expression Editor - Max on Group

This works, but it only shows the MAX value of the entire column, for all teams:
(SELECT MAX("PlanSegment_Team"."priority")
FROM   (("Plan" INNER JOIN "PlanSegment"
ON "Plan"."pkPlan"="PlanSegment"."fkPlan") INNER JOIN "PlanSegment_Team" "PlanSegment_Team"
ON "PlanSegment"."pkPlanSegment"="PlanSegment_Team"."fkPlanSegment") INNER JOIN "Team"
ON "PlanSegment_Team"."fkTeam"="Team"."pkTeam"
But I want to show the MAX value for each Team's list of priorities. The following is my best guess:
(SELECT MAX("PlanSegment_Team"."priority"), "PlanSegment_Team"."fkTeam"
FROM   (("Plan" INNER JOIN "PlanSegment"
ON "Plan"."pkPlan"="PlanSegment"."fkPlan") INNER JOIN "PlanSegment_Team" "PlanSegment_Team"
ON "PlanSegment"."pkPlanSegment"="PlanSegment_Team"."fkPlanSegment") INNER JOIN "Team"
ON "PlanSegment_Team"."fkTeam"="Team"."pkTeam"
GROUP BY "PlanSegment_Team"."fkTeam")
but it gives me an error of
"Only one expression can be specified in the select list when the subquery is not introduced with EXISTS."
Any help?

Don,
Thanks for your quick response.  Are you saying I just got lucky with my first expression, even though it uses SELECT?
If so, is there somewhere that will tell me exactly what SQL Expression Editor is supposed to be for? I'm trying to learn this stuff to make myself more job-marketable.
Thank you very much,
Gene

Similar Messages

  • SQL calculation in expression editor CR 2008

    This SQL expression works on MS SQL Server 2005 but not in the SQL Expression Editor of Crystal Reports.
    Why? Any alternatives?
    declare @Trash Decimal
    declare @Done Decimal
    set @Trash =
      select count(*) from dbo.NL_NM_NUON
      WHERE MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch'  AND
        fldFormalities In ('Persoon is verhuisd', 'Adres matcht niet met telefoonnummer',
             'Weigering Gesprek', 'Dubbel in bestand', 'Persoon overleden',
             'Beslisser tijdens actieperiode afwezig')
        OR
        fldEndresult = 'Is sinds kort klant bij NUON'
    set @Done =
      select count(*) from
      NL_NM_NUON Where
      NL_NM_NUON.MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch' AND
      STATUS IN ('U','F')
    Select (@Trash / @Done) * 100
    Edited by: Valmont on Feb 10, 2010 2:36 PM

    Create two different sql expressions like this
    %Expression1:
      select count(*) from dbo.NL_NM_NUON
      WHERE MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch'  AND
        fldFormalities In ('Persoon is verhuisd', 'Adres matcht niet met telefoonnummer',
             'Weigering Gesprek', 'Dubbel in bestand', 'Persoon overleden',
             'Beslisser tijdens actieperiode afwezig')
        OR
        fldEndresult = 'Is sinds kort klant bij NUON'
    %Expression2:
      select count(*) from
      NL_NM_NUON Where
      NL_NM_NUON.MAN_CAMPAIGNNAME = '9.304_Winback TM CM Jan 2010 - Bosch' AND
      STATUS IN ('U','F')
    Now Create a formula like this
    ({%Expression1}/{%Expression2})*100
    HTH
    Raghavendra.G

  • Error in SQL Expression

    Hello All,
    I am having crystal reports XI and I am using OLE DB ADO connection for oracle driver to the DB.
    I took a correct SQL expression from a previous report which is working fine and then paste it in a new created SQL Expression in the new report. The exact tables are there. But when clicking on the tick button to check of there are some errors, a message is shown that : ORA-00942 table or view does not exist.
    Here is the SQl Expression:
    (select  MAX(intrates.RATE_DT)
    FROM INTRATES,SECTYPE,DEALS,SECISSUE
    WHERE sectype.thekey = "posnrpt"."SECTYPE"
    AND SECISSUE.THEKEY = SECTYPE.SECISSUE_ID
    AND LTRIM(RTRIM(UPPER(intrates.ISSUER_DETAIL_ID))) =LTRIM(RTRIM(UPPER('ID'||secissue.ISIN)))
    AND INTRATES.RATE_DT <= "posnrpt"."POSN_DT"
    I am wondering why it is working in a previous report which is created long time ago and now it is not working?
    Is it from the driver or I have to do further modifications!!!
    I am looking forward for your help.

    Good question, Jason.  The only officially supported use would be of the functions and operators explicitly listed within the editor.  The SAP Note referenced in my presentation gives a little more information:
    [1217871 - What is the intended use of 'SQL Expression' fields?|http://www.google.com/url?sa=t&source=web&cd=1&sqi=2&ved=0CBIQFjAA&url=http%3A%2F%2Fwww.sdn.sap.com%2Firj%2Fscn%2Fgo%2Fportal%2Fprtroot%2Fdocs%2Foss_notes_boj%2Fsdn_oss_boj_erq%2Fsap(bD1lbiZjPTAwMQ%3D%3D)%2Fbc%2Fbsp%2Fspn%2Fscn_bosap%2Fnotes%257B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313337333833373331%257D.do&ei=FtWHTMrpCoTQ8wTutsHfDg&usg=AFQjCNFZG-Ta5JiZFAzXf2HC5GE7-QkJug]
    I'm sure the reason the SELECT statements aren't officially supported is that they aren't written in Crystal syntax.  What one is able to do with a SELECT statement depends on the database (Access, Oracle, MS SQL Server, etc..), type of database connection (Native, ODBC, etc..) the flavor of SQL being used, which is dependent on the previous two, etc.. Even the functions and operators available in the editor depend on the above conditions. What you see as available may not be what I see..
    So, while SAP can support the feature as a whole, they can't necessarily provide syntax support, nor guarantee effectiveness.  There's also very little documentation on them, as a result. A lot of what I've learned to do with SQL Expressions has been through trial and error.
    Personally, I prefer to build reports against Views, if possible, and Commands or Stored Procedures, if necessary. SQL Expressions are great, though, in a pinch against existing reports with performance or design issues.  In the case of the report above, I was able to dramatically increase performance and eliminate sub-reports  in an existing report that was written by another individual.  Without the SQL Expressions, I would have had to write even more complicated SQL and rebuild the report.
    Since I can use them and I know how powerful they can be, I'll keep using them until I can't. At this point in time, they work with Crystal Reports 2008, which has a very low adoption rate, and I haven't heard of them being deprecated in Crystal Reports 2011, which I expect to be around for several years, so I'm not too concerned.
    ~Kurt

  • SQL Expression Question

    To the forum members
    In the Crystal Formula Editor, under Print State, there is a function called Previous.  This compares the contents of the current field to the previous one.  Is there a similar function in the SQL Expression Editor.  I'm trying to use a Case When statement to compare the current value in two fields to their previous value.  If these values do not match I need the SQL Expression to add 20 fields together and display the total.
    Thanks in advance.
    B.

    good sql forum
    http://www.sqlteam.com/forums/forum.asp

  • Reference in SQL Expression to a group key

    Hello to everybody, i am working with a report in Crystal Report 11 and i need some help.
    In the design of my report i have two groups corresponding to a table which has two keys. The first one belongs to an Id and the second to a datetime.
    The fact is that i have to filter second group with a specific date that i have to obtain with a sql query. So i was thinking in using SQL Expression but i cant make it the right way because i cant filter in the where condition with the id of the superior group. I dont know how to write the where condition.
    If anyone can help me i will be grateful.
    Thanks.

    Thank you Sastry for responding so quickly.
    I think you dont understand me. I have this:
    -Group 1: id
             -Grupo 2: datetime
    the field datetime i need to filter with a specific date. In order to be clear the SQL Expression i made to filter this datetime is:
    (select max(datetime) from Table1)
    That maximum datetime i need it be for each id in the Group 1 (so the sql expression is not a single value, its a single value for each id of Group1), but i can't put this in the sql expression:
    (select max(datetime) from Table1 where Table1.id = Group1.id)
    and then the other problem is how to filter the datetime in group 2 with the value of the SQL Expression
    PD: Where is the option add command in crystal report?

  • Informix ODBC driver and SQL Expressions

    I get an odbc error from Crystal Reports XI when I create a simple sql expression.
    Database Connector Error: '42S22: Informix Informix ODBC Driver Informix  Column (ofh) not found in any table in the query (or SLV is undefined).  Database Vendor Code: -217 
    I have one table in the report (ofh) and three columns on the report.
    My syntax for the sql expression is:
    (SELECT xvd.xvd_print FROM xvd WHERE xvd.xcd_id=24 AND xvd.lng_id='0' AND xvd.xcv_id=OFH.OFT_ID)
    Where the OFH.OFT_ID is the connection to the table in the report.
    If I hard code this value the syntax is ok, but what is the use? I need to have this match the record.
    In Crystal Reports 8.5 this syntax works just fine with this same driver.
    And I tried double clicking on the column name from the formula editor and all it did was put spaces around the ofh and the oft_id with the period in the middle.
    I got the same error.
    Show SQL Query u2026 does not work to show me what it builds so I can see what it does not like.
    What syntax do I need to use to get the simple sub-select to work the same as it did in version 8.5?
    I have to convert all my 8.5 reports to XI and many use this type of feature to get the data for the report.

    The command file works wonderfully, but my hope was not to completely change each old report but simply convert them and reuse as much as possible.
    It seems that the processor that converts the linked tables and the select logic does not function in the same way as version 8.5 does to create syntax for the query when it puts it into the odbc driver.
    After more play I found that if I did not use alias names in the sub-select syntax (sql expression editor) I could get the data I needed.
    However I have not converted the more complicated reports that use the sql case statement syntax.
    I was hoping some one could look at the way Crystal Reports XI was handling the build of the select statement and see what changes where made that seem to no longer let me use the same sql statements I used in 8.5

  • In the expression editor dialog box my TAB key doesn't function correctly

    This is bizarre behavior that seems to have started recently.
    In Visual Studio 2012, an SSRS project, any expression editor dialog:
    The tab key doesn't work right.
    Open the expression editor and:
    * I see a blinking cursor and I can type in the expression box.
    * If I hit the tab key, the cursor disappears and I cannot type.  I appear to lose focus in the editor but focus doesn't appear to go anywhere else in the dialog box.
    * If I hit the tab key a 2nd time, the cursor is still gone and I cannot type. 
    * If I hit the tab key a 3rd time, I can finally type again and note that I am now
    3 tabstops in.  In other words it seems like the tabs were working but I lost the ability to type anything until I "tab" 3 magical times. 
    I can work around this by hitting tab key then grabbing the mouse and clicking where the cursor SHOULD be which returns focus to the text area.
    Hopefully this image helps clarify:
    Anybody know what is wrong?
    Microsoft Visual Studio Professional 2012
    Version 11.0.61030.00 Update 4
    Microsoft .NET Framework
    Version 4.5.50709
    Installed Version: Professional
    LightSwitch for Visual Studio 2012   04938-004-0034007-02367
    Microsoft LightSwitch for Visual Studio 2012
    Office Developer Tools   04938-004-0034007-02367
    Microsoft Office Developer Tools
    Team Explorer for Visual Studio 2012   04938-004-0034007-02367
    Microsoft Team Explorer for Visual Studio 2012
    Visual Basic 2012   04938-004-0034007-02367
    Microsoft Visual Basic 2012
    Visual C# 2012   04938-004-0034007-02367
    Microsoft Visual C# 2012
    Visual C++ 2012   04938-004-0034007-02367
    Microsoft Visual C++ 2012
    Visual F# 2012   04938-004-0034007-02367
    Microsoft Visual F# 2012
    Visual Studio 2012 Code Analysis Spell Checker   04938-004-0034007-02367
    Microsoft® Visual Studio® 2012 Code Analysis Spell Checker
    Portions of International CorrectSpell™ spelling correction system © 1993 by Lernout & Hauspie Speech Products N.V. All rights reserved.
    The American Heritage® Dictionary of the English Language, Third Edition Copyright © 1992 Houghton Mifflin Company. Electronic version licensed from Lernout & Hauspie Speech Products N.V. All rights reserved.
    Visual Studio 2012 SharePoint Developer Tools   04938-004-0034007-02367
    Microsoft Visual Studio 2012 SharePoint Developer Tools
    ASP.NET and Web Tools   2012.3.41009
    Microsoft Web Developer Tools contains the following components:
    Support for creating and opening ASP.NET web projects
    Browser Link: A communication channel between Visual Studio and browsers
    Editor extensions for HTML, CSS, and JavaScript
    Page Inspector: Inspection tool for ASP.NET web projects
    Scaffolding: A framework for building and running code generators
    Server Explorer extensions for Windows Azure Web Sites
    Web publishing: Extensions for publishing ASP.NET web projects to hosting providers, on-premises servers, or Windows Azure
    Color Theme Designer   1.0
    Designer for creating new color themes
    NuGet Package Manager   2.8.50126.400
    NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
    PreEmptive Analytics Visualizer   1.0
    Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
    SQL Server Analysis Services   
    Microsoft SQL Server Analysis Services Designer 
    Version 11.0.3369.0
    SQL Server Data Tools   11.1.40706.0
    Microsoft SQL Server Data Tools
    SQL Server Integration Services   
    Microsoft SQL Server Integration Services Designer
    Version 11.0.3369.0
    SQL Server Reporting Services   
    Microsoft SQL Server Reporting Services Designers 
    Version 11.0.3369.0
    BIDSHelper
    BIDS Helper 2012 - An add-in to extend SQL Server Data Tools - Business Intelligence (SSDTBI formerly BI Development Studio)
    (c) 2014 Version 1.6.6.0
    http://www.codeplex.com/bidshelper
    SQL Prompt 6
    For more information about SQL Prompt, see the Red Gate website at
    http://www.red-gate.com
    For customer support, call 1-866-733-4283.
    Copyright © 2006–2009 Red Gate Software Ltd

    Hi Bostaevski,
    Thank you for posting in MSDN forum.
    According to your description, as you said that the cursor disappears and cannot type issue. It seems that the issue may be not Visual Studio the VS IDE issue.
    In addition, I find a similar thread about the
    Expression Editor Cursor Issue,
    please see:  
    http://www.beta.microsoft.com/VisualStudio/feedbackdetail/view/780682/vs-2012-rdlc-expression-editor-cursor-issue#.
    Therefore, I suggest you could also try to press alt with left and right arrow keys and check if it is works fine.
    Thnank for your understanding!
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQL Express 2008 R2 will not start on Windows 7 Home

    Ok, This used to work, and then over night my system rebooted and now I cannot start SQL Express 2008 R2 after I have unistalled, and re-installed.   Cleared out the folders and the certificates, changed the Named Pipes configuration and all to
    no avail.   Here is my log file.
    -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    2014-06-14 08:45:18.18 Server      Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)
        Jun 17 2011 00:54:03
        Copyright (c) Microsoft Corporation
        Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    2014-06-14 08:45:18.18 Server      (c) Microsoft Corporation.
    2014-06-14 08:45:18.18 Server      All rights reserved.
    2014-06-14 08:45:18.18 Server      Server process ID is 8924.
    2014-06-14 08:45:18.18 Server      System Manufacturer: 'SAMSUNG ELECTRONICS CO., LTD.', System Model: '700Z3A/700Z4A/700Z5A/700Z5B'.
    2014-06-14 08:45:18.18 Server      Authentication mode is MIXED.
    2014-06-14 08:45:18.18 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\Log\ERRORLOG'.
    2014-06-14 08:45:18.18 Server      This instance of SQL Server last reported using a process ID of 2820 at 6/14/2014 8:32:55 AM (local) 6/14/2014 1:32:55 PM (UTC). This is an informational message only; no user action is required.
    2014-06-14 08:45:18.18 Server      Registry startup parameters:
         -d C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\DATA\master.mdf
         -e C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\Log\ERRORLOG
         -l C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\DATA\mastlog.ldf
    2014-06-14 08:45:18.18 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2014-06-14 08:45:18.18 Server      Detected 8 CPUs. This is an informational message; no user action is required.
    2014-06-14 08:45:18.21 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2014-06-14 08:45:18.23 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational
    message only. No user action is required.
    2014-06-14 08:45:18.25 spid7s      Starting up database 'master'.
    2014-06-14 08:45:18.28 spid7s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'ACT7'.
    2014-06-14 08:45:18.29 spid7s      SQL Trace ID 1 was started by login "sa".
    2014-06-14 08:45:18.29 spid7s      Starting up database 'mssqlsystemresource'.
    2014-06-14 08:45:18.30 spid7s      The resource database build version is 10.50.2500. This is an informational message only. No user action is required.
    2014-06-14 08:45:18.32 spid7s      Server name is 'MARTINDAHL-PC\ACT7'. This is an informational message only. No user action is required.
    2014-06-14 08:45:18.32 spid10s     Starting up database 'model'.
    2014-06-14 08:45:18.32 spid7s      Informational: No full-text supported languages found.
    2014-06-14 08:45:18.32 spid7s      Starting up database 'msdb'.
    2014-06-14 08:45:18.33 Server      Error: 17190, Severity: 16, State: 1.
    2014-06-14 08:45:18.33 Server      Initializing the FallBack certificate failed with error code: 1, state: 1, error number: -2146893802.
    2014-06-14 08:45:18.33 Server      Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
    2014-06-14 08:45:18.33 Server      Error: 17182, Severity: 16, State: 1.
    2014-06-14 08:45:18.33 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
    2014-06-14 08:45:18.33 Server      Error: 17182, Severity: 16, State: 1.
    2014-06-14 08:45:18.33 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
    2014-06-14 08:45:18.33 Server      Error: 17826, Severity: 18, State: 3.
    2014-06-14 08:45:18.33 Server      Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
    2014-06-14 08:45:18.33 Server      Error: 17120, Severity: 16, State: 1.
    2014-06-14 08:45:18.33 Server      SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
    -=-=-=-=-=-=-=-=-=-=
    I am logged into either the Administrator Account or my Account in which I am in the Adminstrator Group or an Admin.   My OS is Windows 7 Home Premium Edition, so I cannot clear out the MSSQL groups and things I have seen online.  Since this
    is Express, there is limited capabilities with the config tool.  
    I have tried to change the log in as in the SQL Configuration tool and every item I check, Local Service, Local System, Network Service all give the same error,
    "Cannot Find Object or Property. [0x80042004]
    SInce I have Home Premium, MMC will not load the snap in for Local Users and groups to check out these items.
    A check of the net user shows only the Administrator, Guest and my local login in Admin Account.  net localgroups show these items.
    *Administrators
    *Distributed COM Users
    *Event Log Readers
    *Guests
    *HomeUsers
    *IIS_IUSRS
    *IIS_WPG
    *Performance Log Users
    *Performance Monitor Users
    *SQLServer2005SQLBrowserUser$MARTINDAHL-PC
    *SQLServerFDHostUser$MartinDahl-PC$ACT7
    *SQLServerMSSQLServerADHelperUser$MARTINDAHL-PC
    *SQLServerMSSQLUser$MartinDahl-PC$ACT7
    *SQLServerSQLAgentUser$MARTINDAHL-PC$ACT7
    *Users
    The command completed successfully.
    I checked the SSL and Force Encryption is set to no and the certificates have been cleared.  
    I am not sure how to solve this problem.   Please help.   Thanks, in advance. 

    I created a new Administrator account on the machine, mdahl.   I then started the SQL Configuration Tool and changed the log on to this new account.  Same problem.   Here is the SQL Log.
    2014-06-14 11:24:15.83 Server      Microsoft SQL Server 2008 R2 (SP1) - 10.50.2500.0 (X64)
        Jun 17 2011 00:54:03
        Copyright (c) Microsoft Corporation
        Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1)
    2014-06-14 11:24:15.83 Server      (c) Microsoft Corporation.
    2014-06-14 11:24:15.83 Server      All rights reserved.
    2014-06-14 11:24:15.83 Server      Server process ID is 11448.
    2014-06-14 11:24:15.83 Server      System Manufacturer: 'SAMSUNG ELECTRONICS CO., LTD.', System Model: '700Z3A/700Z4A/700Z5A/700Z5B'.
    2014-06-14 11:24:15.83 Server      Authentication mode is MIXED.
    2014-06-14 11:24:15.83 Server      Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\Log\ERRORLOG'.
    2014-06-14 11:24:15.83 Server      This instance of SQL Server last reported using a process ID of 5952 at 6/14/2014 11:21:35 AM (local) 6/14/2014 4:21:35 PM (UTC). This is an informational message only; no user action is required.
    2014-06-14 11:24:15.83 Server      Registry startup parameters:
         -d C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\DATA\master.mdf
         -e C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\Log\ERRORLOG
         -l C:\Program Files\Microsoft SQL Server\MSSQL10_50.ACT7\MSSQL\DATA\mastlog.ldf
    2014-06-14 11:24:15.83 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
    2014-06-14 11:24:15.83 Server      Detected 8 CPUs. This is an informational message; no user action is required.
    2014-06-14 11:24:15.87 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
    2014-06-14 11:24:15.88 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff:0 Active CPU mask: 0x00000000000000ff:0. This message provides a description of the NUMA configuration for this computer. This is an informational
    message only. No user action is required.
    2014-06-14 11:24:15.90 spid7s      Starting up database 'master'.
    2014-06-14 11:24:15.91 spid7s      1 transactions rolled forward in database 'master' (1). This is an informational message only. No user action is required.
    2014-06-14 11:24:15.91 spid7s      0 transactions rolled back in database 'master' (1). This is an informational message only. No user action is required.
    2014-06-14 11:24:15.91 spid7s      Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
    2014-06-14 11:24:15.92 spid7s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'ACT7'.
    2014-06-14 11:24:15.93 spid7s      SQL Trace ID 1 was started by login "sa".
    2014-06-14 11:24:15.93 spid7s      Starting up database 'mssqlsystemresource'.
    2014-06-14 11:24:15.93 spid7s      The resource database build version is 10.50.2500. This is an informational message only. No user action is required.
    2014-06-14 11:24:16.03 spid7s      Server name is 'MARTINDAHL-PC\ACT7'. This is an informational message only. No user action is required.
    2014-06-14 11:24:16.03 spid10s     Starting up database 'model'.
    2014-06-14 11:24:16.03 spid7s      Informational: No full-text supported languages found.
    2014-06-14 11:24:16.03 spid7s      Starting up database 'msdb'.
    2014-06-14 11:24:16.03 Server      Error: 17190, Severity: 16, State: 1.
    2014-06-14 11:24:16.03 Server      Initializing the FallBack certificate failed with error code: 1, state: 1, error number: -2146893802.
    2014-06-14 11:24:16.03 Server      Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
    2014-06-14 11:24:16.03 Server      Error: 17182, Severity: 16, State: 1.
    2014-06-14 11:24:16.03 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x80. Reason: Unable to initialize SSL support. Cannot find object or property.
    2014-06-14 11:24:16.03 Server      Error: 17182, Severity: 16, State: 1.
    2014-06-14 11:24:16.03 Server      TDSSNIClient initialization failed with error 0x80092004, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. Cannot find object or property.
    2014-06-14 11:24:16.03 Server      Error: 17826, Severity: 18, State: 3.
    2014-06-14 11:24:16.03 Server      Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
    2014-06-14 11:24:16.03 Server      Error: 17120, Severity: 16, State: 1.
    2014-06-14 11:24:16.03 Server      SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.
    Also, the link you provided is to Windows Vista, not Windows 7 Home Premium.  However, I did look at the registry setting they said to look at in the link.
    Locate the following registry subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
    Under the ProfileList subkey, delete the subkey that is named <var>SID</var>.bak.
    Note <var>SID</var> is a placeholder for the security identifier (SID) of the user account that is experiencing the problem. The <var>SID</var>.bak subkey should contain a ProfileImagePath registry entry that points to the original profile
    folder of the user account that is experiencing the problem.
    Exit Registry Editor.
    Looking into my registry for my ProfilesList as mentioned. I have these items.
    S-1-5-19 Folder with Default (Value not set), Flags (REG_DWORD) 0x0000000, ProfileImagePath (REG_EXPANDS_SZ) C:Windows\ServiceProfiles\LocalService, State (REG_DWORD) 0x0000000
    S-1-5-20 Folder with Default (Value not set), Flags (REG_DWORD) 0x0000000, ProfileImagePath (REG_EXPANDS_SZ) C:Windows\ServiceProfiles\NetworkService, State (REG_DWORD) 0x0000000
    Then I have an item for each of my three accounts, Administrator, Martin Dahl, and mdahl, All admin Accounts, which has no sid.bak, but a Sid, so not sure how this link helps me either.   Still looking for assistance.  Still not starting.

  • SQL Expression Field - Combine Declared Variable With Case Statement

    Hello All, I have been using Crystal & Business Objects for a few months now and have figured out quite a bit on my own. This is the first real time I have struggled with something and while I could do this as a Formula Field I would like to know how to do this as a SQL Expression. Basically I want to create a SQL Expression that uses a CASE statement but I wanted to make the code a little more efficient and employ a variable to hold a string and then use the variable in the CASE statement. The expression editor accepts the CASE statement OK but I don't know how to declare the variable. Please assist with the syntax?
    This is what I have:
    CASE
       WHEN u201CDatabaseu201D.u201DFieldu201D = u2018Hu2019 THEN u2018Hedgeu2019
       WHEN u201CDatabaseu201D.u201DFieldu201D = u2018Pu2019 THEN u2018PVIu2019
       ELSE u2018Noneu2019
    END
    This is what I want:
    DECLARE strVar AS VARCHAR(25)
    strVar =  u201CDatabaseu201D.u201DFieldu201D
    CASE
       WHEN strVar = u2018Hu2019 THEN u2018Hedgeu2019
       WHEN strVar = u2018Pu2019 THEN u2018PVIu2019
       ELSE u2018Noneu2019
    END

    Hi Todd,
    Please use the following for loop; your problem will be solved.
    Local StringVar str := "";
    Local NumberVar strLen := Length ({Database.Field});
    Local NumberVar i;
    For i := 1 To strLen Do
           if {Database.Field} <i> = "H" then str := "Hedge"
            else if {Database.Field} <i> = "P" then str := "PVI"
            else str := "None"; exit for
    str
    Let me know once done!
    Thank you,
    Ashok

  • SQL Expression Fields button not visible in Field Explorer

    Hi,
    On my Crystal Reports installation I can see the button SQL Expression Fields in Field Explorer but it is not visible on client's installation.
    How do I make it visible? I need to create a new report with SQL query for client.
    Thanks,
    Ajay Audich

    Commands are intended to replace the standard linked tables that must users are accustomed to.
    I suppose Commands would be considered an "advanced" feature, considering that they require the developer to be able to hand write SQL (our at least copy it from another SQL editor).
    If you are comfortable writing reading, writing & editing SQL, Commands will open a the door to a whole new level of control when it comes to creating your data sets.
    The biggest problem w Commands is also it's greatest strength... If you're using a Command, CR will assume that you know what you're doing and will not try to rewrite or optimize your SQL in the background. You write it, CR sends it. That means if you write crappy SQL, CR will send your crappy SQL to the db server...
    It also means that you can use join types that aren't available in CR and use sub-queries in in your SQL... Basically anything you can do in the db's native editor.
    HTH,
    Jason

  • Unable to See the Technology Function in The Expression Editor- ODI 11G

    Hi,
    I am developing Interface whereas i am unable to see the Technology functions in the Expression Editor where i am trying to do some transformation .
    Secondly in the Header it is showing Default language in place of SQL(Oracle)
    any fix please..
    Thanks,
    KP

    I fixed it myself- thanks
    Below was the step i did which resolved the issue. hope this will help others
    Go to ODI Studio
    In Topology- Expand Language
    Import New Language
    import in synonym INSERT_UPDATE mode
    The Language definitions from $ODI_HOME/oracledi/xml-reference/LANG_SQL.xml
    click OK
    close ODI Studio and Open again. that fixed my issue.
    Thanks,

  • How to pass a parameter into a sql expression?

    How to pass a report parameter into a sql expression?

    Hi Donald,
        The functionality of using a parameter in a function is only available in the formula editor and not in SQL Expression. Parameters cannot be passed to the SQL Expression, the main purpose of the SQL Expression is to make use of Database functions to make calculations at the database level but the current functionality of the product only allows you to use Database fields.
    There is an article that talks on SQL Expressions and can be useful http://technicalsupport.businessobjects.com/KanisaSupportSite/search.do?cmd=displayKC&docType=kc&externalId=c2016184&sliceId=&dialogID=6018612&stateId=1%200%206020316
    Regards,
    Vinay

  • Using sql expression in filter

    Hi Experts,
    I have a question using 'sql expression' in filters in answers. Let's say i have a date filter and i would like the value for that date as max(tablename.colname). Please tell me the syntax for passing this.
    One more question is i have a date prompt the data will be refreshed weekly let's say the data refreshed like this *08/1/11 ,08/8/11 and 08/15/11* . Now if i select 08/08/11 it will show the data
    populated on *08/08/11* which is ok but if i select *08/09/11 to 08/14/11* it show only *08/08/11* data. Same way if select *08/16/11 or 09/16/11* it should show the last refreshed data which is *08/15/11*
    Thanks in Advance.
    chak

    Ok, so you want the report to be restricted as of last refresh date when your selects a date in prompt which is beyond/greater than the last refresh date.
    One way of doing this can be as below:
    - Capture the last refresh date in a repository variable. So this variable will always hold a value for last refresh date.
    - In prompts, capture the date selected by user in a presentation variable and apply the below statement in the Advanced SQL of the report.
    DateColumn = case when Timestamp '@{pvar}{2011-01-01 00:00:00}' <= valueof("lastRefDate") then timestamp '@{pvar}{2011-01-01 00:00:00}' else valueof("lastRefDate") end
    Here pvar is your presentation var and lastRefDate is your rep variable holding the last refresh date. What this statement would do is if user selects a date which is less that equal to last refresh date, then report will be filtered as of that date. Else, the report will be filtered by value of the Last Refresh date.
    Thanks

  • SQL Expression in Filter conditon Error in OBIEE 10g

    Hi
    I am getting an error while giving the sql in the sql expression in filter conditon.
    The sql expression I am giving is:SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"'
    Error:
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetLevelDrillability('set variable disable_cache_hit=1; SELECT "Task"."Task Name" saw_0, "Task Runs"."Time in Seconds" saw_1, TOPN("Task Runs"."Time in Seconds", 10) saw_2, "Task Runs"."Start Time" saw_3 FROM "Analysis" WHERE "Task Runs"."Start Time" >= SELECT MAX("Task Runs"."Start Time") saw_4 FROM "Analysis"')}
    But when I individualy select start time column and check max of it the data comes fine, but if I am giving in sql expression it errors out.
    Please suggest.

    Hi Sini,
    I have tried taking the second suggestion but I get no result for that
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    Here I did not understand the code Task Runs"."Start Time" by "Task"."Task Name". If possible elaborate.
    And 1st suggestion the query formed just looks the query u suggested.
    Unable to figure out what exactly is the problem.
    Try something as in with 2 queries
    http://www.cool-bi.com/Tweaks/JoinsinAnswers.php
    or else
    "Task Runs"."Start Time" -->Filter->Advanced button->Convert this in SQL->
    WHERE "Task Runs"."Start Time" >= MAX("Task Runs"."Start Time" by "Task"."Task Name")
    not sure how it works but this is other way of your sql in BI

  • SQL Expression field with parameter

    Hello,
    I am trying to create a SQL Expression Field that will give me the maximum status date of an employee before a certain date entered in parameter.
    ex: select max(status_date) from status where status_date < formula field or parameter
    Since I can not put a paramter or a formula field in a SQL Expression field, I might need a template or an example of something that works ?
    Thank's
    Steph
    Edited by: Stephanie Charest on Aug 4, 2008 7:59 PM

    Ok,
    The only way I found to get the maximum status date of an employee with the date entered in parameter was to litteraly put each employee ID, and Status Date in the Detail section.
    Then in the select expert create the parameter date.
    Then I created a running total field that counts the employees and resets on change of employee sorted by status date.
    Then I created a formula that gets all the first occurences of this running total field and if the running total field equals 1, a new formula field shows 1 and if not (2 and more), it shows 0.
    But I can't find the way to give me the total that I need for each group sections.
    It's ok if the SQL expression field does not work, but I need to find a way to get the max date.
    Thank's for your help for the SQL Expression field.
    Steph

Maybe you are looking for

  • I have Acrobat 9 Pro Extended trying to install Adobe Presenter

    I have Acrobat 9 Pro Extended trying to install Adobe Presenter can someone tell me where the serial # is located as there is none on the box although there is one for Acrobat.. thanks

  • Setting Focus In Textarea

    Ok, I have a java program I've bundled into a jar and then packaged into a Win32 executable. I have windows associate a particular filetype (.wri) to my program. When I click a .wri file and open it, it loads data to a textarea. Now when I scroll dow

  • PROTECT & BOTTOM issue

    /E ITEM_CONDITIONS /: PROTECT /: BOTTOM ZC &KOMVD-VTEXT&,,&KOMVD-KWERT& ZC &KOMK-SUPOS& /: ENDBOTTOM /: ENDPROTECT Is this correct? Hi, all. May i know how to protect the text elements into a same block when displaying, besides make it alwaya in the

  • Best codec for delivering 1080p video in flash

    I'm developing some AS3 that will end up in a mac projector (.app). This app will stream 1080p videos from the local disk. What is the best codec for fluid videos? (no hiccups, fast start, etc) Is there any special setting I have to consider in the c

  • About Copy Control.

    Dear SD Gurus. I want to copy know the seeting of copy control between. F2-----RE OR----RE I have tried once for BOM. Header Item Catagory TAP Item level TAN. When I am trying to copy its showing error. Plz let me know where I am making mistake. Rega