By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,739 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,739 IT Pros & Developers. It's quick & easy.

How do I query a dataset and return a new table

P: n/a
HB
I have an application that is requiring me to pull 4 tables into a dataset
then perfom the final query to display on the page
Dim objODBCAdapter As New Data.Odbc.OdbcDataAdapter("SELECT
WBS_CMF_NO, WBS_KEY, WBS_DESCRIP FROM CT07WBS;", conn)
objODBCAdapter.Fill(DS, "wbstemp")

How do I excecute the query below against the wbstemp table I just created?

objODBCAdapter.SelectCommand.CommandText = "SELECT
Left([wbs_cmf_no],4) AS Acct, Right([wbs_cmf_no],3) AS Sub, WBS_CMF_NO,
WBS_KEY, WBS_DESCRIP FROM CT07WBS;"
objODBCAdapter.Fill(DS, "wbs")

Due to limitations I cannot use left and right in the original (first)
statement
Thanks for the help
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
have a look if RowFilter can help you at least filter out from each of the
4 tables

http://msdn.microsoft.com/library/de...ilterTopic.asp

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director

"HB" <po**@group.com> wrote in message
news:Ov**************@tk2msftngp13.phx.gbl...
I have an application that is requiring me to pull 4 tables into a dataset
then perfom the final query to display on the page
Dim objODBCAdapter As New Data.Odbc.OdbcDataAdapter("SELECT
WBS_CMF_NO, WBS_KEY, WBS_DESCRIP FROM CT07WBS;", conn)
objODBCAdapter.Fill(DS, "wbstemp")

How do I excecute the query below against the wbstemp table I just
created?

objODBCAdapter.SelectCommand.CommandText = "SELECT
Left([wbs_cmf_no],4) AS Acct, Right([wbs_cmf_no],3) AS Sub, WBS_CMF_NO,
WBS_KEY, WBS_DESCRIP FROM CT07WBS;"
objODBCAdapter.Fill(DS, "wbs")

Due to limitations I cannot use left and right in the original (first)
statement
Thanks for the help

Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.