S
Scott McNair
I'm running into a situation where I want to take a multi-line SQL
statement and include it as a string in my code. I know that I can do
something like
strSQL = "SELECT * "
strSQL &= "FROM tbl.dbo.MyTable, "
strSQL &= " tbl.dbo.MyTable2 "
strSQL &= "WHERE MyTable.ID = MyTable2.ID "
strSQL &= "ORDER BY Date DESC"
but is there a way to do something like
strSQL = ::BOF::
SELECT *
FROM tbl.dbo.MyTable,
tbl.dbo.MyTable2
WHERE MyTable.ID = MyTable2.ID
ORDER BY Date DESC
::EOF::
?
I know it sounds like a petty issue, but some of these SQL statements
are scores of lines long, and are subject to overhaul from time to
time... if there was a way to do what I'm looking for, I could save some
5-10 minutes of formatting headaches. I'm afraid I know the answer
already (as "No") but I figured it wouldn't hurt to ask.
Thanks,
Scott
statement and include it as a string in my code. I know that I can do
something like
strSQL = "SELECT * "
strSQL &= "FROM tbl.dbo.MyTable, "
strSQL &= " tbl.dbo.MyTable2 "
strSQL &= "WHERE MyTable.ID = MyTable2.ID "
strSQL &= "ORDER BY Date DESC"
but is there a way to do something like
strSQL = ::BOF::
SELECT *
FROM tbl.dbo.MyTable,
tbl.dbo.MyTable2
WHERE MyTable.ID = MyTable2.ID
ORDER BY Date DESC
::EOF::
?
I know it sounds like a petty issue, but some of these SQL statements
are scores of lines long, and are subject to overhaul from time to
time... if there was a way to do what I'm looking for, I could save some
5-10 minutes of formatting headaches. I'm afraid I know the answer
already (as "No") but I figured it wouldn't hurt to ask.
Thanks,
Scott