B4J Question RDC very long command Line

Discussion in 'B4J Questions' started by alienhunter, Feb 21, 2015.

  1. alienhunter

    alienhunter Active Member Licensed User

    hi ,
    is there a way that i would be able to make this command more "friendly"

    Code:
    sql.select_month123=SELECT EXTRACT(YEAR FROM date) AS yr,SUM(CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q1,SUM(CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q2,SUM(CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q3 FROM transactions GROUP BY EXTRACT(YEAR FROM date);
    this is only for 3 months and i have to do this for 12 ... i am out of screen's(2) width :)

    example :

    Code:
    sql.select_month123=SELECT EXTRACT(YEAR FROM date) AS yr,SUM(CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q1, & _
    ,SUM(
    CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q1, &_
    ,SUM(
    CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q1, &_
    ,SUM(
    CASE WHEN EXTRACT(MONTH FROM date) IN (?)THEN pointsreq ENDAS Q1, &_
    .... ...

    thanks
     
    Last edited: Feb 22, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    alienhunter likes this.
  3. alienhunter

    alienhunter Active Member Licensed User

    Thank you
    it worked

    works1.jpg works2.jpg works3.jpg
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice