Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > SQL Language
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 15th, 2005, 05:34 AM
Registered User
 
Join Date: Nov 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel LinkedServer AlterTable

Morning!

I need to stash a result set on an Excel sheet. Connecting to the workbook as a linked server is cool indeed. But

1- When I place data on the sheet with an 'insert into' clause, all the data seems to go over as text. I can pre-format the column on the sheet that gets the numeric data, and I can wrap the result column in a CAST() function. But neither matters. I get text.

2- My plan was to add another column to the spreadsheet, in it add the numeric column + 0, then copy that back to the original column. But, ALTER TABLE complains about having too many predicates with the table name. I used ALTER TABLE <ServerName>...<SheetName>. This is 4 predicates, and the error message says I can use only 2 (I think it's 2).

So, how can I transer numneric data and how can I use ALTER TABLE?

Thanks in advance,
Stoney
 
Old May 30th, 2005, 10:11 AM
Authorized User
 
Join Date: Oct 2004
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I managed to transfer a numeric to an excel spreadsheet and still end up with a numeric by changing the Destination Tab on the transformation line. By changing the default 'TableName' from Sheet1$ to New_Table it converted the field to a numeric value.





Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP to Excel BUT show Excel grid lines mat41 Classic ASP Basics 8 May 31st, 2009 05:56 PM
Problem in opening excel file in MS Excel 2000 kallol Visual C++ 0 November 16th, 2007 05:48 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
Excel in win 2000 to excel winxp (excel 2002) Max Excel VBA 3 August 28th, 2003 04:44 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.