Aug 27, 2007
Good morning. I am new to coding VBA and need some help if possible. I need to import a Comma Delimited Text file into a MS Access table. The records vary in length and may take up multiple lines of text before the next record. The first field contains the type of record and are all prefixed 1###, with the ### being variable. (1001 - 1100). If the record goes over one line the 2nd line with start with 1000. Here is an example: The records with 1001 continue to the next line with 1000 so you know it continues. The other records are all single lines starting with 1100, 1003, 1004, 1006...1017.
1001,00000000,00000000,00000000,00108888,00537906
1000,00100,"CAJUN MEAT ","CHUB "-0020380
1001,00000000,00000000,00000000,00020492,00130534
1000,00108,"RED BEANS ","CHUB ",-0221510
1001,00000000,00000000,00000000,00222572,00796807
1100,0000000000,0009605419
1003,01,000101,263558519,"QQ380427",5,08,19,107,16,07,58
1003,02,000202,263774367,"QQ380428",4,08,19,107,22,22,12
1004,1," "
1004,2," "
1004,3," "
1004,4," "
1006,00000000,00000000,00000000,00000000
1007,"$ OFF ",0000000000,0000000000,0000000000
1007,"FREE ",0000000000,0000000000,0000000000
1007,"SENIOR 10% ",0000000000,0000000000,0000000000
1007,"50% Police ",0000000000,0000000100,0000000001
1007,"CREW 50% ",0000000000,0000000310,0000000003
1007,"CREW 100% ",0000000000,0000001976,0000000009
1007,"MANAGER ",0000000000,0000000260,0000000003
1007,"BONUS ITEMS ",0000000000,0000000000,0000000000
1008,00107,00001,00065,06074,00347,00290
1009,01,"BREAKFAST SALES ",0000114476,02940,000091
1009,02," SALAD SALES ",0000009093,00233,000007
1009,03,"DRIVE-THRU SALES ",0000142716,03666,000106
1010,0000002646,0000009093,0000000000
1011,000,0000000000,003,0000005208
1015,"NET SALES ","+",0000389258
1015,"TAX ","+",0000023434
1015,"GROSS SALES ","=",0000412692
1015,"RESTAURANT BANK ","+",0000000000
1015,"ADJUSTED GROSS CASH ","=",0000412692
1015,"SEPLINE----------------------"," ",0000000000
1015,"AMOUNT DEPOSITED ","+",0000365609
1015,"GIFT REDEEMED ","+",0000000000
1015,"CREDIT CARD ","+",0000044844
1015,"MISC. INCOME ","-",0000000000
1015,"PETTY CASH ","+",0000000000
1015,"NET SALES ","-",0000389258
1015,"TAX ","-",0000023434
1015,"CASH OVER/SHORT ","=",-000002239
1015,"CASHIER OVER/SHORT ","-",-000001839
1015,"OVER/SHORT RECONCILIATION ","=",-000000400
1015,"SEPLINE----------------------"," ",0000000000
1015,"NET SALES ","+",0000389258
1015,"GIFT CERT. SOLD ","-",0000000000
1015,"OTHER NON-FOOD ","-",0000000000
1015,"NET FOOD SALES ","=",0000389258
1016,1,00000000,00000000,00000000
1016,2,00006103,00036415,00118800
1017,0004339338
I will need to do this weekly for many different files. I appreciate all the help that anyone can provide.
View 4 Replies
View Related
Feb 24, 2008
Hello,
I have a excel file which is a combination of to files (a .csv and txt) which I need to manipulate using access to get certain output. I created 2 tables for the 2 files in Access and then combined the 2 files by joining them on some common attributes.
Sample records from the excel file:
There are two fields..samaccountname and groupmembership which I need to display in a single line..
Accountname GroupMembership
trs 92 CN=US-HTSU Disable Mass Storage
Devices-S-D,OU=Call Centers,OU=Desktop
Access Groups,OU=US HTSU,OU=US
Groups,OU=US,DC=HNAH,DC=ADROOT,DC=HSBC
Wherever there is group membership, I want
that comma separate and parsed for a user in one line
'CN=US-HTSU Disable Mass Storage Devices-S-D,OU=Call Centers,OU=Desktop
Access Groups,OU=US HTSU,OU=US Groups,OU=US,DC=HNAH,DC=ADROOT,DC=HSBC
'CN=HNAH Generic Accounts-S-G,OU=Department Groups,OU=US HTSU,OU=US
Groups,OU=US,DC=HNAH,DC=ADROOT,DC=HSBC
I just need the following:
Tsr012,"US-HTSU Disable Mass Storage Devices-S-D,HNAH Generic Accounts-S-G"
Is there a command or way to do this in Access or even SQL Server?
Any help would be much appreciated..
Thanks!
Gaurav
View 2 Replies
View Related