Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Is this query right

Author  Topic 

amitbadgi
Starting Member

29 Posts

Posted - 2005-08-02 : 14:57:25
hi guys i have written this query and attached it as a macro to an access form ,
SELECT DISTINCT [dbo_businessNC].[bus_id], [dbo_businessNC].[bus_name], [dbo_businessNC].[adrs1], [dbo_businessNC].[city], [dbo_businessNC].[state], [dbo_businessNC].[zip], [dbo_businessNC].[phone], [dbo_occhistoryNC].[license]
FROM dbo_businessNC, dbo_occhistoryNC
WHERE ([dbo_occhistoryNC].[bus_id]=[Forms].[Form1].[Text2]) And ([dbo_businessNC].[bus_name] Like "*" & [Forms].[Form1].[Text5] & "*") And ([dbo_businessNC].[adrs1] Like "*" & [Forms].[Form1].[Text8] & "*") And ([dbo_businessNC].[phone] Like "*" & [Forms].[Form1].[Text10] & "*") And ([dbo_businessNC].[zip] Like "*" & [Forms].[Form1].[Text15] & "*") AND (dbo_businessNC.bus_id=dbo_occhistoryNC.bus_id);

In teh access form when I enter the bus_id, its workign fine for most of the Ids, but doesnt show any result for a few Bus_Id which is available in both dbo_businessNC and dbo_occhistoryNC tables. I just wanted to make sure if teh query was right. Thankyou,

Kristen
Test

22859 Posts

Posted - 2005-08-02 : 15:16:03
You'd possibly do better to re-ask this in the Access Forum.

Cheers!

Kristen
Go to Top of Page
   

- Advertisement -