Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not getting proper results.
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00178423
Message ID:
00178552
Views:
29
>Remember, this is the syntax going against a SQL-Server back-end. the MyDatabase.dbo tell sqlserver which database to put the work table into regardless of the current database that may be in use... the .dbo is to identify database owner (creator of the table). And from my syntax testing in the SQL window, the INTO clause MUST come after the field selection list.
>
>Again, the physical syntax is correct because if I execute this statement from within SQL-Enterprise ISQL Window, it works and give proper results, creates the table, etc. but not from VFP. The strange thing, I have issued even more complex queries with unions and sub-queries and they all have been created with no problem...
>
>
>>I do not understand what MyDataBase.dbo.temptable is. I don't think you really want to make the temporary cursor part of the database.
>>
>>Try:
>>
>>select a.*, b.* from a, b where ... into cursor tempcursor
>>
>>>I have a problem via SQL pass through. I am building a bunch of work tables on a SQL back-end via VFP, all if fine -- to a point. When I get to a certain point, I don't get the expected results I need.
>>>
>>>I am basically doing a join of two tables (SQL-Syntax)...
>>>
>>>select a.*, b.*
>>>   into mydatabase.dbo.temptable
>>>   from a, b
>>>   where a.id1 = b.id1
>>>     and a.id2 = b.id2
>>>
>>>
>>>If I issue this statement from within VFP, I dont get any records created in the result set, however, if I do this exact same command from within the SQL window, I get the correct 200,000 record set.
>>>
>>>I have even gone to the point of issuing a begin transaction/end transaction around this and still missing the boat. I even added a "checkpoint" to force all unwritten pages to be processed by SQL server but no luck...
>>>
>>>I am really stuck with this, any input???

Are a,b really your table names? If so I've run into some "anomalies" any time the SQL alias matches those old predefined area names (A-J).
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform