Google Answers Logo
View Question
 
Q: ODBC Call fials from Access 2003 to PSQL8 ( No Answer,   0 Comments )
Question  
Subject: ODBC Call fials from Access 2003 to PSQL8
Category: Computers > Programming
Asked by: oeg-ga
List Price: $25.00
Posted: 20 Jul 2005 10:12 PDT
Expires: 19 Aug 2005 10:12 PDT
Question ID: 545836
From Microsoft Access 2003 we runn a query against a Prevasive SQL 8
data base.  When the between statement is pre populated it works fine.
 When the between statement is populate via user input it fails.  Here
are the two statements.  Can anyone give me a solution.


This one works.

SELECT JC_JOB_MASTER.Job_Number, JC_JOB_MASTER.Division,
JC_JOB_MASTER.Job_Description, JC_TRANSACTION_HISTORY.Phase_Code,
JC_TRANSACTION_HISTORY.Cost_Type,
JC_TRANSACTION_HISTORY.Tran_Type_Code,
JC_TRANSACTION_HISTORY.Tran_Date_Text,
JC_TRANSACTION_HISTORY.Employee_Code,
JC_TRANSACTION_HISTORY.Vendor_Code,
JC_TRANSACTION_HISTORY.Total_Hours, JC_JOB_MASTER.Superintendent,
JC_JOB_MASTER.Estimator, JC_JOB_MASTER.Job_Type,
JC_JOB_MASTER.Project_Manager, Mid([Tran_Date_Text],5,2) AS [Month]
FROM JC_JOB_MASTER INNER JOIN JC_TRANSACTION_HISTORY ON
JC_JOB_MASTER.Job_Number = JC_TRANSACTION_HISTORY.Job_Number
WHERE (((JC_JOB_MASTER.Division)="01") AND
((JC_TRANSACTION_HISTORY.Tran_Date_Text) Between "20050501" And
"20050530") AND ((JC_JOB_MASTER.Job_Type)="AMBE" Or
(JC_JOB_MASTER.Job_Type)="APAR" Or (JC_JOB_MASTER.Job_Type)="CELL" Or
(JC_JOB_MASTER.Job_Type)="COMM" Or (JC_JOB_MASTER.Job_Type)="DOWN" Or
(JC_JOB_MASTER.Job_Type)="HOTE" Or (JC_JOB_MASTER.Job_Type)="LIGH" Or
(JC_JOB_MASTER.Job_Type)="RESI" Or (JC_JOB_MASTER.Job_Type)="RICH" Or
(JC_JOB_MASTER.Job_Type)="VANC" Or (JC_JOB_MASTER.Job_Type)="1AMBE" Or
(JC_JOB_MASTER.Job_Type)="1APAR" Or (JC_JOB_MASTER.Job_Type)="1COMM"
Or (JC_JOB_MASTER.Job_Type)="1CELL" Or (JC_JOB_MASTER.Job_Type)="1
DOWN" Or (JC_JOB_MASTER.Job_Type)="1HOTE" Or
(JC_JOB_MASTER.Job_Type)="1LIGH" Or (JC_JOB_MASTER.Job_Type)="1RESI"
Or (JC_JOB_MASTER.Job_Type)="1RICH" Or
(JC_JOB_MASTER.Job_Type)="1VANC"));










This one does not-

SELECT JC_JOB_MASTER.Job_Number, JC_JOB_MASTER.Division,
JC_JOB_MASTER.Job_Description, JC_TRANSACTION_HISTORY.Phase_Code,
JC_TRANSACTION_HISTORY.Cost_Type,
JC_TRANSACTION_HISTORY.Tran_Type_Code,
JC_TRANSACTION_HISTORY.Tran_Date_Text,
JC_TRANSACTION_HISTORY.Employee_Code,
JC_TRANSACTION_HISTORY.Vendor_Code,
JC_TRANSACTION_HISTORY.Total_Hours, JC_JOB_MASTER.Superintendent,
JC_JOB_MASTER.Estimator, JC_JOB_MASTER.Job_Type,
JC_JOB_MASTER.Project_Manager, Mid([Tran_Date_Text],5,2) AS [Month]
FROM JC_JOB_MASTER INNER JOIN JC_TRANSACTION_HISTORY ON
JC_JOB_MASTER.Job_Number=JC_TRANSACTION_HISTORY.Job_Number
WHERE (((JC_JOB_MASTER.Division)="01") AND
((JC_TRANSACTION_HISTORY.Tran_Date_Text) Between [Type the beginning
date:] And [Type the ending date:]) AND
((JC_JOB_MASTER.Job_Type)="AMBE" Or (JC_JOB_MASTER.Job_Type)="APAR" Or
(JC_JOB_MASTER.Job_Type)="CELL" Or (JC_JOB_MASTER.Job_Type)="COMM" Or
(JC_JOB_MASTER.Job_Type)="DOWN" Or (JC_JOB_MASTER.Job_Type)="HOTE" Or
(JC_JOB_MASTER.Job_Type)="LIGH" Or (JC_JOB_MASTER.Job_Type)="RESI" Or
(JC_JOB_MASTER.Job_Type)="RICH" Or (JC_JOB_MASTER.Job_Type)="VANC" Or
(JC_JOB_MASTER.Job_Type)="1AMBE" Or (JC_JOB_MASTER.Job_Type)="1APAR"
Or (JC_JOB_MASTER.Job_Type)="1COMM" Or
(JC_JOB_MASTER.Job_Type)="1CELL" Or (JC_JOB_MASTER.Job_Type)="1 DOWN"
Or (JC_JOB_MASTER.Job_Type)="1HOTE" Or
(JC_JOB_MASTER.Job_Type)="1LIGH" Or (JC_JOB_MASTER.Job_Type)="1RESI"
Or (JC_JOB_MASTER.Job_Type)="1RICH" Or
(JC_JOB_MASTER.Job_Type)="1VANC"));
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy