Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: sql query issue

    Luis Cazares (4/26/2016)


    You might need to use a recursive CTE if you can nest more than one level.

    WITH postmeta AS(

    SELECT *

    FROM #postmeta

    ...

  • RE: sql query issue

    thanks everyone, but i cant amend the structure. this is a wordpress meta table and is a nightmare

  • RE: sql query issue

    ZZartin (4/26/2016)


    In your join you have this,

    pm_inv.meta_key='_invoice_no'

    In your case statement in the select you have this,

    pm_inv.meta_key = '_invoice_date'

    Won't those be mutually exclusive?

    yes. I know that bit is wrong.....

  • RE: sql query issue

    ok, yes I know it looks confusing, but I need to programmatically match the invoice no from post_id.

    e.g. Marco Ferandes, the post id is 2810, but if I search...

Viewing 4 posts - 1 through 4 (of 4 total)