Eric: Thanks for your response. I actually got an answer to my question on another forum. Here was the response I received:
Jason,
ORDER BY is not permitted in CREATE VIEW.
Neither is COMPUTE, COMPUTE BY, INTO, or any references to temporary
tables.
You have to do the ordering in your SELECT.
Regards,
D. Patrick Hoerter
The forum is located at
www.devx.com___________________________________________________________________________
While I am at it, I have another question. I realize this wasn't what you replied to, but I thought I would give it a shot anyway.
First, I must tell you that I have spent the last 6 months building an application in FoxPro, only to have it scrapped and start from scratch in FoxPro. Needless to say, I am none to happy. Such is life, right! I have no clue what I am doing in SQL, so I need all the help I can get.
To give you some background, we are using SQL as a back end database and building then interface in Visual Interdev.
It took me forever to learn how to code/create paramterized views in FoxPro, and I need to so the same in SQL/Interdev.
Situation:
I have a parent form called JURISDICTION. Let's say, for aruguments sake it has three fields:
id
jurisname
juristype
Let's say we are on the following record:
id = 1
jurisname = Spain
juristype = Country
so far so good>
Now, I have a cmd button on the parent form that fires the child form (assignment form) called COUNTRY SUBORDINATE ASSIGNMENT.
The child form has only three fields:
subordinate id
juris_id && label is "country" Also, this is a combo box
jurisname && label is "state" Also, this is a combo box
OK>
What I want to have happen is when I fire the child form, have "Spain" automatically appear in the "juris_id" field of the subordinate, w/o have to type it or have to use a drop down menu to select it. That way, the only thing the data entry person has to do is select the state for the assignment in the third field.
Great
In FoxPro I do this by:
a. defining parameter in the init event of the form:
Example:
lparameter tcOfficeId
= seek (tcOfficeId, "offices","nofficeid")
= seek (tcOfficeId, "office_assignments",nofficeid")
set key to offices.nofficeid in office_assignment
b. in the default value of the assignment form, I would place the following code in the id field:
IIF USED ("offices"),offices.nofficeid, -1)
c. finally, the cmd button on the parent form would fire the child with the following code:
do form office_assignments with offices.nofficeid
Eric, I know this is a lot more than you bargained for, but do you have any idea how I can pass the parameter in SQL/Interdev, to accomplish the same thing?
TIA
Jason