Tony Toews <(E-Mail Removed)> wrote:
>The next thing would be to migrate the queries over as views and
>stored procedures.
BTW I used some code to move most of my queries to SQL Server as
views. Except those that had embedded functions which failed. The
code was much more complex than the following as I kept track of which
queries converted fine and which didn't. Given that I had stacked
queries I had to convert the lower down queries first and move up.
strNewSQL = adhReplace(Q.SQL, vbCrLf, " ")
strNewSQL = Left(strNewSQL, InStr(strNewSQL, ";") - 1)
strNewSQL = ConvertTrueFalseTo10(strNewSQL)
Set myquerydef = dbsPermanent.CreateQueryDef("")
'Q.Name & " DAO Test")
myquerydef.ReturnsRecords = False
myquerydef.Connect = strConnect
myquerydef.SQL = "CREATE VIEW [" & strQueryName & "]
AS " & strNewSQL
myquerydef.Execute
myquerydef.Close
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm