473,387 Members | 1,398 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

SQL command not properly ended?

SELECT MAX(NumOccurrences)
FROM ABSENCE_HISTORY
Where AbsenceDate = Exists

(select EmpID from ABSENCE_HISTORY
Intersect
Select EmpID from EMPLOYEE);

(select EmpID,
count(EmpID) as NumOfAbsence
from ABSENCE_HISTORY
group by EmpID
order by NumOfAbsencedesc)

got the same error too...
can anyone please help .. > <"
Thanks
Apr 10 '08 #1
1 1055
debasisdas
8,127 Expert 4TB
try using this

Expand|Select|Wrap|Line Numbers
  1. SELECT MAX(NumOccurrences)
  2. FROM ABSENCE_HISTORY
  3. Where AbsenceDate  Exists 
  4.  
  5. (select EmpID from ABSENCE_HISTORY
  6. Intersect
  7. Select EmpID from EMPLOYEE);
  8.  
and this
Expand|Select|Wrap|Line Numbers
  1. select EmpID, 
  2. count(EmpID) as NumOfAbsence
  3. from ABSENCE_HISTORY 
  4. group by EmpID
  5. order by NumOfAbsence desc
  6.  
Apr 10 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: jlea | last post by:
I'm trying to pass a filename, obtained with using the fileName property from the OpenFileDialog, as a application parameter in Process.StartInfo.Arguments and run a MFC/C++ application using the...
5
by: Gene | last post by:
What can I do if I want to get the result using the sql command? for example, the select command is "select Name from Employee where StaffID=10" How to get the "Name"??? dim Name as string and...
5
by: Good Man | last post by:
Hi there I am trying to execute a custom-built java program on my linux server via PHP. Basically, a user uploads files via PHP, and then the java program performs some action on these files. ...
3
by: Double Echo | last post by:
Hi all, I'm using PHP 4.4.2, and use PHP on both the command-line and the web. I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using Apache 2.0.55 , on my Dell laptop. ...
2
by: Chris Song | last post by:
Hello, I'v installed mysql 5.0 (MySQL-server-standard-5.0.27-0.rhel4.i386.rpm) on RedHat AS4. When I start mysql through command line (i.e. /usr/bin/mysqld_safe --datadir=/var/lib/mysql...
2
by: Sahar Madahian | last post by:
Hi! I try to insert value to a table column but I'v got this error 'ORA-00933: SQL command not properly ended' Can anyone help me please? insert into SHAMROCK.CAT_SALESPRODUCT...
4
by: narenshines | last post by:
Hi I am trying to update my table using this.. update tablename set sqlquery = 'select max(upd_rows) from tablename where data_center='***' and tab_abbrev='***'' where userid='12345'; ...
4
by: outhowz42 | last post by:
This works in mySQL, but not Oracle 10g and I have no idea why. Please help! SQL> SELECT E.name, B.publisher FROM employee as E 2 INNER JOIN loan AS L ON (E.empno=L.empno) 3 INNER JOIN...
2
by: SREESHAK | last post by:
i am getting the erroe ORA:00933 sql command not properly ended ,for sqlStatement.executeUpdate( "INSERT INTO CLARITY.Z_INBOUND_AUTO_SCHEDULE(FILE_NAME, FILE_DATE, CREATED_DATE, MODIFIED_DATE,...
2
by: MSSatpute84 | last post by:
hi, I have one sql code written. I ran it n getting a error--"Sql query not properly ended". can anyone tell me solution to fix the error?/////
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.