[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] Loading fixed length flat file into Sybase table
- Subject: [sqr-users] Loading fixed length flat file into Sybase table
- From: maddy <madhudvm@gmail.com>
- Date: Thu, 27 Sep 2007 14:57:38 -0400
- Delivery-date: Sun, 07 Oct 2007 01:54:14 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta;h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type;bh=xZn53I7iQQRhtb77rY6ARsT4jDizOvBNq+BvY62ynxI=;b=aVDhmSihn6dGpiWpUwM0Vt0mTfvqne/NcKh9QdQ2yuuHLIFySp8CmKPqwRqLBMei9OjTfHbORusQy8c5U7rAl0Nf9UV7lAljW3vBoaOnAjB6DsGkxLP/atiMA4AiUy+zG0/gyTPxjWczs+NfgXKfNPf/7ZJxGct3IYHkeq4WMaI=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta;h=received:message-id:date:from:to:subject:mime-version:content-type;b=HaMzTCZTy6kq98j/wksy5n9p0sucSFJgxTnqSBTIV/kOB5idHgnREj+HMVCukKGPB4+tIHgiGIiEbk0Wplv2sErc6bzKeJOQemnnzQ7KfG9bQTV3b+STnLqk0Tzm3UahXkiMRMJ0nvis7D38RZ/dFvtMESPHi6t2k7dktPwJAJg=
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Hi,
What is the better way to load the data from fixed length flat file into a
sybase database table using SQR. Number of rows in the file vary from 10,000
to 50,000
I'm doing something like the code below, but my concern is for each insert
statement it goes to the database and could be performance issue.
**************************************************************************************************************************
open 'aaaa.txt' AS 100 for-reading record=600:fixed status=#z
while 1
read 10 into $name:40 $Id:30 $location:50
if #end-file
break
end-if
begin-sql
insert into cust (name, Id, location)
values ($name, $ID, $location)
end-sql
add 1 to #inserts
if #inserts >= 100
begin-sql
commit transaction
begin transaction
end-sql
move 0 to #inserts
end-if
end-while
************************************************************************************************************
Thanks!!
Maddy
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users