LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Adding SQL Select Statement

Hello. I set up a connection to a SQL view using VBA. I'm pulling
back many fields including a 'work notes' field. The problem is the
notes, and any field after the notes field in the select statement are
all coming back blank. I'm wondering if the field is too long, and if
it is very long then can I enter any code to work around this or to
indicate that it IS long and to bring it over anyway.

Strangely enough, when I link to the same view in Access and then link
Excel to Access I get the data. I was hoping to remove the middleman
however and just go directly to the SQL view using VBA in Excel
though.

Not sure if it will help, but here is the select statement.

"SELECT [Date Lead Sent], [Lead Date], Month, individualid,
incidentid, Company, [First Name], [Last Name], Address, " & _
"City, State, Zip, Country, Phone, Email, [Campaign Code], Promotion,
[Rep Name], [Lead Type], [Product Area], " & _
"[Number of Employees], [Work Notes], Region, Area, AccountInfo " & _

The [Work Notes] field is the one that is coming back blank, as well
as the Region, Area, and AccountInfo fields.

Any thoughts on this?

Thank you

Paul
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Case Statement Katie Excel Worksheet Functions 13 December 1st 08 07:32 PM
If Statement to select a letter Karl Excel Worksheet Functions 3 February 8th 08 04:01 PM
Creating ODBC link within SELECT statement Ed Ferrero Charts and Charting in Excel 0 January 31st 06 07:48 AM
Wildcard character with Select Statement Mike Excel Programming 1 December 12th 03 07:21 PM
Convert If..Else to Select Case Statement. Sheela Excel Programming 1 July 25th 03 09:28 AM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"