แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Cyber O haiyo

หน้า: [1]
1
SELECT *
FROM table_a
WHERE (charge & code not in(select charge & code from Table_b));

ลองดูครับได้ไหมแบบที่อาจารย์ TTT ว่าไว้ผมเพิ่มเติมนิดหน่อย
ตัวอย่างด้านล่าง
โพสต์นี้ได้รับคำขอบคุณจาก: Cyber O haiyo

2
คิดว่าที่คุณเขียนไว้ตั้งแต่แรกก็ใช้ได้แล้วมั้งครับ แต่ให้ต่อฟิลด์ลงไปเพิ่ม ประมาณนี้

select * from table_a
where charge & code not in(select charge & code from Table_b)

ไม่รู้ว่าเข้าใจความต้องการของคุณถูกไม๊นะครับ

ปล. การใช้ซับคิวรี่ หากข้อมูลมีจำนวนมากๆ จะทำให้คำนวณได้ช้า
โพสต์นี้ได้รับคำขอบคุณจาก: Cyber O haiyo

3
โค๊ด: [Select]
SELECT table_a.Charge, table_a.Code
FROM table_a INNER JOIN table_b ON table_a.Charge = table_b.Charge
WHERE (((table_b.Code)<>[table_a].[Code]));
โพสต์นี้ได้รับคำขอบคุณจาก: Cyber O haiyo

หน้า: [1]