ID's coming back as nulls are not appearing in my data set

Kuda 20 Reputation points
2024-06-19T13:29:32.62+00:00

I am trying to create a, intergrity check that bring back data after a record has been cancelled after a certain event. In my query. I am joining to a few tables and I can see all the old cancelled record. When I then cancel any new records, some IDs I am using for joining are returning nulls, and the record is not being picked in the new data set. I hope that made sense, Can someone help?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,106 questions
SQL Server Transact-SQL
SQL Server Transact-SQL
SQL Server: A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.Transact-SQL: A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
58 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,582 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Olaf Helper 42,561 Reputation points
    2024-06-19T17:17:33.9333333+00:00

    In my query. I am joining to a few tables

    A very theoretical query without any usefull information.

    We don't have your database to test anything.

    Please post table design as DDL, some sample data as DML statement and the expected result.

    0 comments No comments

  2. Bruce (SqlWork.com) 59,306 Reputation points
    2024-06-20T01:25:23.59+00:00

    Then I’d guess your joins are wrong.

    0 comments No comments