BusinessObjects Board

How to write multiline query thru script object using sql

I have an update query, which is big and want to put in multi line,

How should i handle putting the whole query in multi line, in Visual basic i use & _ on every line end so that they concatenate well at the time of execution, here in DS, what characters should i put is it two pipe symbols enclosed within a single quote’s?. Thanks a lot for thelpful info.

SQL(‘DS_EDW’,'UPDATE DMCH_JOB_DELTA SET STATUS=‘Completed’,STARTDATETIME = to_date({$G_Startdate},‘YYYY.MM.DD HH24:MI:SS’), ENDDATETIME=to_date

({$G_Enddate},‘YYYY.MM.DD HH24:MI:SS’)’);

print(‘Update success:’);


reddymade (BOB member since 2012-02-12)

Create the SQL parameter as a variable:

$LV_SQL = 'UPDATE DMCH_JOB_DELTA ';
$LV_SQL = $LV_SQL || 'SET STATUS=‘Completed’, ';
$LV_SQL = $LV_SQL || 'STARTDATETIME = to_date({$G_Startdate},‘YYYY.MM.DD HH24:MI:SS’), ';
$LV_SQL = $LV_SQL || ‘ENDDATETIME=to_date({$G_Enddate},‘YYYY.MM.DD HH24:MI:SS’)’;

SQL(‘DS_EDW’, $LV_SQL);


eganjp :us: (BOB member since 2007-09-12)

Thanks so much. This worked great for me.

-NifflerX


NifflerX (BOB member since 2009-08-09)