Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set relation to in SQL database
Message
From
11/12/2006 12:19:59
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/12/2006 11:38:10
Yh Yau
Ingenuity Microsystems Sdn Bhd
Kuala Lumpur, Malaysia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01176444
Message ID:
01176592
Views:
9
>Assuming in my report cursor (for eg sales data), I have codes for the following :-
>1) Salesman Code
>2) Product Code
>3) Customer Code
>4) Location Code
>5) Dept Code
>6) Month
>7) Sales Invoice Number
>8) Sales Invoice Amount
>
>In getting to my final cursor, assuming SQL is used, I would have to join the cursor with 5 master files. Assuming the sales records number a quarter of a million invoices, then joining 5 tables could take a long time....
>Haven't tried that yet but my customer's database contains 400k records just for product codes alone.
>
>Would this be faster using store procedures or query to VFP and index and set relation?
>Yau

Depends on what you need. If you're getting data for many invoices that'd almost cover all of your products and others then getting tables and set relation would be faster. OTOH if you're doing this for a subset of invoices then a UDF or SP would be faster. You know your data and what you need.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform