Hi, I'm wondering if anyone can help me develop the right sql query. I'm trying to select a "customerNumber" in table 1, but only if it doesn't exist in table2. I tried this [CODE]Select Table1.customerNumber From Table1, table2 Where table1.customerNumber NOT IN (select table2.customerNumber from table2) [/CODE] It isn't right because it displays customerNumber that exist in table2. Can someone please help me? Thanks

Member Avatar
Member Avatar
+0 forum 2

In my database I have a datediscontinued. When someone runs a a report they select a start date (FORM.StartDate) and an end date (FORM.EndDate). I need to find the records where date discontinued is between the start and end date. If the start date is NEQ to the end date I need to find if there is another entry with a discontinued date and if not then output the entries that have a NULL endate. I have tried a bunch of different ways. But I can't seem to wrap my head around the right logic/ and syntax to follow. what …

Member Avatar
Member Avatar
+0 forum 6

guys, can anyone help me on this problem? i have two tables then what I want is that, when an identical item is found in table2, it will not be displayed. Example: [CODE] Table1 Table2 item1 other1 item2 other2 item3 item2 item4 item3 [/CODE] Condition: if we use this query: [ICODE]select * from Table1[/ICODE] the items from Table1 will appear but if the items of Table1 exists in Table2 then i must not be displayed. how can i do that? thanks

Member Avatar
Member Avatar
+0 forum 2

The End.