select to dataset

P

patryk78

hello

i have a database in MS SQL from my friend and i cant modify structure of
this database, and there is a little problem :

i have one table ARTICLES where are columns : id_article, name and others
second table is CONTRACTOR with id_contractor, name,

and contractor may have many prices of one article, these prices are in many
tables (individual_price, group_price and other)
but i found function getprice(id_article,id_contractor) who return dominant
price of article

and now i want to get all articles from ARTICLES table with prices using
getprice function

maybe there is a solution using one select or select all articles to
dataset, then make two new columns in dataset and get prices using
id_article for each row in dataset

Please Help

Regards

Patrick
 
S

Scott Allen

Patrick:

Using a function that queries the database for every record in a data
set is really expensive.

I'm sure there is a way to do this with a SQL query, but it is
impossible to guess what it would look like withouut knowing more
about the tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top