need help with access query/code

need help with access query/code

Post by mark » Sat, 06 Feb 1999 04:00:00



i created a crosstab query from a table, now i need to know if i can compare
row1 with row2 then row2 with row3 and so forth....
 
 
 

1. Need help Access queries ===> SQL queries

I am converting  the following Access queries to Oracle Sql queries. I
have no problems
converting  the tables and field names to Oracle standards. I have set
up the procedure
to accept the proper parameters input. For you oracle only people in the

where statements like this  (([Domtable].[Industry Code])=[Select Ind
Code])  the
field [Select Ind Code] on the right is a parameter passed to the
procedure.
My problem is How would I represent the following Access queries in Sql.

In access they are queries that essentially run other queries. So to run
the
whole thing in ACCESS I would run SELECTED_TYPE2 to get my results

 I am especially confused by query SELECTED_TYPE2B  which is joined with

another query SELECT_TYPE2
This access query

Thanks the queries in question are all listed below

Access query name: SELECTED_TYPE2
SELECT DISTINCTROW Selected_Type2a.* FROM Selected_Type2a
UNION
SELECT DISTINCTROW Selected_Type2b.* FROM Selected_Type2b;

Access query name: SELECTED_TYPE2A
SELECT DISTINCTROW [Level]+1 AS [Next Level], 0 AS [Split Set],
[Domtable].[Primary Key], [Domtable].[Industry Code],
[Domtable].[Primary Key] AS [Parent PK Selected]
FROM [Domtable]
WHERE ((([Domtable].[Primary Key])=(select[MinOfPrimary Key] from
Select_Type2))
AND (([Domtable].[Industry Code])=[Select Ind Code])
AND (([Domtable].Level)=[Select Level])
AND (([Domtable].[Split Set])=[Select Split Set])
AND (([Domtable].[Parent PK Selected])=[Select Parent PK]));

Access query name: SELECTED_TYPE2B
SELECT DISTINCTROW [Level]+1 AS [Next Level], 0 AS [Split Set],
[Domtable].[Primary Key], [Domtable].[Industry Code],
Select_Type2.[MinOfPrimary Key] AS [Parent PK Selected]
FROM Select_Type2, [Domtable] INNER JOIN [Initdata] ON
([Domtable].[Industry Code] = [Initdata].[Industry Code]) AND
([Domtable].[Primary Key] = [Initdata].[Primary Key])
WHERE ((([Domtable].[Industry Code])=[Select Ind Code]) AND
(([Domtable].Level)=[Select Level]) AND (([Domtable].[Split
Set])=[Select Split Set]) AND (([Domtable].[Parent PK Selected])=[Select
Parent PK]) AND (([Initdata].F2)="C"));

Access query name: SELECT_TYPE2
SELECT DISTINCTROW Min([Domtable].[Primary Key]) AS [MinOfPrimary Key]
FROM [Initdata] INNER JOIN [Domtable] ON ([Initdata].[Industry Code] =
[Domtable].[Industry Code]) AND ([Initdata].[Primary Key] =
[Domtable].[Primary Key])
WHERE ((([Domtable].[Industry Code])=[Select Ind Code])
AND (([Initdata].F2)=[Select F2])
AND (([Domtable].Level)=[Select Level])
AND (([Domtable].[Split Set])=[Select Split Set])
AND (([Domtable].[Parent PK Selected])=[Select Parent PK]));

2. dbopen(...) from ODS Gateway fails

3. Newbie needs help will performance suffer greatly querying by code

4. Error while accessing objects from Linked server

5. NEED HELP, Coding Access to Word Mail Merge :-)

6. I get the following messages when trying to create a new

7. Access using Coded to Query a Query

8. ASP + SQL + SQL capacity

9. Trying to access a query in MS access through ADODB code version 9.0

10. Pass-through queries - Access dev. needs help

11. I need help writing a Wildcard Query in Access 95

12. Help needed on Access pass-through query problem!

13. Pass-through queries - Access dev. needs help