473,320 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

SQL string

Hi

I have a SQL string that works fine in Access.
I am trying to use the string to import the data into Excel.

The string appears to be too long for the VBA editor, has a complex
Where selection with several AND OR statements. Do not seem to be able
to break the Sql statment into blocks that will fit???

Any suggestions??

Thanks

Clive
Aug 19 '08 #1
2 1746
On Tue, 19 Aug 2008 04:15:24 -0700 (PDT), Clive Swan wrote:
Hi

I have a SQL string that works fine in Access.
I am trying to use the string to import the data into Excel.

The string appears to be too long for the VBA editor, has a complex
Where selection with several AND OR statements. Do not seem to be able
to break the Sql statment into blocks that will fit???

Any suggestions??

Thanks

Clive
"Import the data into Excel"?
Sounds like you are doing this from Excel, in which case I would
suggest you post this question in an Excel newsgroup.

I would also suggest you include your Excel version number. Sometimes
it makes a difference.

It also seems logical to me that you should include the exact SQL in
your message.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 19 '08 #2
Hi Fred

I found an example that solved the problem, quite simple.
Sql = "Select * from ........"

Solution is:
Sql = "Select * from ................"
Sql = Sql & "Where ................."

This worked!!

Thanks

On 19 Aug, 16:15, fredg <fgutk...@example.invalidwrote:
On Tue, 19 Aug 2008 04:15:24 -0700 (PDT), Clive Swan wrote:
Hi
I have a SQL string that works fine in Access.
I am trying to use the string to import the data into Excel.
The string appears to be too long for the VBA editor, has a complex
Where selection with several AND OR statements. Do not seem to be able
to break the Sql statment into blocks that will fit???
Any suggestions??
Thanks
Clive

"Import the data into Excel"?
Sounds like you are doing this from Excel, in which case I would
suggest you post this question in an Excel newsgroup.

I would also suggest you include your Excel version number. Sometimes
it makes a difference.

It also seems logical to me that you should include the exact SQL in
your message.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
Aug 20 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: Krakatioison | last post by:
My sites navigation is like this: http://www.newsbackup.com/index.php?n=000000000040900000 , depending on the variable "n" (which is always a number), it will take me anywhere on the site......
5
by: Stu Cazzo | last post by:
I have the following: String myStringArray; String myString = "98 99 100"; I want to split up myString and put it into myStringArray. If I use this: myStringArray = myString.split(" "); it...
9
by: John F Dutcher | last post by:
I use code like the following to retrieve fields from a form: recd = recd.append(string.ljust(form.getfirst("lname",' '),15)) recd.append(string.ljust(form.getfirst("fname",' '),15)) etc.,...
10
by: Angus Leeming | last post by:
Hello, Could someone explain to me why the Standard conveners chose to typedef std::string rather than derive it from std::basic_string<char, ...>? The result of course is that it is...
2
by: Andrew | last post by:
I have written two classes : a String Class based on the book " C++ in 21 days " and a GenericIpClass listed below : file GenericStringClass.h // Generic String class
29
by: zoro | last post by:
Hi, I am new to C#, coming from Delphi. In Delphi, I am using a 3rd party string handling library that includes some very useful string functions, in particular I'm interested in BEFORE (return...
2
by: Badass Scotsman | last post by:
Hello, Using VB and ASP,NET I would like to be able to search a STRING for a smaller STRING within, based on the characters which appear before and after. For example: String1 = " That was...
15
by: morleyc | last post by:
Hi, i would like to remove a number of characters from my string (\t \r \n which are throughout the string), i know regex can do this but i have no idea how. Any pointers much appreciated. Chris
11
by: ramu | last post by:
Hi, Suppose I have a string like this: "I have a string \"and a inner string\\\" I want to remove space in this string but not in the inner string" In the above string I have to remove...
8
by: drjay1627 | last post by:
hello, This is my 1st post here! *welcome drjay* Thanks! I look answering questions and getting answers to other! Now that we got that out of the way. I'm trying to read in a string and...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.