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.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | kokkieStarting Member
 
 
                                        1 Post | 
                                            
                                            |  Posted - 2014-10-09 : 13:07:39 
 |  
                                            | Hi I need to have an automated extract from a sql 2000 who creates me .csv fileevery end of the month.Unfortunately the DB is an SQl 2000 .so im not the Power Admin of SQL 2000.Any one a ideas how it can create this extract job on a SQL DB?Following Query will be used:Use XXXXselect PH.storeId,PH.Workdate,PT.Tendered,RIGHT(PLC.CardNo,13) CardNofrom PosHeader PHJOIN PosTransactions PTON PH.HeaderID = PT.HeaderIDJOIN PosLoyaltyCusts PLCON PT.GlobalTxnID = PLC.GlobaltxnIDWHERE PT.IsVoided = 0AND PT.IsTranining = 0 and Ph.WorkDate between '2014-06-30 00:00:00' and '2014-09-28 00:00:00'Hope some one have any idications how i can relase this on the SQL 2000.THX!kokkie |  |  
                                    | tkizerAlmighty SQL Goddess
 
 
                                    38200 Posts | 
                                        
                                          |  Posted - 2014-10-09 : 14:00:12 
 |  
                                          | Put the query into a view. Then run this command in a cmd window, modifying the parameters:bcp "select * from XXXX.dbo.viewname" queryout c:\temp\somefile.csv -T -Sserver1\instance1 -c -t, -r\r\nTara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |  
                                          |  |  |  
                                |  |  |  |