PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Query Strings using Web Matrix
Forums
Newsgroups
Microsoft DotNet
Microsoft ADO .NET
Query Strings using Web Matrix
![]() |
Query Strings using Web Matrix |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi folks,
I have two tables in one database. One table has an automatic numbering primary key named ID and is named rfi. The other table has a field named rfinumber and is named discussion. Both ID and rfinumber have a datatype of number. Upon using the querybuilder with Web Matrix, I issue a select command to get all records from the discussion table that have a rfinumber field equal to the ID field in the rfi table. Problem is that I am getting the entire discussion table when I use the following query: "SELECT [discussion].* FROM [discussion], [rfi] WHERE ([discussion].[rfinumber] = [rfi].[ID])" For example DISCUSSION TABLE rfinumber 1 1 1 2 RFI TABLE rfi 1 2 Given the query, I should get a discussion table only listing the rfinumber = 1. Any clues? thanks, glenn |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Sorry folks. I answered my own question. I needed to create a function and
pass it a parameter. duh.. "glenn" wrote: > Hi folks, > > I have two tables in one database. > > One table has an automatic numbering primary key named ID and is named rfi. > > The other table has a field named rfinumber and is named discussion. > > Both ID and rfinumber have a datatype of number. > > Upon using the querybuilder with Web Matrix, I issue a select command to get > all records from the discussion table that have a rfinumber field equal to > the ID field in the rfi table. > > Problem is that I am getting the entire discussion table when I use the > following query: > > "SELECT [discussion].* FROM [discussion], [rfi] WHERE > ([discussion].[rfinumber] = [rfi].[ID])" > > For example > > DISCUSSION TABLE > rfinumber > 1 > 1 > 1 > 2 > > RFI TABLE > rfi > 1 > 2 > > Given the query, I should get a discussion table only listing the rfinumber > = 1. > > Any clues? > > thanks, > glenn |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

