Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 3 of 3 total |
LIST and DISTINCT |
Fri, Sep 26 2008 3:18 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Is there a way of doing something like this
SELECT DISTINCT LIST(CAST(_fkCompanies AS VARCHAR)) _Restrict FROM Calls WHERE _fkProjects = 3 I want just the distinct _fkCompanies in the LIST eg the table might contain 1,2,4,2,1,6,7,8,1,2 etc and I want 1,2,4,6,7,8 Roy Lambert |
Fri, Sep 26 2008 5:51 PM | Permanent Link |
"Jan-Erik Johansen" | "Roy Lambert" wrote
> Is there a way of doing something like this > > SELECT DISTINCT LIST(CAST(_fkCompanies AS VARCHAR)) _Restrict FROM Calls > WHERE _fkProjects = 3 > > I want just the distinct _fkCompanies in the LIST eg the table might > contain 1,2,4,2,1,6,7,8,1,2 etc and I want 1,2,4,6,7,8 > You could solve this by using a derived table e.g. select list(cast(somefield as varchar(8))) from ( select distinct somefield from sometable where ..... order by somefield ) as somederivedname -- Jan-Erik |
Sat, Sep 27 2008 5:20 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jan-Erik
Neat - thanks Roy Lambert |
This web page was last updated on Tuesday, May 14, 2024 at 07:14 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |