database table not being updated by QTP
Edis, Bob
bob.edis@fleetpride.com
Fri, 24 Nov 2000 11:34:07 -0600
G'day all
I am trying to update a SQL Server 7 table using QTP in a NT 4.0
environment. The source is below. The environment is:
PH version: 8.21.D1
OS: Windows NT 4.0 (build 1381 service pack 6)
DB: SQL Server 7.00.842
Machine: Compaq Proliant quad processor with 4GB RAM.
When I run the QTP it seems to work fine and the statistics show that the
desired rows were added. This is a lie! Using both Quiz and SQL I find the
rows have NOT been added. I checked to make sure I was pointing to the
correct database using Quiz and I was. I have used QTP in the past to
update existing records in this table successfully. The problem seems to be
with adding records.
Any ideas?
D:\Cognos Shared\PHWeb>qtp
Q T P (PowerHouse 8.21.D1)
Copyright 2000 COGNOS INCORPORATED
Licensed PH8-TEMPORARY for customer: 0712570003 COGNOS NI DEMO
Warning: Temporary licensing of PowerHouse Server products expires
15-DEC-2000
Please contact your local Sales Administration office for a permanent
license.
> use add_cust
> RUN add_customers
> SET PROCESS NOLIMIT
> ;SET PROCESS LIMIT 10
>
> REQUEST add_customers ON CALC ERROR REPORT
> ACCESS customer_segment_temp IN dwdb ALIAS cst &
> LINK TO RECORD 0 OF *last_customer_key
>
> CHOOSE VIAINDEX PK_Customer_Segment_Temp
>
> TEMP next_customer_key
> ITEM next_customer_key INITIAL last_customer_key
>
> DEF first_delim = INDEX(cust_key,'$')
> DEF next_delim = INDEX(cust_key[first_delim+1:size(cust_key)],'$')
>
> ITEM next_customer_key = next_customer_key + 1
>
> ;SUBFILE test_add_cust KEEP INCLUDE cust_key, cust_name, next_customer_key
>
> OUTPUT customer IN dwdb ADD ON ERROR REPORT
> ITEM customer_key FINAL next_customer_key
> ITEM source_system FINAL NCONVERT(cust_key[1:first_delim - 1])
> ITEM customer_base FINAL cust_key[first_delim+1:next_delim - 1]
> ITEM customer_id FINAL
cust_key[first_delim+next_delim+1:size(cust_key) - first_delim+next_delim]
> ITEM name FINAL cust_name OF cst
> ITEM city FINAL cust_city OF cst
> ITEM state FINAL cust_state OF cst
> ITEM salesrep FINAL salesrep OF cst
> ITEM cust_subseg_id FINAL cust_subseg_id OF cst
> ITEM sys_base_customer FINAL cust_key
> ITEM Corp_Cust_Id FINAL 0
> ITEM Stmt_Branch_Customer_Id FINAL cust_key[1:first_delim+next_delim] +
'000000'
> ITEM YTD_Sales_Parts FINAL 0
> ITEM PYR_Sales_Parts FINAL 0
> ITEM Stmt_Branch_Customer_Flag FINAL '000000'
> ITEM Control_Branch FINAL cust_key[first_delim+1:next_delim - 1]
>
> GO
Executing request ADD_CUSTOMERS ...
Records read:
CST 5,360
LAST_CUSTOMER_KEY 1
Transactions processed: 5,360
Records processed: Added Updated Unchanged
Deleted
CUSTOMER 5,360 0 0
0
Finished.
> exit
D:\Cognos Shared\PHWeb>
D:\Cognos Shared\PHWeb>quiz
Q U I Z (PowerHouse 8.21.D1)
Copyright 2000 COGNOS INCORPORATED
Licensed PH8-TEMPORARY for customer: 0712570003 COGNOS NI DEMO
Warning: Temporary licensing of PowerHouse Server products expires
15-DEC-2000
Please contact your local Sales Administration office for a permanent
license.
> acc *last_customer_key
> rep all
> go
11/24/2000 phd PAGE
LAST_CUSTOMER_KEY
159040
> acc customer in dwdb
> set rep nolim
> sort on customer_key
> fin foo customer_key
> go
11/24/2000 phd PAGE
Customer
Key
159040
The column customer_key is the primary key in the table and a unique index
(PK_Customer).
Thanks in advance,
Robert Edis
Manager - Business Intelligence
FleetPride
520 Lake Cook Rd., Suite 100
Deerfield IL 60015
Tel: 847.572.8039
Fax: 847.444.1096
www.fleetpride.com
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.