Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have a spreadsheet I am trying to Query as follow and it works "SELECT [Product ID] FROM Sheet1$ But for some odd reason productIDs that are only numeric displays as blanks whereas non numeric productIDs do display So I tried a different query "SELECT CAST([Product ID] AS VARCHAR(25)) FROM Sheet1$ But I got an error message. How far can I take TSQL to query a spreadsheet Yama |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It makes a determination on the data type in the first couple of cells, I
believe, then once determined, only selects cells that match that type. -- Regards, Tom Ogilvy "Yama" wrote in message ... Hello, I have a spreadsheet I am trying to Query as follow and it works: "SELECT [Product ID] FROM Sheet1$" But for some odd reason productIDs that are only numeric displays as blanks whereas non numeric productIDs do display. So I tried a different query: "SELECT CAST([Product ID] AS VARCHAR(25)) FROM Sheet1$" But I got an error message. How far can I take TSQL to query a spreadsheet? Yama |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Tom,
That's the obvious deduction! :-) How to SELECT every cell in a specific format. In SQL I can either use a CAST or a CONVERT. How about in EXCEL Query language? Yama ----- Tom Ogilvy wrote: ----- It makes a determination on the data type in the first couple of cells, I believe, then once determined, only selects cells that match that type. -- Regards, Tom Ogilvy "Yama" wrote in message ... Hello, I have a spreadsheet I am trying to Query as follow and it works: "SELECT [Product ID] FROM Sheet1$" But for some odd reason productIDs that are only numeric displays as blanks whereas non numeric productIDs do display. So I tried a different query: "SELECT CAST([Product ID] AS VARCHAR(25)) FROM Sheet1$" But I got an error message. How far can I take TSQL to query a spreadsheet? Yama |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Missing OLEDB drivers in Excel 2000 (9.0.28.12) | Excel Discussion (Misc queries) | |||
OleDB Provider for Excel 2007 Binary (.xlsb) | Excel Discussion (Misc queries) | |||
Using OleDB to get data from Excel | Excel Discussion (Misc queries) | |||
Query OLEDB Provider for Excel file info? | Excel Programming | |||
Excel schema using Jet OLEDB Provider? | Excel Programming |