Skip to main content



      Home
Home » Archived » BIRT » Newbie question on Prepare error
Newbie question on Prepare error [message #200856] Tue, 14 November 2006 19:18 Go to next message
Eclipse UserFriend
I'm just getting into BIRT and was going through the tutorial which by
the way is rather good in comparison to most computer tutorials.

I ran into the following prepare error:

Failed to prepare the following query......

It's the base query stated in the "Building a Data Set" section.

My question is actually regarding the following text in the tutorial :

" If an error dialog appears, check the following:

* Your Eclipse is installed in a directory without spaces.
* You have typed the SQL statement as shown above.
* You have not put a semi-colon at the end of your statement."

In regards to the first statemenet, I'm confused by why they state this
as the install instructions even use as an example of "C:\Program
Files" as the directory to install into. So, given the fact that I
installed in "program files" could this possible the be the problem?

The SQL is as basic as you can get and it's correct. I have no idea
what could be causing an error. Any suggestions?
Re: Newbie question on Prepare error [message #200875 is a reply to message #200856] Tue, 14 November 2006 19:51 Go to previous messageGo to next message
Eclipse UserFriend
Kevin Day wrote:
> I'm just getting into BIRT and was going through the tutorial which by
> the way is rather good in comparison to most computer tutorials.
>
> I ran into the following prepare error:
>
> Failed to prepare the following query......
>
> It's the base query stated in the "Building a Data Set" section.
>
> My question is actually regarding the following text in the tutorial :
>
> " If an error dialog appears, check the following:
>
> * Your Eclipse is installed in a directory without spaces.
> * You have typed the SQL statement as shown above.
> * You have not put a semi-colon at the end of your statement."
>
> In regards to the first statemenet, I'm confused by why they state this
> as the install instructions even use as an example of "C:\Program
> Files" as the directory to install into. So, given the fact that I
> installed in "program files" could this possible the be the problem?
>
> The SQL is as basic as you can get and it's correct. I have no idea
> what could be causing an error. Any suggestions?

The problem actually seems to be with SQL itself. The prepare has an
issue with the following
SELECT *
FROM CUSTOMERS
where COUNTRY = "100"

I get the following error

A BIRT exception occurred.
Plug-in Provider:Eclipse.org
Plug-in Name:BIRT Data Engine
Plug-in ID:org.eclipse.birt.data
Version:2.1.1.v20060922-1058
Error Code:odaconsumer.CannotPrepareStatement
Error Message:Failed to prepare the following query for the data set
type org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet.
[SELECT *
FROM CUSTOMERS
where COUNTRY = "USA"]
Error preparing SQL statement.
SQL error #1: Column 'USA' is either not in any table in the FROM list
or appears within a join specification and is outside the scope of the
join specification or appears in a HAVING clause and is not in the GROUP
BY list. If this is a CREATE or ALTER TABLE statement then 'USA' is not
a column in the target table.

It's a very odd error. Any ideas would be helpful.
Re: Newbie question on Prepare error [message #200883 is a reply to message #200875] Tue, 14 November 2006 21:58 Go to previous message
Eclipse UserFriend
Hi Kevin,
You could try:
SELECT *
FROM CUSTOMERS
where COUNTRY = 'USA'
Since
a.. Double quotation marks delimit special identifiers referred to in SQL-92
as delimited identifiers.
a.. Single quotation marks delimit character strings.
So you should use single quotation marks when you write the expression in
where clause.

Thanks
Mingxia
"Kevin Day" <kevind@edifecs.com> wrote in message
news:455A64A4.4000607@edifecs.com...
> Kevin Day wrote:
>> I'm just getting into BIRT and was going through the tutorial which by
>> the way is rather good in comparison to most computer tutorials.
>>
>> I ran into the following prepare error:
>>
>> Failed to prepare the following query......
>>
>> It's the base query stated in the "Building a Data Set" section.
>>
>> My question is actually regarding the following text in the tutorial :
>>
>> " If an error dialog appears, check the following:
>>
>> * Your Eclipse is installed in a directory without spaces.
>> * You have typed the SQL statement as shown above.
>> * You have not put a semi-colon at the end of your statement."
>>
>> In regards to the first statemenet, I'm confused by why they state this
>> as the install instructions even use as an example of "C:\Program Files"
>> as the directory to install into. So, given the fact that I installed in
>> "program files" could this possible the be the problem?
>>
>> The SQL is as basic as you can get and it's correct. I have no idea what
>> could be causing an error. Any suggestions?
>
> The problem actually seems to be with SQL itself. The prepare has an issue
> with the following
> SELECT *
> FROM CUSTOMERS
> where COUNTRY = "100"
>
> I get the following error
>
> A BIRT exception occurred.
> Plug-in Provider:Eclipse.org
> Plug-in Name:BIRT Data Engine
> Plug-in ID:org.eclipse.birt.data
> Version:2.1.1.v20060922-1058
> Error Code:odaconsumer.CannotPrepareStatement
> Error Message:Failed to prepare the following query for the data set
> type org.eclipse.birt.report.data.oda.jdbc.JdbcSelectDataSet.
> [SELECT *
> FROM CUSTOMERS
> where COUNTRY = "USA"]
> Error preparing SQL statement.
> SQL error #1: Column 'USA' is either not in any table in the FROM list or
> appears within a join specification and is outside the scope of the join
> specification or appears in a HAVING clause and is not in the GROUP BY
> list. If this is a CREATE or ALTER TABLE statement then 'USA' is not a
> column in the target table.
>
> It's a very odd error. Any ideas would be helpful.
Previous Topic:how do I add a chart to a report Programmatically(I am getting errors)
Next Topic:Oracle Stored Procedure that return Parameters of type TABLE in BIRT2.1
Goto Forum:
  


Current Time: Sat Jun 07 07:22:18 EDT 2025

Powered by FUDForum. Page generated in 0.23206 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top