troubleshooting Question

Selecting Distinct Value

Avatar of directxBOB
directxBOBFlag for Ireland asked on
4 Comments2 Solutions224 ViewsLast Modified:
I have this SQL Statement:

select distinct r.route as [Name],j.route as Route, as Run,'NULL' AS Parent,(cast(j.route as varchar(64)) + cast( as varchar(64))) as [UID],'Routes' as [Type]

from jobs as j,[route] as r
where = '12/08/2008' and j.van = 1 and = j.route

Essentially what I am trying to do is extract the Distinct Route, but present the data in the form:

Name, Route, Run, Parent, UID, Type

But somewhere along the line my SQL has gotten a bit mistaken and I've been staring at my statements too long to even spot a solution.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros