472,791 Members | 2,165 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,791 software developers and data experts.

Can a pass-through query to create a table?

Hello
I need to get data from 4 Oracle tables and combine them into a
temporary table in my application. I get data using a pass-through
query dynamically created in code:
mySQL = "SELECT SID_SCREENING_TASKS_QUESTIONS.TASK_ID,
mySQL = mySQL & "SID_SCREENING_TASKS_QUESTIONS.ID,
mySQL = mySQL & "SID_SCREENING_QUESTIONS.TITLE, "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT.Points "
mySQL = mySQL & "from SID_SCREENING_TASKS_QUESTIONS,
SID_SCREENING_QUESTIONS, "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT "
mySQL = mySQL & "WHERE
SID_SCREENING_TASKS_QUESTIONS.ID=SID_SCREENING_QUE STIONS.ID and "
mySQL = mySQL & "SID_SCREENING_TASKS_QUESTIONS.ID=SID_SCREENING_QU ESTION_STUDENT.ID(+)
and SID_SCREENING_QUESTIONS.DELETED IS NULL AND "
mySQL = mySQL & "(SID_SCREENING_QUESTION_STUDENT.STUDENT_CODE IS NULL
OR "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT.STUDENT_CODE=" &
Me![txtStuCode] & ");"
If IsLive = True Then
Set myQuery = "qryScreening_live"
Else
Set myQuery = "qryScreening_test"
End If
myQuery.SQL = mySQL
Set myRSet = myQuery.OpenRecordset
When I have this recordset, I'll copy the data into a predefined table
looping through the recordset.
A question: can I create the above query so that it creates a table
with the data returned?
Thank you.
Galina
Nov 13 '05 #1
2 10537
Save the pass-through query, then create a MakeTable query based on the
saved pass-through query.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Galina" <ga****@mail.ru> wrote in message
news:ec*************************@posting.google.co m...
Hello
I need to get data from 4 Oracle tables and combine them into a
temporary table in my application. I get data using a pass-through
query dynamically created in code:
mySQL = "SELECT SID_SCREENING_TASKS_QUESTIONS.TASK_ID,
mySQL = mySQL & "SID_SCREENING_TASKS_QUESTIONS.ID,
mySQL = mySQL & "SID_SCREENING_QUESTIONS.TITLE, "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT.Points "
mySQL = mySQL & "from SID_SCREENING_TASKS_QUESTIONS,
SID_SCREENING_QUESTIONS, "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT "
mySQL = mySQL & "WHERE
SID_SCREENING_TASKS_QUESTIONS.ID=SID_SCREENING_QUE STIONS.ID and "
mySQL = mySQL & "SID_SCREENING_TASKS_QUESTIONS.ID=SID_SCREENING_QU ESTION_STUDENT.ID(+) and SID_SCREENING_QUESTIONS.DELETED IS NULL AND "
mySQL = mySQL & "(SID_SCREENING_QUESTION_STUDENT.STUDENT_CODE IS NULL
OR "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT.STUDENT_CODE=" &
Me![txtStuCode] & ");"
If IsLive = True Then
Set myQuery = "qryScreening_live"
Else
Set myQuery = "qryScreening_test"
End If
myQuery.SQL = mySQL
Set myRSet = myQuery.OpenRecordset
When I have this recordset, I'll copy the data into a predefined table
looping through the recordset.
A question: can I create the above query so that it creates a table
with the data returned?
Thank you.
Galina

Nov 13 '05 #2
Interesting... Thank you.
Galina

"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message news:<zP**********************@twister01.bloor.is. net.cable.rogers.com>...
Save the pass-through query, then create a MakeTable query based on the
saved pass-through query.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Galina" <ga****@mail.ru> wrote in message
news:ec*************************@posting.google.co m...
Hello
I need to get data from 4 Oracle tables and combine them into a
temporary table in my application. I get data using a pass-through
query dynamically created in code:
mySQL = "SELECT SID_SCREENING_TASKS_QUESTIONS.TASK_ID,
mySQL = mySQL & "SID_SCREENING_TASKS_QUESTIONS.ID,
mySQL = mySQL & "SID_SCREENING_QUESTIONS.TITLE, "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT.Points "
mySQL = mySQL & "from SID_SCREENING_TASKS_QUESTIONS,
SID_SCREENING_QUESTIONS, "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT "
mySQL = mySQL & "WHERE
SID_SCREENING_TASKS_QUESTIONS.ID=SID_SCREENING_QUE STIONS.ID and "
mySQL = mySQL &

"SID_SCREENING_TASKS_QUESTIONS.ID=SID_SCREENING_QU ESTION_STUDENT.ID(+)
and SID_SCREENING_QUESTIONS.DELETED IS NULL AND "
mySQL = mySQL & "(SID_SCREENING_QUESTION_STUDENT.STUDENT_CODE IS NULL
OR "
mySQL = mySQL & "SID_SCREENING_QUESTION_STUDENT.STUDENT_CODE=" &
Me![txtStuCode] & ");"
If IsLive = True Then
Set myQuery = "qryScreening_live"
Else
Set myQuery = "qryScreening_test"
End If
myQuery.SQL = mySQL
Set myRSet = myQuery.OpenRecordset
When I have this recordset, I'll copy the data into a predefined table
looping through the recordset.
A question: can I create the above query so that it creates a table
with the data returned?
Thank you.
Galina

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Seeker | last post by:
Newbie question here... I have a form with some radio buttons. To verify that at least one of the buttons was chosen I use the following code ("f" is my form object) : var btnChosen; for...
110
by: Mr A | last post by:
Hi! I've been thinking about passing parameteras using references instead of pointers in order to emphasize that the parameter must be an object. Exemple: void func(Objec& object); //object...
0
by: uli2003wien | last post by:
Dear group, PASS (SQL-Server user group) is about to start founding a branch in Vienna. I went to SQLCON and met some guys from the German PASS group and decided to become a member of PASS,...
9
by: Jay Douglas | last post by:
Hello, I am needing to pass a class object (this) by reference to a method in a different class. When I do the following code I get the error (Cannot pass '<this>' as a ref or out argument because...
4
by: z_learning_tester | last post by:
I'm reading the MS press C# book and there seems to be a contradiction. Please tell me which one is correct, 1 or 2. Thanks! Jeff 1. First it gives the code below saying that it prints 0 then...
14
by: Abhi | last post by:
I wrote a function foo(int arr) and its prototype is declared as foo(int arr); I modify the values of the array in the function and the values are getting modified in the main array which is...
4
by: kinaxx | last post by:
Hello, now I'm learning progamming language in university. but i have some question. in textbook. says there are four passing Mechanism 1) pass by value (inother words : call by value) 2)...
6
by: lisp9000 | last post by:
I've read that C allows two ways to pass information between functions: o Pass by Value o Pass by Reference I was talking to some C programmers and they told me there is no such thing as...
15
by: ramif | last post by:
Does call by reference principle apply to pointers?? Is there a way to pass pointers (by reference) to functions? Here is my code: #include <stdio.h> #include <stdlib.h>
12
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms....
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.