Skip to content

Tag: sql-server

SQL Join query with a null in Main table

Hi guys so in simple terms I have a Main table “A” and then another table “B”. All the data I want is basically from table A, but to figure one part out I need to join with B. My problem is although the column im joining with a column in B is correct, sometimes the column in A will

Case on Join condition

I have a two tables data as below table1: Order orderitem value O1 B-IV122 10 O2 B-IV144 10 table2: order Productionorder productionitem …