473,395 Members | 1,464 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,395 software developers and data experts.

Problem with SQL Query

2
I am getting an error that my query is not properly ended Can someone tell me where I am going wrong with this.

Select ENG_ORD.ORD_CTL_NO, ENG_ORD.SER_NO, ENG_ORD.SHP_DT, ENG_ORD.SLS_MDL, ENG_ORD.ARR_NO, ENG_ORD.RTS_DT, ENG_ORD.DLR_CD
FROM ENG_ORD
WHERE (ENG_ORD.SHP_DT>='2012-01-26' AND ENG_ORD.SHP_DT< '2012-02-02') AND (ENG_ORD.DLR_CD LIKE '9GDM' OR ENG_ORD.DLR_CD LIKE 'B03%' OR ENG_ORD.DLR_CD LIKE 'Y157' OR ENG_ORD.DLR_CD LIKE 'Y186' OR ENG_ORD.DLR_CD LIKE 'Y302' OR ENG_ORD.DLR_CD LIKE 'Y941' OR ENG_ORD.DLR_CD LIKE 'Z105' OR ENG_ORD.DLR_CD LIKE 'Z107' OR ENG_ORD.DLR_CD LIKE 'Z319')
ORDER BY ENG_ORD.DLR_CD
union
SELECT PKG_ORD.ORD_CTL_NO, PKG_ORD.SER_NO, PKG_ORD.SHP_DT, PKG_ORD.SLS_MDL, PKG_ORD.ARR_NO, PKG_ORD.RTS_DT, PKG_ORD.DLR_CD
FROM PKG_ORD
WHERE (PKG_ORD.SHP_DT>= '2012-01-26' AND PKG_ORD.SHP_DT< '2012-02-02') AND (PKG_ORD.DLR_CD LIKE '9GDM' OR PKG_ORD.DLR_CD LIKE 'B03%' OR PKG_ORD.DLR_CD LIKE 'Y157' OR PKG_ORD.DLR_CD LIKE 'Y186' OR PKG_ORD.DLR_CD LIKE 'Y302' OR PKG_ORD.DLR_CD LIKE 'Y941' OR PKG_ORD.DLR_CD LIKE 'Z105' OR PKG_ORD.DLR_CD LIKE 'Z107' OR PKG_ORD.DLR_CD LIKE 'Z319')
ORDER BY PKG_ORD.DLR_CD
Feb 1 '12 #1
2 1680
Rabbit
12,516 Expert Mod 8TB
The query looks fine so MySQL must be expecting a semi-colon at the end of the query.
Feb 1 '12 #2
im not clear it, but sure u should use one order by statement in that qry...
Feb 7 '12 #3

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

Similar topics

3
by: Jack A | last post by:
Guys, I'm stumped. While its not pertinent to the matter, we are running a Vignette content management system on Win2k with Sql 2000 Enterprise on a cluster. The server has 2 Gig of RAM , 2 CPU's...
2
by: Hammy Hammy | last post by:
Hi all, I have an invoice table query that returns 10 records. ie. there are 10 invoices. When I try to join a subjects table to retrieve the subject name associated with an invoice it returns...
9
by: Mike Bridge | last post by:
I am using MS Access 2003, and I typed in a query in SQL view which was working fine. Now when I open it, it gives me the error "Join expression not supported". Apparently, Access "fixed" it for...
1
by: ian.davies52 | last post by:
I'm having a problem running a query. I get the "too many fields" error message, but I only have 162 fields in the query and I thought the limit was 255. The problem query (Query1) is based on...
8
by: Nadav | last post by:
Hi, I am writing a performence critical application, this require me to stick to unmanaged C++ as performance is much better using unmanaged C++ ( about 33% better ), Still, I am trying to avoid...
2
by: Strasser | last post by:
Problem: Query record selection criteria reads Like & "*" BUT, then Access changes it to non-functioning Alike & "*" Any ideas? Thank you in advance. Strasser
5
by: Merennulli | last post by:
To start with, I'll give a simplified overview of my data. BaseRecord (4mil rows, 25k in each Region) ID | Name | Region | etc OtherData (7.5mil rows, 1 or 2 per ID) ID | Type(1/2) | Data ...
0
by: rwschul | last post by:
I have a problem query that I could use some help. This code ran in 20 minutes last year and there is not much change in the input data this year....perhaps 10% growth. Currently this is running 8+...
3
by: mahaveer | last post by:
Hi , I am facing a strange problem with STL maps ,I am using gdb to debug my debug my code. Upto one point the number of entries in the map is shown as follows , $79 = {_M_t = { _M_impl...
7
by: quincy451 | last post by:
drop table . CREATE TABLE . ( NULL , (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , NULL , NULL , (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , (16) COLLATE
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.