Skip to Content
author's profile photo Former Member
Former Member

SELECT GETDATE() not giving results

Hi All,

I tried firing a fixed query SELECT SUM(PRODUCTION_DATA) FROM TABLE_NAME. but it is not fetching any result.but if i fire SELECT PRODUCTION_DATA FROM TABLE_NAME then it is giving me result.

I dont know what is the problem.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2007 at 12:09 PM

    Lipsa

    Just a silly mistake u hv taken in Query 😊

    Use this Query

    SELECT SUM(PRODUCTION_DATA) AS TOTAL FROM TABLE_NAME

    Dont forget to inform if its working

    Regards

    Som

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Lipsa

      This is not clear wat u meant with ur machine or other machine ???!!!

      If u use <b>Fixed Query</b> mode in <b>Query Template Editor</b>, then this query SELECT SUM(COLUMN_NAME) FROM TABLE_NAME will not show any result, since <b>this query does not provide any column name which will be shown with the Value of SUM whereas in Query Template it is recommended to have a column name to be displayed</b>.

      If u use the same Query in other platform which does not need to show Column name with Value returned by any of Aggregate Functions, it will work.

      If it still does not clear ur doubt, ur doubts with details r welcome. [Dont just raise a doubt with limited explanation]

      Waiting

      Som

  • Posted on Sep 20, 2007 at 12:41 PM

    Lipsa,

    It's really quite simple - you need to alias your columns with 'AS', especially with functions or aggregate expressions like sum, min, max, etc.

    If you run SELECT GETDATE() in Microsoft's query analyzer it shows the results, but the grid below shows (No column name), and xMII is no different since it wants you to name the resulting column.

    Regards,

    Jeremy

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.