<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">
<title>Message</title>

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
h2
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        page-break-after:avoid;
        font-size:14.0pt;
        font-family:Arial;
        font-style:italic;}
h3
        {margin-top:12.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        page-break-after:avoid;
        font-size:13.0pt;
        font-family:Arial;}
h4
        {margin-top:3.0pt;
        margin-right:0cm;
        margin-bottom:3.0pt;
        margin-left:0cm;
        page-break-after:avoid;
        font-size:12.0pt;
        font-family:Arial;}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
p.MsoAutoSig, li.MsoAutoSig, div.MsoAutoSig
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
p.Code, li.Code, div.Code
        {margin-top:6.0pt;
        margin-right:0cm;
        margin-bottom:6.0pt;
        margin-left:17.85pt;
        punctuation-wrap:simple;
        text-autospace:none;
        font-size:12.0pt;
        font-family:"Courier New";}
span.emailstyle17
        {font-family:Tahoma;
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.emailstyle19
        {font-family:Tahoma;
        color:blue;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.EmailStyle21
        {font-family:Arial;
        color:navy;}
span.EmailStyle22
        {font-family:Arial;
        color:#993366;}
span.EmailStyle23
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Don’t you love these one-statement
solutions? I certainly do! AFAIC, the less logic in the FE the better. This is
one of the big wars I wage in the MySQL community, which seems to prefer just
the opposite </span></font><font size=2 color=navy face=Wingdings><span
style='font-size:10.0pt;font-family:Wingdings;color:navy'>J</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>All I want to do from Access is execute sprocs
and udfs &c. Let the logic reside in the sprocs, and ban table access. That’s
my approach in a nutshell. Then it doesn’t matter what FE they use, could
be Access, QA, </span></font><font size=2 color=navy face=Arial><span
 style='font-size:10.0pt;font-family:Arial;color:navy'>Delphi</span></font><font
size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:Arial;
color:navy'>, who cares. If you don’t have the keys you don’t get
in.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>A.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'> </span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> dba-sqlserver-admin@databaseadvisors.com
[mailto:dba-sqlserver-admin@databaseadvisors.com] <b><span style='font-weight:
bold'>On Behalf Of </span></b>Djabarov, Robert<br>
<b><span style='font-weight:bold'>Sent:</span></b> February 12, 2003 11:55 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
dba-sqlserver@databaseadvisors.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [dba-SQLServer]Do
Loop in a sproc</span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>

<p class=MsoNormal style='margin-left:36.0pt'><span class=EmailStyle22><font
size=2 color="#993366" face=Arial><span style='font-size:10.0pt'>Ooops…
it should be as this:</span></font></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><span class=EmailStyle22><font
size=2 color="#993366" face=Arial><span style='font-size:10.0pt'> </span></font></span></p>

<p class=MsoNormal style='margin-left:36.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>UPDATE
tblPrintCharges set ExceptionCode = left(ExceptionCode,len(ExceptionCode) - 1)
WHERE substring(ltrim(reverse(isnull(ExceptionCode, ‘ ‘))), 1, 1) =
‘,’</span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3 color=black
face=Tahoma><span style='font-size:12.0pt;font-family:Tahoma;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Djabarov, Robert <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, February 12, 2003
10:51 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
dba-sqlserver@databaseadvisors.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [dba-SQLServer]Do
Loop in a sproc</span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>UPDATE
tblPrintCharges set ExceptionCode = left(ExceptionCode,len(ExceptionCode) - 1)
WHERE charindex(‘,’, ltrim(reverse(ExceptionCode))) > 0</span></font></p>

<p class=MsoNormal style='margin-left:72.0pt'><span class=EmailStyle21><font
size=2 color=navy face=Arial><span style='font-size:10.0pt'> </span></font></span></p>

<p class=MsoNormal style='margin-left:72.0pt'><span class=EmailStyle21><font
size=2 color=navy face=Arial><span style='font-size:10.0pt'> </span></font></span></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Chris McIsaac
[mailto:cjm@haleyaldrich.com]<br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, February 12, 2003
9:41 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
dba-sqlserver@databaseadvisors.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [dba-SQLServer]Do
Loop in a sproc</span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'> </span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>This is
what I was afraid of.  In TSQL, there is something called a cursor that
allows you move through a set record by record, <br>
but the performance is horrible.  A better way...</span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'> UPDATE
tblPrintCharges set ExceptionCode = ExceptionCode + "18," where
EndServDate = '' <br>
 UPDATE tblPrintCharges set ExceptionCode = ExceptionCode +
"19," where CPT = ''<br>
 etc.</span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'><br>
</span></font><font size=2 color=blue face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:blue'> -- trim the final comma<br>
 UPDATE tblPrintCharges set ExceptionCode =
left(ExceptionCode,len(ExceptionCode) - 1) WHERE ExceptionCode IS NOT NULL AND
ExceptionCode <> ''</span></font></p>

<p class=MsoNormal style='margin-left:108.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-bottom:12.0pt;margin-left:144.0pt'><font
size=2 color=black face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;
color:black'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Mark Boyd
[mailto:MarkBoyd@mcbeeassociates.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 12 February 2003 10:18 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
dba-sqlserver@databaseadvisors.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [dba-SQLServer]Do
Loop in a sproc</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>Chris
–</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>The
code is as follows.</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>It was
written by another programmer about 7 years ago.</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>I’m
sure there is a better way to code this, but it needs to be finished by the end
of the day.</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>Set db
= CurrentDb()</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>Set
rstPrint = db.OpenRecordset("SELECT * FROM tblPrintCharges")</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>   
If rstPrint.EOF = False Then</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>       
rstPrint.MoveFirst</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>       
Do Until rstPrint.EOF = True</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
Me.txtStatus = "Processing record '" & rstPrint!PatientNo &
"'"</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
Me.Repaint</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
If Nz(rstPrint!EndServDate) = "" Then</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Edit</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint!ExceptionCode = rstPrint!ExceptionCode & "18,"</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Update</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
End If</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
If Nz(rstPrint!CPT) = "" Then</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Edit</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint!ExceptionCode = rstPrint!ExceptionCode & "19,"</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Update</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
End If</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
If Nz(rstPrint!BegServDate) = "" Then</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Edit</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint!ExceptionCode = rstPrint!ExceptionCode & "20,"</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Update</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>         
  End If</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
If Nz(rstPrint!Charge) = "" Then</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Edit</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint!ExceptionCode = rstPrint!ExceptionCode & "23,"</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>               
rstPrint.Update</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
End If</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>           
rstPrint.MoveNext</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>       
Loop</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>   
Else</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>       
MsgBox "There are no outstanding charges.", vbCritical, "No
Charges"</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=1 color=blue
face=Tahoma><span style='font-size:8.0pt;font-family:Tahoma;color:blue'>   
End If</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>If I
use the format you suggest, how do I specify the WHILE (condition = true)
without setting the recordset?</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>Can I
say WHILE tblPrintCharges.EOF = False … ?</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>Thanks,</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=2 color=blue
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:blue'>Mark</span></font></p>

<p class=MsoNormal style='margin-left:144.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>-----Original
Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Chris McIsaac
[mailto:cjm@haleyaldrich.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Wednesday, February 12, 2003
9:38 AM<br>
<b><span style='font-weight:bold'>To:</span></b>
dba-sqlserver@databaseadvisors.com<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [dba-SQLServer]Do
Loop in a sproc</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>The
format is...</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>WHILE
(condition = true)</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>BEGIN</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>   
</span></font><font size=2 color=blue face=Arial><span style='font-size:10.0pt;
font-family:Arial;color:blue'>-- do processing</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'>   
</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>END</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=2 color=blue
face=Arial><span style='font-size:10.0pt;font-family:Arial;color:blue'>Keep in
mind that a direct translation of programming logic from whatever to TSql may
not be the best way to go.  If you post what you are trying to do, people
may be able to give you an alternative to using a loop (which tend to be much
slower than set-based statements).</span></font></p>

<p class=MsoNormal style='margin-left:180.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-right:0cm;margin-bottom:12.0pt;margin-left:
216.0pt'><font size=2 color=black face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;color:black'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> Mark Boyd
[mailto:MarkBoyd@mcbeeassociates.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> 12 February 2003 9:26 AM<br>
<b><span style='font-weight:bold'>To:</span></b> SQLServerList<br>
<b><span style='font-weight:bold'>Subject:</span></b> [dba-SQLServer]Do Loop in
a sproc</span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>I am
converting VBA code to a stored procedure.</span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>This
code includes a pretty large Do Loop.</span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>Is it
possible to create a loop in a sproc?</span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>If
so, what is the format?</span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>Thanks,</span></font></p>

<p class=MsoAutoSig style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>Mark
Boyd</span></font></p>

<p class=MsoAutoSig style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>Sr.
Systems Analyst</span></font></p>

<p class=MsoAutoSig style='margin-left:216.0pt'><font size=2 color=black
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma;color:black'>McBee
Associates, Inc.</span></font></p>

<p class=MsoNormal style='margin-left:216.0pt'><font size=3 color=black
face="Times New Roman"><span style='font-size:12.0pt;color:black'> </span></font></p>

</div>

</body>

</html>