Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Text file values loading to sql server

Author  Topic 

kond.mohan
Posting Yak Master

213 Posts

Posted - 2012-06-15 : 02:01:40
Dear all

WE Are getting below mentioned text type file from the Clients
we need to load the data from these txt files to sql server for

Reporting purpose


TEXT FILE(NOT PROPER ORDER) FORMAT
------------------
Group Management Print Job ViewerPractice SLR, Job #11175: Run by MALAP on
04/11/2012.
Job Title: COMMALL2L 20120406102001840EPRClose


slr COMMALL2 LIST 20120406102001840EPRA0 USER:MALAP 04/11/12 10:49P PAGE 1

Fidelis Care New York COMMERCIAL
95-25 Queens Blvd REMITTANCE
8th Floor NOTICE
Rego Park , NY 11374
HIPAA-EDI_Team@Fideliscar

SLR Diagnostic Radiology, PC
PO Box 10269
Uniondale , NY 11555

PROVIDER #: 1225069149
CHECK/EFT DATE: 04/06/12
CHECK/EFT #: 20120406102001840EPRA0


PERF PROV SERV DATE POS NOS PROC MODS BILLED ALLOWED DEDUCT COINS GRP/RC-AMT PROV PD
-----------------------------------------------------------------------------------------------------------------------------------
Abdelghafar ,Reda HIC 741289065 ACNT 10493141SLR531177 ASG N
ICN 003960578100
MOA
1306878939 0306 030612 001 74176 26 150.00 48.91 .00 .00 CO-45 101.09 48.91

PT RESP .00 CLAIM TOTALS: 150.00 48.91 .00 .00 101.09 48.91

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 48.91
-----------------------------------------------------------------------------------------------------------------------------------
Acostaestevez ,Vielka HIC 741002089 ACNT 10194876SLR531196 ASG N
ICN 003960579800
MOA
1215984042 0307 030712 001 76817 26 110.00 36.46 .00 .00 CO-45 73.54 36.46

PT RESP .00 CLAIM TOTALS: 110.00 36.46 .00 .00 73.54 36.46

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 36.46
-----------------------------------------------------------------------------------------------------------------------------------
Adames ,John HIC 641239751 ACNT 10490700SLR528504 ASG N
ICN 003956411300
MOA
1659311496 0305 030512 001 70220 26 50.00 6.29 .00 .00 CO-45 43.71 6.29

PT RESP .00 CLAIM TOTALS: 50.00 6.29 .00 .00 43.71 6.29

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 6.29
-----------------------------------------------------------------------------------------------------------------------------------
Ahmed ,Feroza HIC 741457402 ACNT 10339671SLR522813 ASG N
ICN 003943464500
MOA
1841226388 0301 030112 001 76536 26 70.00 14.32 .00 .00 CO-45 55.68 14.32

PT RESP .00 CLAIM TOTALS: 70.00 14.32 .00 .00 55.68 14.32

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 14.32
-----------------------------------------------------------------------------------------------------------------------------------
Ahmed ,Feroza HIC 741457402 ACNT 10339671SLR522861 ASG N
ICN 003943468800
MOA
1659311496 0301 030112 001 70540 26 300.00 34.55 .00 .00 CO-45 265.45 34.55

PT RESP .00 CLAIM TOTALS: 300.00 34.55 .00 .00 265.45 34.55

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 34.55
-----------------------------------------------------------------------------------------------------------------------------------
Ahmed ,Khaled HIC 741644011 ACNT 10227597SLR531178 ASG N
ICN 003960578200
MOA
1306878939 0307 030712 001 72052 26 65.00 9.42 .00 .00 CO-45 55.58 9.42
1306878939 0307 030712 001 72100 26 50.00 6.09 .00 .00 CO-45 43.91 6.09

PT RESP .00 CLAIM TOTALS: 115.00 15.51 .00 .00 99.49 15.51

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 15.51
-----------------------------------------------------------------------------------------------------------------------------------
Albuquerque ,Carlos HIC 641232236 ACNT 10300013SLR531147 ASG N
ICN 003960575200
MOA
1841226388 0308 030812 001 76705 26 90.00 15.02 .00 .00 CO-45 74.98 15.02

PT RESP .00 CLAIM TOTALS: 90.00 15.02 .00 .00 74.98 15.02

ADJ TO TOTALS: INTEREST .00 LATE FILING CHARGE .00 NET 15.02



slr COMMALL2 LIST 20120406102001840EPRA0 USER:MALAP 04/11/12 10:49P PAGE 2

Fidelis Care New York COMMERCIAL
95-25 Queens Blvd REMITTANCE
8th Floor NOTICE
Rego Park , NY 11374
HIPAA-EDI_Team@Fideliscar

SLR Diagnostic Radiology, PC
PO Box 10269
Uniondale , NY 11555

PROVIDER #: 1225069149
CHECK/EFT DATE: 04/06/12
CHECK/EFT #: 20120406102001840EPRA0

---------------------------

here i have posted sample 20 lines of text file

The text file having more than 3000 lines

I WANT TO KNOW THE HOW TO READ THIS TYPE OF TEXT FILE DATA INTO SQLSERVER


IF anybody know expalin the logic

nigelrivett
Master Smack Fu Yak Hacker

3385 Posts

Posted - 2012-06-15 : 05:19:45
Depends on what you want to do with it.
Maybe a script task in ssis or a single varchar(max) column and bulk insert.
Second is simpler - then you can use sql to parse the file if you need to.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -