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 2005 Forums
 SSIS and Import/Export (2005)
 Reading data from a report

Author  Topic 

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2008-11-24 : 12:01:32
Hey i have a request to parse data from a file now the file is a report is there a way to do this in SSIS.

All i need is the total sum in the file i will know this by the word total in the file.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-24 : 12:03:48
you mean reading data from sql reporting services report?
Go to Top of Page

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2008-11-24 : 12:14:15
Nope these are normal report from another system. so the data is not formatted.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-24 : 12:16:07
quote:
Originally posted by rookie_sql

Nope these are normal report from another system. so the data is not formatted.


what will be format of report? just a doc or txt file?
Go to Top of Page

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2008-11-24 : 12:40:14
some will be .txt and others .csv
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-24 : 12:46:49
quote:
Originally posted by rookie_sql

some will be .txt and others .csv


then use a text file source in a data flow task
Go to Top of Page

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2008-11-25 : 04:39:04
But the file is unformatted its not tab delimited etc. or in columsn of data.
Go to Top of Page

rookie_sql
Constraint Violating Yak Guru

443 Posts

Posted - 2008-11-27 : 17:59:40
Hey i need to come back on this as am not having much luck with it. the files i receive look like this.

What i need is a way to red in the line of the fine what has the word total beside it or read all the file into one column and then take out what i need. Can anyone help ?

report header xxxxxxxxxxx
report page 1

col 1 col 2 col 3
xxx xxx xxx

report header xxxxxxxxxxx
report page 1

col 1 col 2 col 3
xxx xxx xxx

report header xxxxxxxxxxx
report page 1

col 1 col 2 col 3
xxx xxx xxx


col 1 col 2 col 3
Total xxx xxxx xxx
Go to Top of Page

tmitch
Yak Posting Veteran

60 Posts

Posted - 2008-11-27 : 20:57:23
You're most likely looking at using a script task to get there. You might be able to get creative with a conditional split depending on how messy the data is.

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

Tim Mitchell
www.BucketOfBits.com
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-28 : 05:59:35
have you tried specifying format file in bcp or bulk insert for file and reading it?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-28 : 06:00:41
Refer this & see if it helps

http://www.nigelrivett.net/SQLTsql/BCP_quoted_CSV_Format_file.html
Go to Top of Page
   

- Advertisement -