Query Problem

  • Hi Guys,

    I am running a query against a table of employment details and there is a column called RoleID.

    For a certain person the RoleIds are 2,10,1316. That's simple enough.

    However, when put in a few inner joins and extra criteria, the RoleIds, still being selected from the employment table are showing as 2 and 13.

    Does any one have any ideas on this one?

    Surely it can't be the joins because the field from the actual table is showing the wrong roleids.

    Thanks

    Graeme

  • Assuming that the roles are supposed to be 2, 10, 13, 16...  Have you checked to ensure that the roles you are expecting are not being weeded out by the extra criteria and joins??



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Well,

    Like I said Person A has the following RoleIDs

    2

    10

    1316

    But having made the extra joins and using the appropriate criteria, the RoleIDs appear as

    2

    13

    I can't understand where the 13 is coming from. it appears totally unrelated.

    Graeme

  • I think you are getting truncated data.

    2 10 1316

    2      13

    The 10 has been dropped and so has the 16. Is there any code converting or reformatting the RoleID result?

    -SQLBill

  • That was my thought but....

    This query is being run directly in Query Analyser.

    If I select a set for a particular person, the results are correct, but if I run the query for all people I'm getting errors.

    I was just wondering whether this was a known bug??

    Thanks for your input

    Graeme

  • I have discovered the problem.

    A rather discrete duplication in one of the minor tables.

    Many Thanks for your input

    Regards

    Graeme

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

You must be logged in to reply to this topic. Login to reply