Which function I want use for this query

  • I have two tables

    1) combinationtitles

    2) orders table

    combinationTitles orderstable

    combid Titleid ordersid title combinationid

    101 1 90 1 null

    101 3 90 4 null

    101 4 89 3 null

    102 5 67 5 null

    102 10 47 2 null

    103 2 34 4 null

    103 4 57 10 null

    103 7 23 2 null

    in the orders table combinationid column is null now .

    take first combination containg (1,3,4) titles from combinationtable to compare must and should all titles are presnt in orders table means where these titles are there that particular row of combinationid columns values is combid like 101.if in a combinationid contain (1,3,4) but single title is not there means we canot update the combinationid column in orders table.

    or how compare 101 combiantion all titles are there in orders table .

    the out put i want is compare to above tables

    orderstable

    orderid Title combinationid

    90 1 101

    90 4 101

    89 3 101

    67 5 102

    47 2 null

    34 4 null

    57 10 102

    23 2 null

    how to write a query please help me.

    regards

    venkat

  • Sincere apologies, but I can't understand the question or the requirements. A little clarification maybe? Possibly some table structures and maybe some of the code that you've tried so far?

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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