Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Question - MS Access Qry -> VB ASP within Macromedia SQL Builde

Status
Not open for further replies.

CharlieMike73

Programmer
May 17, 2002
120
US
Syntax Question - MS Access Qry -> VB ASP within Macromedia SQL Builder.

Can someone please help me convert this following MS Access SQL Query into a Query to be used on a VB-Script ASP page.

Or at least direct me to some program/site/tutorials that will help me.

I am trying to create the web page in Macromedia Dreamweaver MX, but get an error if I try to past the SQL from Access into the SQL Select statement.

MS Access Code Below:
Code:
SELECT
   DBO_EMPLOYEE.LAST_NAME,
   DBO_EMPLOYEE.FIRST_NAME,
   Sum(DBO_WORK_REPORT_LABOR.REPORTED_HOURS)
     AS SumOfREPORTED_HOURS

FROM
   DBO_EMPLOYEE
     INNER JOIN (DBO_DAILY_WORK_REPORT INNER JOIN DBO_WORK_REPORT_LABOR
       ON DBO_DAILY_WORK_REPORT.DWR_SYS_ID = DBO_WORK_REPORT_LABOR.DWR_SYS_ID)
     ON DBO_EMPLOYEE.EMP_ID = DBO_WORK_REPORT_LABOR.EMP_ID

WHERE
   (((DBO_DAILY_WORK_REPORT.DWR_DATE)
     Between [Type Beginning Date:] And [Type Ending Date:])
   AND
   ((DBO_EMPLOYEE.UNIT_ID)>=5000
   And
   (DBO_EMPLOYEE.UNIT_ID)<6000))

GROUP BY
   DBO_EMPLOYEE.LAST_NAME,
   DBO_EMPLOYEE.FIRST_NAME,
   DBO_EMPLOYEE.EMP_ID
     HAVING
       (((Sum(DBO_WORK_REPORT_LABOR.REPORTED_HOURS))<40));

I think the problem I am having is with the inner join, if someone can pay particular attention to this and correct me if wrong I would appreciate it!

A simple straight forward select created in the SQL Builder (RecordSet Builder) works fine.

Thank you,
Charlie
 
hmmm inner join on an inner join.

I'd think that that would be a heckova thing to troubleshoot.

why not do the sql in access - make a query and let Access do the work?

&quot;Never underestimate the power of determination&quot;

Stuart
 
We want to get away from using assecc as the front end to the oracle database, and would like to put the query on the intranet web server where it can be ran from there.

If you can still help me I would appreciate your time and efforts.

Thank you!
 
I am really hesitant to try that without a bunch of trial and error.

If you are wanting to insert directly into an Oracle db, have you tried posting this question in the Oracle Forum?

If not - theres the ASP forum too. &quot;Never underestimate the power of determination&quot;

Stuart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top