Re: Create Job to dump SP results into a text file.

From: moondaddy (moondaddy_at_nospam.com)
Date: 03/23/04


Date: Tue, 23 Mar 2004 09:38:08 -0600

OK Thanks its running now. But its output is in a strange format. Its not
fixed length or tab delimited. Here's a sample of the output containing the
header info and the first 2 rows. When you get this it will probably look
like the email did a line wrap, but the output was already wrapped to about
75 spaces. however, it should be several hundred as there are about 20
columns of data. It looks like it is wrapping because WlD_LegalDesc is
varchar(2000) and so is WlD_TractLegals . Any idea how we can get this into
a tab delimited format?

 Wl_ID Wl_API
 Wl_Name
 Wl_RefNo Wl_OperatorID
 Wl_UserID Wl_DateTimeStamp Wl_Active WlD_ID
 WlD_API
 WlD_Name
 WlD_RefNo WlD_OperatorID
 WlD_LegalDesc

 WlD_TractLegals

 WlD_Location
 Fn_Name WlD_Active
 WlD_UserID WlD_DateTimeStamp WlD_Sort
 WlD_Priority
 ----------- ------------------------------
 --------------------------------------------------
 ---------------------------------------- -------------
 ------------------------- ----------------------- --------- -----------
 -------------------------
 --------------------------------------------------
 ------------------------------ --------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 ------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 -----------------------------------------------------------------------
 ------------------------
 --------------------------------------------------
 -------------------------------------------------- ----------
 ------------------------- ----------------------- --------------------
 ------------
        3860 3004528861
 FEDERAL 28-8-19 #2
 304030013 NULL
 geo 2003-12-24 10:49:52.000 1 4065
 3004528861
 FEDERAL 28-8-19 #2
 304030013 170
 NULL

 W/2

 28N 08W 19
 FRUITLAND COAL 1
 geo 2003-12-24 10:50:04.000 1.000000000
            1
        3861 NULL
 FEDERAL 28-8-19 #2 INFILL
 NULL NULL
 geo 2003-12-24 10:49:52.000 1 4066
 NULL
 FEDERAL 28-8-19 #2 INFILL
 NULL 170
 NULL

 W/2

-- 
moondaddy@nospam.com
"Baisong Wei[MSFT]" <v-baiwei@online.microsoft.com> wrote in message
news:wuzaW7MEEHA.2224@cpmsftngxa06.phx.gbl...
> Hi moodaddy,
>
> As the first content you get, it is because the missing of some switches
in
> the OSQL utility, and the -L is an exclusive switch in osql utility, so
you
> get the content of 'The -L parameter can not used in combineation with
> others parameters.'  The second one is due to the blank between the '-'
and
> 'b'. OSQL could not parse the parameters too. Now it is all right with the
> syntax of osql but it has some more problem and seems a little
complicated,
> I will help you to trouble shoot this problem.
>
> 1. Could you connect the SQL Server via Query Analyzer by SQL Server
> authentication using 'sa'?
> 2. Could you please check the TCP/IP and the Named Pipe protocol is
enabled?
> To enable TCP/IP server network library by the Server Network Utility,
> please take the following steps.
> 1) Click "Start", and then click "Run".
> 2) In the "Run" dialog box, type "svrnetcn.exe" (without the quotation
> marks) in the "Open" box, and then click OK. Note: By default, the
> svrnetcn.exe is available in the following folder: <Installation
> Drive>/Program Files/Microsoft SQL Server/80/Tools/BINN
> 3) Click "OK".
> 4) In the "SQL Server Network Utility" dialog box, click "General" tab.
> 5) Select your instance of SQL Server 2000 from the "Instance(s) on this
> server" list.
> 6) In the "Disabled Protocols" list box, select "TCP/IP" and "Named
Pipes",
> and then click "Enable".
> 7) Restart your SQL Server Service and try again.
>
> As for you another question to save the result into a tab limited, till
> now, I could not find a good way to do it with osql. I am not sure I found
> the easiest way. What I figure out is to save the result set of the stored
> procedure (if the result set could be in saved in one table) and use DTS
> (which could be scheduled as a job) to save it to excel file or use BCP
> utility to save it as log file or other file format ( which could also be
> scheduled as a job like the way we talked above with osql).  If you accept
> this method, we will continue to work on it.
>
> Looking forward to your reply.
>
> Thanks.
>
> Best regards
>
> Baisong Wei
> Microsoft Online Support
> ----------------------------------------------------
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only. Thanks.
>
>


Relevant Pages

  • Re: mm/dd/yyyy format question
    ... I was not talking about how .Net or SQL Server stores date/time values ... I get the impression that you are talking about ISO 8601 in terms ... applications use the format for unambiguously representing date/time ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Querying on dates in dd/mm/yyyy hh/mm/ss format using Access2002 And SQL Server 7
    ... For parsing a string to a date/time, the 103 format doesn't limits the user ... > which is used as the row source for the results form). ... > other solutions assuming I have to use SQL Server 7? ... > I don't understand how I can use parameterized stored procedures to solve ...
    (microsoft.public.access.adp.sqlserver)
  • Re: Moving a VBA function to SQL server
    ... "String Functions " in Books Online. ... The SQL server database contains a table named 'WorkOrders'. ... This will produce a job header formatted like this: ... The format he specifies is stored in table 'Settings' - field 'JobHdrMask' ...
    (comp.databases.ms-access)
  • Re: unicode textbox problem
    ... I get the data in the above format from SQL server. ... If I move the same data into an asp:textbox, or an html input textbox, I ... But I need this to show the Chinese characters. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Date Formats
    ... tables of SQL Server. ... I had problem in exporting these fields into Oracle. ... > I presume that the problem is that Oracle doesn't interpret the datetime values from SQL server ... > a format, hence trying to enforce a format for that datatype is meaningless. ...
    (microsoft.public.sqlserver.programming)