Hi there,

I am a complete SQL novice, but need to create an application in C++ that accesses a 
SAPDB database.  I have several references that include SQL statements, but I find 
that not all of the syntax is supported.  Is there any documentation available which 
tells me what is supported with SAPDB and how
to use it?

For example, I am converting from an Access database to a SAPDB database.  In the 
Access db, there was the following Query:

SELECT DISTINCTROW CompanyMaster.sCompanyID, CompanyMaster.sCompanyName, 
SubsystemMaster.sSubsystemID, SubsystemMaster.sSubsystemName
FROM (Permissions INNER JOIN CompanyMaster ON Permissions.sCompanyID = 
CompanyMaster.sCompanyID) INNER JOIN SubsystemMaster ON Permissions.sSubsystemID = 
SubsystemMaster.sSubsystemID
WHERE sUserID=[Enter the User Identity code]
ORDER BY CompanyMaster.sCompanyID, SubsystemMaster.sSubsystemID;

In converting, I have already found that DISTINCTROW doesn't exist, and that INNER 
JOIN doesn't exist, and if I try to use the WHERE statement as shown, it responds that 
it cannot find the column named whatever you respond to the "Enter the User Identity 
code" question with.  But if I enter the code
'CDD' instead of the question then I get the desired result.

So far I have managed to get this to work, apart from the prompt for the User Sequence

SELECT DISTINCT dba."CompanyMaster"."sCompanyID", dba."CompanyMaster"."sCompanyName", 
dba."SubsystemMaster"."sSubsystemID", dba."SubsystemMaster"."sSubsystemName"
FROM dba."Permissions", dba."CompanyMaster", dba."SubsystemMaster" 
WHERE  "sUserID" = [Enter the User Identity code]
AND dba."Permissions"."sCompanyID" = dba."CompanyMaster"."sCompanyID"
AND dba."Permissions"."sSubsystemID" = dba."SubsystemMaster"."sSubsystemID"
ORDER BY dba."CompanyMaster"."sCompanyID", dba."SubsystemMaster"."sSubsystemID"

Any help appreciated,
Kind Regards,
Jack Boers
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to