Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

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 ASP Free Forums Sponsor:
  #1  
Old June 23rd, 2004, 05:51 PM
Sonicdynamite Sonicdynamite is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 19 Sonicdynamite User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 11 m 26 sec
Reputation Power: 0
Unhappy Select distinct with text datatype

Here is the code I'm trying to execute.

SELECT DISTINCT Projects.PID, Projects.P_Name, Projects.P_Overview, Projects.P_Due_Date, Projects.P_Start_Date, Projects.P_Complete_Date, Projects.P_LastMod_Date, Users_2.UID, Users_2.F_Name, Users_2.L_Name FROM Users INNER JOIN Projects_Team ON Users.UID = Projects_Team.PT_Users_FK RIGHT OUTER JOIN Projects ON Projects_Team.PT_Projects_FK = Projects.PID LEFT OUTER JOIN Users Users_2 ON Projects.P_LastMod_By_FK = Users_2.UID LEFT OUTER JOIN Users Users_1 ON Projects.P_Created_By_FK = Users_1.UID;

Obviously this query has multiple joins. The problem I'm having is that P_Overview is a text field, so obviously it won't work. The PID field is the primary key for this query, and I just want to eliminate duplicate PID records.

I saw in another thread, someone had suggested placing the text field in it's own table and referencing it using a foreign key. How would this be done? Wouldn't it still be pulled into the "select distinct" statement? Any help would be much appreciated. This is for an ASP 3.0 application.

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > Select distinct with text datatype


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 | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT