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
 Other Forums
 Other Topics
 spooling records from a table

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-13 : 07:56:41
Ravi writes "Hi

I am new to this software field and have a problem with getting data from database.

The table contains 80 columns,5 lack records.
I am intended to spool these 5 lack records to a file.
I have the information that I takes 7hours to get these records to a file in local system.
Could any of you give me an alternative script to get these records relatively faster.

Actually I have little bit idea regarding Unix and would like to know if any thing like executing in shell part by part is possible. The database is probably on Unix machine.

By this I don’t relate DB to shell script. But want some idea like executing on multiple shell.

Thanks,
Ravi."

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-13 : 07:57:54
what are lack records?
what is your database?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-13 : 08:19:21
Ravi, you should read about bcp in sql server help file



Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-11-13 : 08:19:55
quote:
Originally posted by spirit1

what are lack records?
what is your database?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp


lack should be lakh which is 100,000


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2006-11-13 : 08:27:28
emm... huh?

so 5 lack records is what?



Go with the flow & have fun! Else fight the flow
blog thingie: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-13 : 09:03:25
5 times 100000 = half a million records...
I'd say 7 hours is much too long time!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-11-13 : 09:39:32
>>> "The database is probably on Unix machine"

Are you using Microsoft SQL Server?

Microsoft SQL Server does not run on UNIX.




CODO ERGO SUM
Go to Top of Page
   

- Advertisement -