Command object help

Hi All,
I have a report having command object like this.My back end is MYSQL.
I am not getting data in designer with below query
SELECT * FROM clock_time WHERE STR_TO_DATE(DATE_FORMAT(clock_time,'%d-%m-%Y %H:%i'),'%d-%m-%Y %H:%i')= DATE_FORMAT('2014-06-19 11:03:43','%d-%m-%Y %H:%i')
What is the mistake I am doing .
Please help.

Hi Divya,
Does the same command work on the database when run via the database client?
See if this works:
SELECT * FROM clock_time WHERE DATE_FORMAT(clock_time,'%d-%m-%Y %H:%i') = Str_To_Date('19-06-2014 11:03','%d-%m-%Y %H:%i')
-Abhilash

Similar Messages

  • Problem creating a SQL command object and adding it to a Crystal report

    Hi,
    I'm trying to add the following SQL command object with the following sql for MYSQL 5.1
    SELECT lic.id, lic.productionname, comp.companyname, lic.paymentreceiveddate, lic.licenseissuedate,
    IFNULL((SELECT sum(licsong.feequoted) from licensesong licsong where licsong.licenseid = lic.id), 0) as totalfeequoted,
    IFNULL((SELECT sum(licsong.feetax) from licensesong licsong where licsong.licenseid = lic.id), 0) as totalfeetax,
    IFNULL((SELECT sum(licsong.feequoted + licsong.feetax) from licensesong licsong where licsong.licenseid = lic.id), 0) as totalfee,
    IFNULL((SELECT sum(pay.fullamount) from payment pay where pay.licenseid = lic.id),0) as totalpaid
    FROM license lic
    INNER JOIN company comp on lic.licensecompanyid= comp.id;
    This sql runs fine in the Query Browser of mysql and returns what I want.
    When I try to add this SQL command to a new Crystal Report, (by right clicking in the sql editor and selecting Crystal Reports - Add to new Crystal Report), it locks up my Eclipses and it ends up not responding. If I just do a simple SELECT * FROM license it works fine.
    The Eclipse I'm using is from the CR4E download page with the crystal plugin already installed.
    Any help with this would be greatful, as I am not having much joy with this CR4E 2.0 with MySQL and may have to scrap it and go back creating reports in Apache POI.
    Any help greatly received.
    Kind regards

    Hi,
    Try to select a particular columns instead of doing SELECT * FROM license.
    Thanks,
    Saravanakumar

  • Crystal Reports 2008 - passing a parameter in the Command Object

    Hi,
    I am using Crystal Reports 2008. I have 4 Command Objects where I have the following queries.
    select emrace, count(empl_id) cntFCiv  from emmain where emtype='CIV' and emsex ='F' and emdateterm is null group by emrace
    select emrace, count(empl_id) cntFSw  from emmain where emtype='SWOR' and emsex ='F' and emdateterm is null group by emrace
    select emrace, count(empl_id) cntMCiv from emmain where emtype='CIV' and emsex = 'M' and emdateterm is null  group by  emrace
    select emrace,count(empl_id) cntMSw from emmain where emtype='SWOR' and emsex = 'M' and emdateterm is null  group by emrace
    I want to pass a parameter  to all these command objects. I want the user to select a parameter from a list of values. So, I created a parameter object, Bureau. (I get the values for the parameter with this command object: select code_agcy, descriptn from systab1 where code_key = 'UNIT'). I want the user to be able to get the counts for each bureau.
    How do I pass the parameter that the user picked to those command objects. I tried doing this:
    select emrace, count(empl_id) cntFCiv  from emmain where emtype='CIV' and emsex ='F' and emdateterm is null
    and emunit = '{?Bureau}' group by emrace
    But it did not work. Any help will be greatly appreciated.
    Thanks.

    Hi,
    I am using Crystal Reports 2008. I have 4 Command Objects where I have the following queries.
    select emrace, count(empl_id) cntFCiv  from emmain where emtype='CIV' and emsex ='F' and emdateterm is null group by emrace
    select emrace, count(empl_id) cntFSw  from emmain where emtype='SWOR' and emsex ='F' and emdateterm is null group by emrace
    select emrace, count(empl_id) cntMCiv from emmain where emtype='CIV' and emsex = 'M' and emdateterm is null  group by  emrace
    select emrace,count(empl_id) cntMSw from emmain where emtype='SWOR' and emsex = 'M' and emdateterm is null  group by emrace
    I want to pass a parameter  to all these command objects. I want the user to select a parameter from a list of values. So, I created a parameter object, Bureau. (I get the values for the parameter with this command object: select code_agcy, descriptn from systab1 where code_key = 'UNIT'). I want the user to be able to get the counts for each bureau.
    How do I pass the parameter that the user picked to those command objects. I tried doing this:
    select emrace, count(empl_id) cntFCiv  from emmain where emtype='CIV' and emsex ='F' and emdateterm is null
    and emunit = '{?Bureau}' group by emrace
    But it did not work. Any help will be greatly appreciated.
    Thanks.

  • Oracle 8i Lite: Command Object Creation Failed

    Hi Everyone,
    I use Windows XP everything works except navigator and I get the message that Command Object Creation Failed
    Does Anyone know how to fix this and I have to use 8i Lite as it for a school database project
    Thanks in advance for everyone's help
    J S

    Hi. I know this response is too many years late, but I'm putting it in case someone (like me a few days ago) needs to connect to a legacy server using legacy tools:
    This error is caused by the installer, sometimes it does not adequately register the OLE/COM objects provided in nav8cmd.dll
    So, to correct it:
    - open a command window
    - change to the directory where the navigator program files reside (In my case c:\orant\bin)
    - type the following command: regsvr32 nav8cmd.dll
    You should receive a message that the DLL was correctly registered. After that you can use the navigator without problems.
    Cheers.

  • Set Table Location for Reports(Command Objects)

    Hi SAP Gems,
    I would like to thank TED,Merry,Jonathan, Shawn, and all the developers contributing to this community.
    I would really appreciate any help on following question:
    1. I have a report designed in CR 2008 against DB2(JDBC Connectivity).
    2. The report is working fine in the designer.
    3. There are five sub reports in the main report.
    4. The main report doesnt have any command object however every child/sub report has command object with paramaters.
    5. Every subreport is linked.
    6. I would like to change runtime datasource location for this report using CRJ 2.0 SDK'S.( from AIX to Windows BOX)
    7. Both BOX's have same database schema.
    8. I am able to view the report in the jsp page using SDK's, however "set table location doesnt works and prompts me the error:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Unexpected database connector error---- Error code:-2147467259 Error code name:failed
    *There is no problem with the code because the sample code is taken from sdn.sap as it is and it works for other report without subreport and command objects.
    I tried using the following code piece but again same problem.
    if(table instanceof com.crystaldecisions.sdk.occa.report.data.CommandTable)
                        IProcedure command = (IProcedure)table;
                        ParameterField commandParam = (ParameterField) command.getParameters().get(0);
                        Values values = new Values();
                        ParameterFieldDiscreteValue pfdv = new ParameterFieldDiscreteValue();
                        pfdv.setValue("ANTON");
                        values.add(pfdv);
                        commandParam.setCurrentValues(values);
    I would like to know if I dont want to set the command level param using:
    ParameterField commandParam = (ParameterField) command.getParameters().get(0);
                        Values values = new Values();
                        ParameterFieldDiscreteValue pfdv = new ParameterFieldDiscreteValue();
                        pfdv.setValue("ANTON");
                        values.add(pfdv);
                        commandParam.setCurrentValues(values);
    would the parameter would be prompted automatically?
    how do I find what paramaeter to set and how ?
    Regards,
    Jonathan Roy

    Hi ,
    Can any one help please?
    Ted !! I would really appreciate an answer from you.
    Regards,
    Jon

  • Removing Command Object

    I still consider myself a beginner at Crystal Reports (XI), even though I've had some successes.  I know I lucked out in getting my reports done and probably couldn't tell you exactly how I actually did them.  I appreciate any help and apologize if I missed something obvious. 
    What I'm trying to do now is update the reports I was able to first create.  I want to add several more tables and fields.  Also, because the original reports are using a command object, they ran very slowly.  I want to remove the command object and query the database directly.  I can do that, right?  Well, I did that first thinking this would be the easy part - but I'm not sure if I did it correctly - basically deleting the command object and updating the formula fields to pull directly from the tables. I also went through the Set Database location to update to the new tables and then verified the database.  In the Field Explorer, I can browse the data, but when previewing the report no data is returned.  There is no error messages.  I'm connecting to the database (SQL) via OLE. 
    Can someone help fill me in on what I missed?

    Hi,
        Well, you need to create the new query/view first.
    Make sure that it contains all the fields you are presently using (...plus the new fields).  Make sure the Date Types are the same as the old fields that you want to replace.  Even name the fields the same as in the command object. (... with an "AS" clause...table.field as "Order ID"). 
        Now add the new view to the report.  This should activate the "Mapping" feature.  The "Mapping" dialog will show you what mapping it thinks is right and which ones it can't figure out.  Check them all out, map the new fields to the old fields and click ok.  Now you can add the new fields you created because they will show up under "Database" in your report.
    Make sure all the old fields are replaced by the new ones. 
    You can tell because all the check marks beside the old fields will be gone.  When the fields are all replaced, you can delete the old command object.
         If you miss a step or don't do one of the steps right, the mapping feature will not come up when you add the new view.
    I don't know of another way to force the mapping feature to appear.  Maybe someone else knows.
    Happy Hunting,
    The Panda

  • ASP Command object isn't closed in DW code?

    Hi,
    I have recently noticed that the Pagefile useage on one of my
    servers runs
    high most of the time. I am wondering if this is due to
    memory leakage from
    the fact that my DW generated code doesn't explicitly close
    the Command
    object in the ASP code.
    Does anyone know if this could be helped by setting the
    Comand object '=
    Nothing' at the end of the script or is there another way.
    I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
    Thanks.

    Your right I think Ray Wet or Tom Muck Came up with a
    extension to do just
    that, I think Adobe could have included this with the 8.02 up
    date that
    fixed the SQL injection issue. Hope some of this will be
    included in the
    next version.
    Dave
    "Pat Shaw" <[email protected]> wrote in message
    news:[email protected]...
    > Yes, I totally agree, so why doesn't DWMX do this for
    you? I remember in
    > UltraDev1 (for those who can remember back that far),
    the rs was not
    closed
    > at the bottom of the page and this was corrected in UD4
    which was the next
    > version.
    >
    > "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote
    in message
    > news:[email protected]...
    > >I have always been under the impression that every
    thing needs to be
    closed
    > > including all objects, Command, CDO etc.
    > > set commandobject=nothing // destroy the command
    object
    > > Including all connections, recoredset's and so on.
    > > Some helpful information
    > >
    http://www.aspfaq.com/params.htm
    > > Dave
    > >
    > >
    > > "Pat Shaw" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Thanks but this is different. I am talking
    about the Command object.
    > >>
    > >> "Baxter" <baxter(RemoveThe
    :-)@gtlakes.com> wrote in message
    > >> news:[email protected]...
    > >> > Hi! Pat
    > >> > I always add this to the end of my asp
    pages.
    > >> >
    > >> > </body>
    > >> > </html>
    > >> > <%
    > >> > rsYourRecordset.Close()
    > >> > %>
    > >> >
    > >> > Dave
    > >> > "Pat Shaw" <[email protected]> wrote in
    message
    > >> > news:[email protected]...
    > >> >> Hi,
    > >> >>
    > >> >> I have recently noticed that the
    Pagefile useage on one of my
    servers
    > >> >> runs
    > >> >> high most of the time. I am wondering
    if this is due to memory
    leakage
    > >> > from
    > >> >> the fact that my DW generated code
    doesn't explicitly close the
    > >> >> Command
    > >> >> object in the ASP code.
    > >> >>
    > >> >> Does anyone know if this could be
    helped by setting the Comand
    object
    > > '=
    > >> >> Nothing' at the end of the script or
    is there another way.
    > >> >>
    > >> >> I am using DWMX2005 - Classic ASP to a
    SQL Server 2000 db.
    > >> >>
    > >> >> Thanks.
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >

  • I want to set deadlock priority of a stored proc to low so that when ever any one call it from entity or command object it should use same priority

    Hi,
       I want to set deadlock priority of a stored proc to low so that when ever any one calls it from entity or command object it should use same priority.
    some body sugested to put 
    set deadlockprioirty low 
    go
    exec yourSP()
    but in this case i have to change my bussiness layer.
    is there any other way from database which do the task?
    yours sincerley.

    You can modify your stored procedures and add the code line
    set deadlock_priority low
    at the very beginning of the SP.
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Using a Variable in SSIS - Error - "Command text was not set for the command object.".

    Hi All,
    I am using a OLE DB Source in my dataflow component and want to select SQL Query from the master table  I have created variables v_Archivequery
    String packageLevel (to store the query).
    <Variable Name="V_Archivequery" DataType="String">
         SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
         FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
         ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
         Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)
        </Variable>
    I am assigning this query to the v_Archivequery variable, "SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
    FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
     ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
    Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)"
    Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, v_Archivequery .
    But when I am generating the package and when running I am getting bewlo errror
     Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E0C  Description: "Command text was not set for the command object.".
    Can Someone guide me whr am going wrong?
    Please let me know where am going wrong?
    Thanks in advance.
    Thankx & regards, Vipin jha MCP

    What happens if you hit Preview button in OLE DB Source Editor? Also you can use the same query by selecting SQL Command option and test.
    Could you try set the Delay Validation = True at Package and re-run ?
    If set the query in variable expression (not in value), then Set Evaluate As Expression = True.
    -Vaibhav Chaudhari

  • Creating a LOV by using a Command Object

    Hello All,
    I have a report that's driven by a parameterized sproc, which is a year parameter.  However, we have a table that I would like to use in my object command to populate this parameter with the values from the select statement to enforce consistency. A new year is inserted into to this table yearly by another process, which would keep me from having to go into a static list to update the year options yearly. 
    I've created the command object and saved it to the repository, but I can't figure out how to associate it to the report as the parameter.
    Can anyone point me in the right direction?
    Thanks in advance.

    hi DevinM,
    two choices:
    A) add the Command to your report
    1) you can add the Command to your report...don't link it to any tables though...you'll get a "Generally not supported error" but you can ignore it for this test
    2) now in your prompt you will have the Command available for the dynamic values
    3) check that the number of records on your report remains the same as before...it should...any test i have run on this is aok
    B) create a Business View
    1) go into the Business View Manager and create a business view from the data foundation up
    2) once you've got the business view built you can create an LOV from there which is available to your current report and all other reports
    jw

  • Question re Command Object to populate parameter drop-down

    I have a report that uses a SQL Server stored procedure as the data source. The first parameter they enter is their company number (we have numerous clients using Lawson and access Crystal through LBI). The next parameter is the account number. I have a SQL statement written that gets distinct account numbers by company. When I create a Command object with the SQL statement, it doesn't allow me to use the company parameter.
    SELECT DISTINCT GLC.ACCOUNT, GLC.ACCOUNT_DESC
    FROM dbo.GLMASTER AS GLM
    INNER JOIN DBO.GLCHARTDTL AS GLC
    ON GLM.CHART_NAME = GLC.CHART_NAME
    AND GLM.ACCOUNT = GLC.ACCOUNT
    WHERE GLM.COMPANY = {?Company}
    ORDER BY GLC.ACCOUNT
    When I do Add Command in Database Expert and add the SQL above and name the parameter and try to Add, it says "Failed to retrieve data from the datase.
    Details: ADO Error Code: 0x
    Source: Microsoft OLE DB Provider for SQL Server
    Description: No value given for one or more required parameters
    Does anyone have a similar situation and a solution to this problem--either regarding my approach and error or a different approach to get the same thing?
    Any input would be greatly appreciated!

    You can't do this through a command object.  This particular type of parameter is called a "Cascading Dynamic Prompt".  You have to set these up through a Crystal Business View. 
    -Dell

  • I just got the iphone 4s and i cant figure out how to get siri to work it seems to be the old voice command. HELP!

    i just got the iphone 4s and i cant figure out how to get siri to work it seems to be the old voice command. HELP!

    Did you enable Siri in settings?
    Settings > General > Siri > ON
    If Siri is off, all you get when pressing the home button for 1 second is the old Voice Control.

  • Using Crystal Reports formulas in Command Objects

    Post Author: Hamish
    CA Forum: Formula
    Is this possible?
    When I try and reference a formula in a command object
    something like
    select * from tablenamewhere id in (@testFormula)
    @testFormula prints out as 1,2 on the report if I remove the reference in the command object
    I get an error Incorrect syntax near @testFormula from SQL Server
    (I'm using CR XI and SQL Server 2005)

    Post Author: bryanflora
    CA Forum: Formula
    In a matter of fact, Formula is for you to calculate the result you get from DB.And if there's anything you want to pass to DB before you get result, it's Parameter.

  • SQL Command Object

    We are in the process of migrating reports from SSRS to Crystal 2011.
    In SSRS we are able to paste complex SQL into reports as the data source for the report (e.g. multiple CTE's, correlated subqueries, temp tables, etc).
    It appears that we can accomplish the same thing using Crystal command objects, but the reports created have to be distributed as stand-alone rpt files to customers. In that case the reports that use sql commands return an error that the command object does not exist. It seems the command object exists in the data connection (which is generated at run-time in the host application) and not in the rpt file itself.
    Is it possible to somehow use an sql query as the data source in the report in a manner that is independent of the data connection?
    Thanks

    Hi, 
    That's interesting, the query shouldn't be stored in the data connection.  It should be saved inside the rpt as part of the SQL Query. 
    How are you distributing the reports? 
    How is your application connecting the reports to the database? 
    As long as the reports logon to the tables and objects used in the SQL Command exist on the database it should run without a problem. 
    As a test, open the report in Crystal and go to Database | Show SQL Query.  You should see your SQL Command there.  Copy and paste the SQL into your production database and see if it runs. 
    Good luck,
    Brian

  • How do I get the object help text into my document (report)?

    Post Author: ehskalm
    CA Forum: Desktop Intelligence Reporting
    I want to display the object help text (the "description" field in the object properties in the universe) in my report, but I can not find any function for that? Anyone who knows? BO version is 5.1.

    Post Author: hvanderkolk
    CA Forum: Desktop Intelligence Reporting
    All information about the classes and objects in a universe are stored in the repository database (universe domain). To get that information in your report you need to create a query on the repository database.
    For an overview of all objectnames and descriptions that would be:
    SELECT  WA_UNV_OBJECT.OBJ_NAME,  WA_OBJECT_HELP.OBJ_DATAVALUEFROM  (WA_UNV_OBJECT RIGHT OUTER JOIN WA_OBJECT_HELP ON (WA_OBJECT_HELP.OBJECT_ID=WA_UNV_OBJECT.OBJECT_ID  AND  WA_OBJECT_HELP.UNIVERSE_ID=WA_UNV_OBJECT.UNIVERSE_ID) ) 
    Note: this if from BO6.5 using SQL server 2000 for the repository database.

Maybe you are looking for

  • Cannot view terms and conditions

    hi I have just upgraded the software on my ipad 3 - and in order to complete the final section - i need to view the terms and conditions - but my ipad cant view them - so i'm stuck in this limbo now cannot connect to the internet

  • Verify/Repair disk permissions

    I heard that it's a good idea to verify and repair disk permissions. What does that do? And, when should I do it? -Eric

  • Errors and exceptions in writing large binary data on sockets!!! urgent

    hi I am trying to write large binary data in the form of byte arrays on sockets. Data is as large as 512KB(== 524288bytes) So i store the data (actually read from a file through FileInputStream ) and then write on the socket with lines like this Data

  • Printing double-sided problem, Leopard, Laserjet P2055dn and Quark XPress

    I've also asked about this in Quark's forum. Printing a Quark file double-sided to the Laserjet using Leopard - first third of the sheet (A4 landscape) is blank on both sides). This does not happen on Tiger, same file, printer and version of Quark. P

  • When turned on, it streams from its buffer from last time i used it

    Since the last software update for my ATV2, when I first turn it on (using Internet radio) it streams about 30 seconds to a minute of what it was playing when I last shut it off. It picks up right where it left off and continues for about a minute. T