Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6998623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:26:05+00:00 2026-05-27T20:26:05+00:00

Can you please help me know what maybe the error in my sql? I’m

  • 0

Can you please help me know what maybe the error in my sql?
I’m having missing expression error but I cannot find the error.
Thank you very much in advance.

SELECT SYSTEMNAME, round(MAX(GBL_CPU_TOTAL_UTIL),2) AS AVE_CPU,
convert(varchar(20),DATEADD(hour, DATEDIFF(hour, 0, DATETIME), 0),110) AS DATE
FROM dbo.[GLOBAL]
WHERE (SYSTEMNAME IN ( 'X1','X2','X3'))    
AND (DATETIME > DATEADD(month, - 24, GETDATE()))
AND (DATETIME BETWEEN '12-27-2011 00:00' AND '12-30-2011 00:00')
GROUP BY SYSTEMNAME, convert(varchar(20),
DATEADD(hour, DATEDIFF(hour, 0, DATETIME), 0),110)
ORDER BY DATE

Error:

ORA-00936: missing expression
00936. 00000 -  "missing expression"
*Cause:    
*Action:
Error at Line: 2 Column: 9
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:26:06+00:00Added an answer on May 27, 2026 at 8:26 pm

    convert(varchar(20), ... ?

    As far as I know, convert is used to convert a string from one character set to another. varchar(20) is not a string. This is also likely to be the case since that “line 2, column 9” is exactly where the varchar(20) is.

    The doco for convert states:


    convert( string1 , char_set_to , [ char_set_from ] )
    string1 is the string to be converted.
    char_set_to is the character set to convert to.
    char_set_from is the character set to convert from.


    If your intent is to cast the date difference to a varchar(20) type, you should probably be using cast.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help! I don't know if maybe this is too simple but I can't
can someone please help me. why does this return an error: Dim stuff As
Can someone please help me out with printing the contents of an IFrame via
Can someone please help me? In Perl, what is the difference between: exec command;
Can someone please help quickly mute or unmute the stage volume in Flash CS3
can u please help me how to return an instance of a function which
can someboody please help me convert these strings/ints into a usable font thing? it
Can anyone please help me to work out how to achieve the following? I
Can someone please help me with using Regex with NSPredicate? NSString *regex = @(?:[A-Za-z0-9]);
can you please help me with this issue the String class does not have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.