Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: SELECT Query with the IN operator

    I think I finally have what I want. This query seems to work:

    SELECT j.jobid

    FROM Job j

    JOIN Image i

    ON i.jobid = j.jobid

    ...

  • RE: SELECT Query with the IN operator

    Maybe it would help for you to see what a couple of the columns in the tag table look like:

    TagCatID TagID

    227

    246

    247

    248

    249

    250

    356

    357

    358

    462

    463

    464

    465

    466

    467

    574

    575

    576

    577

    578

    668

    669

    670

    671

    672

    673

    751

    752

    753

    754

    755

    835

    882

    162

    164

    167

    168

    1623

    1625

    1626

    1629

    1632

    1633

    1634

    1636

    1728

    1730

    1731

    1737

    1738

    1739

    1740

    1741

    1742

    1783

    1986

    1987

    1990

    1991

    1992

    1993

    1994

    1995

    1996

    19101

    19105

    19109

    19111

    19113

    20117

    20118

    20119

    20120

    20123

    20124

    20129

    20130

    20131

    20133

    20138

    20140

    20142

    20147

  • RE: SELECT Query with the IN operator

    Ken, that looks close. I've added on line that you left out that joins the TagCat table.

    DECLARE @TagList TABLE

    (

    TagID int NOT NULL

    )

    INSERT INTO @TagList

    SELECT 35...

  • RE: SELECT Query with the IN operator

    I think this is very close to what I need, but is there anyway to make this one query instead of two?

  • RE: SELECT Query with the IN operator

    Alright, here's a query with some sample input and output that might clarify what I need to do:

    SELECT DISTINCT Job.JobID, JobTag.TagID, TagCat.TagCatID

    FROM Job, JobTag, Image, Tag, TagCat

    WHERE TagCat.TagCatID = Tag.TagCatID...

Viewing 5 posts - 1 through 5 (of 5 total)