google-code-export / oragoods

Automatically exported from code.google.com/p/oragoods
1 stars 0 forks source link

<= not working #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.create the datasource
insert into gdatasources values ('ps_asp_qual','select has_school, has_major, 
has_degree, has_grad_dt, has_gpa, has_email, has_home_address, has_fully_qual, 
yyyymmdd from asp_qual_snapshot');
2.extract select info
begin
  gdatasource.g_debug := true;
  gdatasource.get_json('ps_asp_qual', 'select has_school where yyyymmdd <= ''20100805''');
end;
/
What is the expected output? What do you see instead?
WHSP> begin
  2    gdatasource.g_debug := true;
  3    gdatasource.get_json('ps_asp_qual', 'select has_school where yyyymmdd <= ''20100805''');
  4  end;
  5  /
google.visualization.Query.setResponse(
{
version: "0.7",
status: "error",
reqId: 0,
errors: [
{reason: "-20006", message: "ORA-20006: Parsing error: unexpected character in
where clause: ="}
]
}
)

What version of the product are you using? On what operating system?
April 2010 download
Red Hat Enterprise Linux AS release 3 (Taroon Update 5) 

Please provide any additional information below.
I have been using the work around < xxx or = xxx. This is not bad just thought 
perhaps I may not be using the <= correctly or it is not supported.

Original issue reported on code.google.com by mrosse...@experience.com on 5 Aug 2010 at 9:05

GoogleCodeExporter commented 9 years ago
Thanks for the report! I've updated SVN with the fix. The problem was that 
one-letter operators (like >) was being evaluated before two-letter operators 
(like >=). Since it matched the first time, the two-letter operator was never 
evaluated and hence the error. I've upload a zip file soon.

A side note: if you want to compare dates (which I guess the yyyymmdd column 
type should be) you can use one of the Google Query Language operators to 
create a date or datetime type: date, datetime, timeofday, timestamp
  See http://code.google.com/apis/visualization/documentation/querylanguage.html#Literals

[CODE]
gdatasource.get_json('ps_asp_qual', 'select has_school where yyyymmdd <= date 
''20100805''');
[/CODE]

Regards,
Jose.

Original comment by jose.can...@gmail.com on 5 Aug 2010 at 9:47