Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query problem 1

Status
Not open for further replies.

21128

Programmer
Aug 27, 2009
36
US
hi guys,
I am new in crystal report developer.
I am using crystal report xi and oracle 10g.
The query i have created gives an error

Error starting at line 1 in command:
Select h.tour, h.rev_no, h.sta, h.shift_no, h.user_ID, h.rd, h.notes,
(select h2.rd
from history h2
where h2.sta = 1 and
) DT,
(select h3.rd
from history h3
where h3.sta = 2 and
) BRAT,
(select h4.rd
from history h4
where h4.sta = 3 and
) BC1Volt
from history
where
(h.tour = 16
or
tour = 17) and
rev_no = 2 and
DT = '24-AUG-09'
Error at Command Line:5 Column:1
Error report:
SQL Error: ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:

Error starting at line 1 in command:
Select h.tour, h.rev_no, h.sta, h.shift_no, h.user_ID, h.rd, h.notes,
(select h2.rd
from history h2
where h2.sta = 1 and
) DT,
(select h3.rd
from history h3
where h3.sta = 2 and
) BRAT,
(select h4.rd
from history h4
where h4.sta = 3 and
) BC1Volt
from history h
where
(h.tour = 16
or
tour = 17) and
rev_no = 2 and
DT = '24-AUG-09'
Error at Command Line:5 Column:1
Error report:
SQL Error: ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:


Can someone please help me?
thank you
 

This is really an SQL question that has nothing to do with Crystal reports.

You have three ands followed by right parenthesis. If you fix that it should get you to the next error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top