Recent

Author Topic: [SOLVED] Firebird SQL  (Read 1180 times)

Fahmy Rofiq

  • Jr. Member
  • **
  • Posts: 83
[SOLVED] Firebird SQL
« on: December 02, 2014, 06:58:42 am »
Hi everyone,
I have two tables

Table A:
A           B
---------------------
TES       KET PERTAMA
ISI        KET KEDUA

Table B:
A           B
---------------------
SATU    TES
DUA      ISI
TIGA     TES

What query to get result like this:
A           B
---------------------
SATU    KET PERTAMA
DUA      KET KEDUA
TIGA     KET PERTAMA

Thank you :)
« Last Edit: December 02, 2014, 09:05:07 am by Fahmy Rofiq »
Lazarus Trunk + FPC Fixes 32bit
Windows 10 x64

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Firebird SQL
« Reply #1 on: December 02, 2014, 08:13:12 am »
Code: [Select]
Select
  TableB.A, TAbleA.B
from
  TableA
Inner join TableB on TableA.A = TableB.B
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

Fahmy Rofiq

  • Jr. Member
  • **
  • Posts: 83
Re: Firebird SQL
« Reply #2 on: December 02, 2014, 09:04:48 am »
Great, thank you taazz :)
Lazarus Trunk + FPC Fixes 32bit
Windows 10 x64

 

TinyPortal © 2005-2018