MS SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMS SQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 28th, 2003, 09:57 AM
andy360 andy360 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 andy360 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Unhappy joining a view to match main data in search query

I am currently building a telephone directory, i'm at the stage where I have the search functions runing smoothly. Except

the way I have the database set up is that the main table holds the business type as a numeral which was entered from

another table with coresponding names.

I have built views to tie these two tables together.

Now once a person searchs the listings they currently recieve a page of results, it is here that the problem occurs.

I need to to in my sql statment tie the main table of data to the view to pull the business type name out instead of the

business type numeral which is contained within the main data table.

Here is my current Sql Statement:

SELECT *
FROM dbo.MAIN, dbo.VIEW_BUSINESS_NAME
WHERE ENTRY_TYPE LIKE 'varSearchType' AND LAST_NAME LIKE '%varName%' AND INITIAL LIKE '%varInitial%' AND STREET_NAME LIKE

'varStreet' AND STATE LIKE 'varState' AND REGION LIKE 'varRegion' AND BUSINESS_TYPE LIKE 'varBusinessType' AND

dbo.VIEW_BUSINESS_NAME.Expr1 = dbo.MAIN.BUSINESS_TYPE
ORDER BY LAST_NAME

It is being put together in dreamweaver mx.

This is returning a multiple list of the one business repeated for as many listings as there are for that business type!

Hope this makes sense it's very early in the morning.

Reply With Quote
  #2  
Old October 28th, 2003, 07:52 PM
andy360 andy360 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 4 andy360 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
All sorted!!!

Problem all sorted !!!
Cheers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMS SQL Development > joining a view to match main data in search query

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap