Solved

Select Distinct from one table

Posted on 2003-12-01
2
290 Views
Last Modified: 2009-12-16
Hello,

This should be farily easy but I just can't seem to get it.  I am tracking 404 errors on a web site in a table and reidrecting the user if the URL they are trying to reach exists in another table.  What I want to do basically is create a view that looks at the column in the table with the error log that contains the URL that users have tried to reach and compare that to the column in the table that contains redirct urls.  If the url in the log table does not appear in the table of redirects, I want all of the columns of data from that record in the log table to appear in the view.  I don't know if I'm making any sense or not.  Any help is greatly appreciated.

Thanks,

David
0
Comment
Question by:beegled
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
BulZeyE earned 50 total points
ID: 9853539
So you are basically looking for something like:

SELECT *
  from tblLogError le
where not exists (select *
                           from tblURLRedirect ur
                          where ur.OrigUrl = le.ErrorUrl)

or

SELECT *
  from tblLogError le
where ErrorULR not in(select ur.OrigUrl
                           from tblURLRedirect ur)

?? is that what you want?  A little more info like table/column...??



0
 

Author Comment

by:beegled
ID: 9853735
That's exactly it!  Thanks so much.  I really appreciate it.

David
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question