I have a problem using the CASE function (Log Parser 2.2):
For storing information from a logfile to an Access db, i'm using the following
working query (separate file):
SELECT Zeitpunkt,
Abfragetyp,
Abfragedauer,
Statement,
CNT_BEWA,
CNT_STEA,
CNT_AG
USING STRCNT(Statement,'DW_FACT_BEWA') AS CNT_BEWA,
STRCNT(Statement,'DW_FACT_STEA') AS CNT_STEA,
STRCNT(Statement,'DW_FACT_AG') AS CNT_AG
INTO Log
FROM grnds-Performance.log
But in fact, i don't want to know the number of occurrences but only if there's
any occurence. Therefore I'm trying to use this query:
SELECT Zeitpunkt,
Abfragetyp,
Abfragedauer,
Statement,
CASE CNT_BEWA WHEN 0 THEN 0 ELSE 1,
CASE CNT_STEA WHEN 0 THEN 0 ELSE 1,
CASE CNT_AG WHEN 0 THEN 0 ELSE 1
USING STRCNT(Statement,'DW_FACT_BEWA') AS CNT_BEWA,
STRCNT(Statement,'DW_FACT_STEA') AS CNT_STEA,
STRCNT(Statement,'DW_FACT_AG') AS CNT_AG
INTO Log
FROM grnds-Performance.log
But this query returns the following error:
Error: Syntax Error: : no
So my question: Is there any possibility to get the desired information via
Log Parser, so I don't have to further transform the table via Access?
Thanks in advance!
Christian
For storing information from a logfile to an Access db, i'm using the following
working query (separate file):
SELECT Zeitpunkt,
Abfragetyp,
Abfragedauer,
Statement,
CNT_BEWA,
CNT_STEA,
CNT_AG
USING STRCNT(Statement,'DW_FACT_BEWA') AS CNT_BEWA,
STRCNT(Statement,'DW_FACT_STEA') AS CNT_STEA,
STRCNT(Statement,'DW_FACT_AG') AS CNT_AG
INTO Log
FROM grnds-Performance.log
But in fact, i don't want to know the number of occurrences but only if there's
any occurence. Therefore I'm trying to use this query:
SELECT Zeitpunkt,
Abfragetyp,
Abfragedauer,
Statement,
CASE CNT_BEWA WHEN 0 THEN 0 ELSE 1,
CASE CNT_STEA WHEN 0 THEN 0 ELSE 1,
CASE CNT_AG WHEN 0 THEN 0 ELSE 1
USING STRCNT(Statement,'DW_FACT_BEWA') AS CNT_BEWA,
STRCNT(Statement,'DW_FACT_STEA') AS CNT_STEA,
STRCNT(Statement,'DW_FACT_AG') AS CNT_AG
INTO Log
FROM grnds-Performance.log
But this query returns the following error:
Error: Syntax Error: : no
So my question: Is there any possibility to get the desired information via
Log Parser, so I don't have to further transform the table via Access?
Thanks in advance!
Christian