I am using a Ultralite database file in SQL Anywhre to operate on. Getting the following error.

***Could not execute statement.
[UltraLite Database] Syntax error near 'Could'  [SQL Offset: 1099]
SQLCODE=-131, ODBC 3 State="42000"
Line 1, column 1***

The query:

SELECT COUNT() FROM RepPR                                                                         
JOIN RepPrPatient AS cust ON RepPR.PRGUID = cust.PRGUID                                                         
JOIN SFAFormDefinition AS sfd ON RepPR.FormDefKey = sfd.FormDefKey                                              
JOIN SfaTherapyType AS th ON sfd.TherapyTypeID = th.TherapyTypeID                                               
JOIN RepPrAccess AS pg ON RepPR.PRGUID = pg.PRGUID                                                                                                             
LEFT OUTER JOIN RepPrFacility AS fac ON RepPR.PRGUID = fac.PRGUID                                               
LEFT OUTER JOIN RepPrImpPhysician AS iphys ON RepPR.PRGUID = iphys.PRGUID                                       
LEFT OUTER JOIN RepPrDevice ON RepPR.PRGUID = RepPrDevice.PRGUID AND(RepPrDevice.DeviceTypeID = 100 OR RepPrDevice.DeviceTypeID = 104)                                                                                  
JOIN RepPrState AS st ON RepPR.PRStateID = st.PRStateID 
INNER JOIN ((SELECT prguid, LastName AS  RepFromLastName, FirstName AS  RepFromFirstName FROM RepPrAccess, SfaIrisUser WHERE 
rtrim(SfaIrisUser.RepSAPID) = rtrim(RepPrAccess.SAPID))
WHERE (RepPR.PRStateID <> 1) AND(pg.RepRoleID = 1) AND (PRRegionSAPID = 'UCP')

Upon searching I found few limitations for ultralite as it does not support Nested query. Is there any other way to test the query? Can I convert the .udb file to any other database file so that it gets me results to check.

asked 23 Jan '12, 08:26

Bose's gravatar image

accept rate: 0%

edited 23 Jan '12, 09:57

Calvin%20Allen's gravatar image

Calvin Allen


Is this the original query? I don't find any "Could" in it...

(23 Jan '12, 08:50) Volker Barth

You should be able to run the ULUNLOAD command line utility with the -s flag to generate a SQL file, create an empty SQL Anywhere Server database and read the SQL file with DBISQL. (Or you could use the Unload Database tool from the UltraLite plug-in in Sybase Central to get your SQL file). Then try your query on the SQL Anywhere Server database.

There are no other "conversion" utilities shipped with SA that could turn the UltraLite database into anything else.

permanent link

answered 23 Jan '12, 09:29

Paul's gravatar image

accept rate: 20%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 23 Jan '12, 08:26

question was seen: 4,267 times

last updated: 23 Jan '12, 09:57