Jump to content

Recommended Posts

Posted

kaadu mayya.. ippudu ee table lo vunna fields anni ela extract chestunnaru... each table ki different class or file code vuntada?

 

paina ekkado import or define chesi vuntaru kada  table name ni alaanee inko table ni kooda define cheyyu

igo mayaa ide, oka view table lo feilds add cheyadam concept... inthaku mundu esna rendu feilds ni ee view table lo include chesaru,,,

 

Table=JOBRESBOOKEDVIEW
{

    ViewSQL={
    
    select RES_ID BRJ_RES_ID, JOB_ID BRJ_JOB_ID, status
    FROM (
        select RES.RES_ID RES_ID, JOB.JOB_ID JOB_ID, 'C' status
        from RES, JOB
        where exists
            (
            select 1
            from BKG
            where bkg_res_Id=res_id
            and bkg_job_Id=job_id
            and bkg_status='P'
            and bkg_ghost in ('C','D')
            and bkg_end>#START
            and bkg_start< _ADDDAYS(#END, 1)
            )
        UNION
        select RES.RES_ID RES_ID, JOB.JOB_ID JOB_ID, 'G' status
        from RES, JOB
        where exists
            (
            select 1
            from BKG
            where bkg_res_Id=res_id
            and bkg_job_Id=job_id
            and bkg_status='P'
            and bkg_ghost in ('G')
            and bkg_end>#START
            and bkg_start< _ADDDAYS(#END, 1)
            )
        UNION
        select RES.RES_ID RES_ID, JOB.JOB_ID JOB_ID, 'C' status
        from RES, JOB
        where
            JOB_ID=REPL(AVAILJOBID)
            and (RES.RES_ZGHRTERMINDT>#START or RES.RES_ZGHRTERMINDT is null)
        UNION
        select RES.RES_ID RES_ID, JOB.JOB_ID JOB_ID, 'G' status
        from RES, JOB
        where
            JOB_ID=REPL(AVAILJOBID)
            and (RES.RES_ZGHRTERMINDT>#START or RES.RES_ZGHRTERMINDT is null)
        ) RJVIEW
    
    }

Posted

if project name is constant (always same)

 

FunctionField
    {
    FieldName = ConflictProj
    FieldDescription = Conflict Project Name
    Calc = {
            case when ConflictFlag = 'Y' then 'project name here'
            else ''
            end
            }    

    FieldType = ftString
    Flags=ReportsUse
    FieldExplanation ={Conflict Project Name}

 

}

 

 

or if project name is varies on condition

 

FunctionField
    {
    FieldName = ConflictProj
    FieldDescription = Conflict Project Name
    Calc = {
            case when ConflictFlag = 'Y' then JOB_DESCR
            else ''
            end
            }    

  From = TABLE_NAME

 Condition = {
        TABLE_NAME.primary_ID = foreignkeytable.foreignkey_id 

    }
    FieldType = ftString
    Flags=ReportsUse
    FieldExplanation ={Conflict Project Name}

 

}

Posted

if project name is constant (always same)

 

FunctionField
    {
    FieldName = ConflictProj
    FieldDescription = Conflict Project Name
    Calc = {
            case when ConflictFlag = 'Y' then 'project name here'
            else ''
            end
            }    

    FieldType = ftString
    Flags=ReportsUse
    FieldExplanation ={Conflict Project Name}

 

}

 

 

or if project name is varies on condition

 

FunctionField
    {
    FieldName = ConflictProj
    FieldDescription = Conflict Project Name
    Calc = {
            case when ConflictFlag = 'Y' then JOB_DESCR
            else ''
            end
            }    

  From = TABLE_NAME

 Condition = {
        TABLE_NAME.primary_ID = foreignkeytable.foreignkey_id 

    }
    FieldType = ftString
    Flags=ReportsUse
    FieldExplanation ={Conflict Project Name}

 

}

thanks mayya same nenu ade rasna ochindi... ipudu inko kotha condition ochindi.. naaku kncham clarity ragane question post chesta

Posted

mayya same conflict ki if i have to extract multiple projects ante ela???

×
×
  • Create New...