Viewing 11 posts - 1 through 11 (of 11 total)
You have to put single quotes around that value, otherwise it will be treated as integer and the leading 0 will be removed
August 17, 2006 at 2:02 pm
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...
October 8, 2005 at 10:56 am
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',...
October 7, 2005 at 7:00 pm
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...
October 7, 2005 at 2:58 pm
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)
October 7, 2005 at 2:06 pm
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...
October 7, 2005 at 1:51 pm
A while ago I posted Strored Procedure for this kind of searches.
http://www.sqlservercentral.com/scripts/contributions/1234.asp
April 12, 2005 at 10:55 am
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...
September 18, 2004 at 10:46 am
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'
August 25, 2004 at 8:10 am
You can use Replicate function. Look into BOL
August 19, 2004 at 11:15 am
If you use <!CDATA> for any data it should work.
February 10, 2004 at 10:13 am
Viewing 11 posts - 1 through 11 (of 11 total)