473,395 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

select to dataset

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
Nov 19 '05 #1
1 936
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.

--
Scott
http://www.OdeToCode.com/blogs/scott/

On Tue, 7 Dec 2004 09:17:58 +0100, "patryk78" <ve*****@poczta.onet.pl>
wrote:
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


Nov 19 '05 #2

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

Similar topics

0
by: JJ | last post by:
Hi I basically create a dataset and read in a schema file into the dataset. Then when done saving a record to the dataset I save to file as diffgram. When I come back in and recreate the dataset I...
2
by: soulcode | last post by:
Hi Guys, Yesterday i was playing around with some code where I would read an xml file into a dataset... '*********************************** Dim ds as dataset ds.readxml("test.xml")...
1
by: Diffident | last post by:
Hello All, I am trying to filter rows in a datatable based on filtercriteria and sortcriteria using the datatable.select() method. I am encountering a strange behavior in this process. Here is...
7
by: Matt Jensen | last post by:
Howdy Fairly simple question I think, I presume the answer is no it can't be reused for 2 *SELECT* statements, but just hoping for clarification. Just asking in the interests of trying to minimise...
11
by: MurdockSE | last post by:
Greetings. My Situation: // I have an .xml file that I am reading into a dataset in the following code - DataSet ds = new DataSet("MyDataset"); ds.ReadXml(@"c:\data\"+cmyxmlfilename);
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.