473,383 Members | 1,978 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,383 software developers and data experts.

Rules for multiline SQL statements

Can someone enlighten me on what the rules are for writing multiline
SQL statements in Access. Something regarding the numerous double
quotation marks and and underscores I see in multiline SQL code.

Thanks a lot for any help in advance.

May 17 '06 #1
3 7266
On 17 May 2006 11:03:49 -0700, ca**********@hotmail.com wrote:
Can someone enlighten me on what the rules are for writing multiline
SQL statements in Access. Something regarding the numerous double
quotation marks and and underscores I see in multiline SQL code.

Thanks a lot for any help in advance.


An example would have been nice here, as there are times when the use
of double quotes has nothing to do with the fact that the SQL is
multi-line. Let's us answer your question, not the question we think
you are asking.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
May 17 '06 #2
I am getting confused between the use of different characters to
separate portions of a multiline SQL statement from one another and
characters used to enable strings to span multiple lines. Which of the
characters " or _ or & are used for what?

EXAMPLE OF TYPE 1: Example of multiline SQL:

strSqlPart1 = "SELECT tblOUMaster.[Serial Number],
tblOUMaster.EntryDate " & _
"FROM tblOUMaster WHERE (((tblOUMaster.[Serial Number])=" & """"

strSqlPart2 = """) AND ((tblOUMaster.EntryDate) Is Not Null));"

strSqlAll = strSqlPart1 & mySerialNumber & strSqlPart2
Need to select Serial Number and Entry Date from a table called
tblOUMaster where Serial Number is equal to mySerialNumber and Entry
Date is not null.

EXAMPLE OF TYPE 2: Example of string spanning multiple lines:

strMessage = "Enter the Date of Departure to be updated for Customer
Number " & _
Me.Customer_Number.Value & "."

The string variable strMessage will be used in a message box as
follows:

DateofDeparture = InputBox(strMessage, "Departure Date Entry
MessageBox")

May 17 '06 #3
Sorry about the mental block I had. I figured it out. Thanks for
replying Fred.

May 17 '06 #4

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

Similar topics

0
by: Rasmus Fogh | last post by:
Dear All, I need a way of writing strings or arbitrary Python code that will a) allow the strings to be read again unchanged (like repr) b) write multiline strings as multiline strings instead...
2
by: rick_muller | last post by:
I'm trying to embed a Python interpreter in a GUI I'm developing, and I'm having trouble understanding the proper use of code.InteractiveInterpreter. Here's what I'm trying: % python Python...
7
by: Joel Finkel | last post by:
Folks, I have a form that has several TextBoxes, some of which have the TextMode set to MultiLine. Each is pre-loaded with data from a database. The user is allowed to modify each entry. The...
40
by: Edward Elliott | last post by:
At the risk of flogging a dead horse, I'm wondering why Python doesn't have any multiline comments. One can abuse triple-quotes for that purpose, but that's obviously not what it's for and doesn't...
9
by: John Salerno | last post by:
How do you make a single string span multiple lines, but also allow yourself to indent the second (third, etc.) lines so that it lines up where you want it, without causing the newlines and tabs or...
5
by: sck10 | last post by:
Hello, I need to create a Business Rules table that can be pulled into the web page and use it as criteria for who should receive the approval email. For example, I have created a travel...
7
by: abcd | last post by:
When do I need to use a trailing slash to separate code over multiple lines. For example: x = "hello world, this is my multiline " + \ "string!!!!" x = {'name' : \ 'bob'}
6
by: Zdenek Maxa | last post by:
Hi all, I would like to perform regular expression replace (e.g. removing everything from within tags in a XML file) with multiple-line pattern. How can I do this? where =...
2
by: King | last post by:
Is there any other way to define multiline text in a XML file: <Help><!]> </Help>
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.