That would reduce the number of ROWS AFFECTED lines and improve performance at the same time. That is, if MS SQL can do it this way.
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
September 12, 2016, 12:36 PM
dhagen
If the message you are referring to is the rows affected, then use:
SET EMGSRV=OFF/ON
"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
September 12, 2016, 01:39 PM
MartinY
Wep5622 : unfurtunately I can't because I need to read the row's data (and then format...) from somewhere else to then insert it in table.
dhagen : it is working with your solution, thanks.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
September 13, 2016, 05:48 AM
Wep5622
MS SQL has a BULK INSERT statement that lets you do the inserts from a file. Is that something you could apply to your case?
To give some idea, we use it to create temp tables we need to populate a bunch of graphs from text files with several columns of data:
-IF &KeepTable NE 0 THEN GOTO :KeepTable;
-SET &TableName = 'g_' || &FileName.&First;
-SET &TmpTableName0 = '"#' || &TableName || '"';
-SET &TmpTableName = TRUNCATE(&TmpTableName0);
-SET &KeepTable = 1;
ENGINE SQLMSS SET DEFAULT_CONNECTION XXX
SQL SQLMSS
IF OBJECT_ID('dbo.&TmpTableName', 'U') IS NOT NULL
DROP TABLE dbo.&TmpTableName;
END
-RUN
SQL SQLMSS
CREATE TABLE dbo.&TmpTableName (
seq INT IDENTITY(1, 1) NOT NULL
, legend VARCHAR(45) NULL
, part_no VARCHAR(40) NULL
-REPEAT :FLDLP1 FOR &I FROM 1 TO &N;
, field_&I FLOAT
-:FLDLP1
);
END
-RUN
-:KeepTable
-* Import this data-file into our table
SQL SQLMSS
BULK INSERT dbo.&TmpTableName
FROM '&FilePath.&Index'
WITH (
FIRSTROW = &FirstDataRow,
FORMATFILE = '&FormatURI'
);
END
-RUN
WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010 : Member of User Group Benelux :
September 13, 2016, 07:48 AM
MartinY
I'll look at this option Wep, thanks.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007