• Eureka !!

    I found it myself.

    If there is data in the table then the 'right' script will appear.

    If there is no data in the table then the 'wrong' script be generated.

    Thanks for looking with me.