Concatonate numeric fields in a Where statement RRS feed

  • Question

  • Hi,

    I am wanting to concatenate four fields together from one table with four fields together from another table in a where statement within a subquery.

    How would I go about acheiving this

    At the moment in time my cutdown SQL looks like

        T1.ASSR_FEE as AssessorFee,
        T1.CAU_DT as Comment,
        (select Full_Desc from Sy_code_list t5 where t5.ID_Code = t4.ID_Code and t5.Level_2 = t4.Level_2 and t5.ID_Code = 5 and (t5.Level_3 = 0 or t5.Level_3 = -1)) AS MainDescription
        (((cl_details T1)
        LEFT OUTER JOIN [C:\Users\cjack\Desktop\Test Stuff\ecm_hol.mdb].tb_pers T2 on T1.pers_no = T2.ref_id)
        LEFT OUTER JOIN [C:\Users\cjack\Desktop\Test Stuff\ecm_hol.mdb].tb_pers T3 on T1.insp_id = T3.ref_id)
        LEFT OUTER JOIN cl_coding T4 on T1.cl_id = T4.cl_id

    So I am wanting to concatonate t5.id_code with t5_level1 etc


    • Edited by JaK82 Wednesday, May 16, 2018 2:01 PM
    Wednesday, May 16, 2018 1:59 PM

All replies

  • Hi,

    Not sure I follow but the symbol for concatenation is "&." Have you tried using it?

    If you can post some sample data (before and after), it might help us figure out what you mean.

    Hope it helps...

    Wednesday, May 16, 2018 2:45 PM
  • Hello Jak82,

    What do you mean "concatonate"? Could you please detail us for this?

    Best Regards,


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 17, 2018 5:42 AM