Hello, team
I understand that embedded SQL is not supported in the migration,.
What would be the best practice to rewrite multiple embedded sqls in PS, which look like this:
//---------------------------------
select field1, field2 into :ls_param1, :ls_param2 from table1 where field3 = :ls_param3;
//------------------------------
Thank you
//-------------------------------------
SELECT isnull("t000_hotel_parameters5"."c_short_date_format" , :ls_def)
INTO :this.short_date_format
FROM "t000_hotel_parameters5" ;
//---------------------------------
And this is the conversion result:
//---------------------------------------------
var sql1 = @"SELECT isnull('t000_hotel_parameters5'.'c_short_date_format', @ls_def)
FROM ""t000_hotel_parameters5"" ";
short_date_format = (i_trn.SqlExecutor.Scalar<object>(sql1, ls_def)).ToString();
//----------------------------------------------
Is this correct?
Yes, this is the resulting translation. If you test it out on SnapDevelop you can see that the result is basically the same as of PB embedded SQL.
PowerScript Migrator basically supports all 4 types of embedded SQL. So this example of yours shouldn't be a problem for the tool.
I hope this helps.
Regards,