Advertisement
ma39isy

Untitled

Jul 24th, 2024
329
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. SELECT
  2.     FT.*,
  3.     (
  4.     SELECT
  5.         LECTURERCODE
  6.     FROM
  7.         FINALTASKADVISOR
  8.     WHERE
  9.         FINALTASKID = FT.FINALTASKID
  10.         AND ADVISORSTATUS = '1' ) AS LECTURER_CODE_1,
  11.     (
  12.     SELECT
  13.         LOOK_LECTURERNAME(LECTURERCODE)
  14.     FROM
  15.         FINALTASKADVISOR
  16.     WHERE
  17.         FINALTASKID = FT.FINALTASKID
  18.         AND ADVISORSTATUS = '1' ) AS LECTURER_NAME_1,
  19.     (
  20.     SELECT
  21.         LECTURERCODE
  22.     FROM
  23.         FINALTASKADVISOR
  24.     WHERE
  25.         FINALTASKID = FT.FINALTASKID
  26.         AND ADVISORSTATUS = '2' ) AS LECTURER_CODE_2,
  27.     (
  28.     SELECT
  29.         LOOK_LECTURERNAME(LECTURERCODE)
  30.     FROM
  31.         FINALTASKADVISOR
  32.     WHERE
  33.         FINALTASKID = FT.FINALTASKID
  34.         AND ADVISORSTATUS = '2' ) AS LECTURER_NAME_2
  35. FROM
  36.     FINALTASK FT
  37. WHERE
  38.     FT.STUDENTID = '3301214001'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement