Forum Replies Created

Viewing 11 posts - 1 through 11 (of 11 total)

  • RE: Index error

    You have to put single quotes around that value, otherwise it will be treated as integer and the leading 0 will be removed

    Leah Kats

  • RE: write result in excel file.

    1. check your rights.

    2.make sure that the spreadsheet name is unique, and noone has it open.

    3.Try to delete the file you already created and run the sp again

    4. If you...

    Leah Kats

  • RE: write result in excel file.

    here is an example with pubs DB

     

    DECLARE @SQL varchar(8000)

     BEGIN 

      SET @SQL =

      'select au_lname,   au_fname,  phone,  address,   city, state, zip  from dbo.authors '

    --   select @SQL

    --   exec (@SQL)

      exec HPSP_UT_ExcelReport 'Test_XLS', @SQL, 'Test_XLS',...

    Leah Kats

  • RE: write result in excel file.

    Sure, you have to supply all the params.

    hese is the way I am running it:

    exec HPSP_UT_ExcelReport 'FileName', @SQL, 'SpreadsheetName', 'COL1_Name text, COL2_Name text'

       ,'\\ServerName\path\'

     

     

    @SQL - this is a sql...

    Leah Kats

  • RE: How to convert sql server default date value to NULL

    in the insert use case statement

     

    insert my_table(col1)

    select case when len(date1_char) = 0 THEN NULL ELSE cast(date1_char as smalldatetime)

    Leah Kats

  • RE: write result in excel file.

    You can use this stored proc.

    Just supply file name, path, and SQL query

     

    /******************************************************************************************

    '              

    '  PROCEDURE:      dbo.HPSP_UT_ExcelReport

    '

    '  Author:     Leah Kats

    '  Created Date:      05/25/2005 

    '    This utility stored procedure will ALTER  xls spreassheet...

    Leah Kats

  • RE: Searching Stored Procedures & User Defined Functions

    A while ago I posted Strored Procedure for this kind of searches.

     

    http://qa.sqlservercentral.com/scripts/contributions/1234.asp

    Leah Kats

  • RE: IDENTITY, insert and order-by

    Here is your problem:

    You have a table with 3 columns. In the insert statement you put values only for 2 columns. In such cases you have to explicitly indicate what...

    Leah Kats

  • RE: How to export structure of view

    SELECT distinct   o.name, c.colid, c.name ColumnName, t.name, c.length

       FROM  sysobjects o

        JOIN sysdepends d

         ON depid = o.id

        JOIN syscolumns c

         ON o.id = c.id  

        JOIN systypes t

          ON c.xtype = t.xtype 

        WHERE  o.xtype = 'V'

     

     

    Leah Kats

  • RE: Casting Date/Time as string, padding empty chars with 0.

    You can use Replicate function. Look into BOL

    Leah Kats

  • RE: OPENXML and non-ascii characters

    If you  use <!CDATA> for any data it should work.

    Leah Kats

Viewing 11 posts - 1 through 11 (of 11 total)