LOGO_Kasa Bakiyeleri Gözükmüyor
<p>CSHOTS tablosundan veri okuyor ve devirde dönemleri 2021 denildiği için cshots tablosunda day_ kolonu -365 gibi bir sayı yazıyordu. Aşağıda ki sorguyla sonuca ulaşıldı</p> <blockquote> <p><span style="font-size:11pt"><span style="font-family:Calibri,sans-serif"><span style="font-size:9.5pt"><span style="font-family:Consolas"><span style="color:fuchsia">UPDATE</span></span></span><span style="font-size:9.5pt"><span style="font-family:Consolas"> LG_005_01_CSHTOTS</span></span></span></span></p> <p><span style="font-size:11pt"><span style="font-family:Calibri,sans-serif"><span style="font-size:9.5pt"><span style="font-family:Consolas"><span style="color:blue">SET</span></span></span><span style="font-size:9.5pt"><span style="font-family:Consolas"> day_<span style="color:gray">=</span><span style="color:fuchsia">DATEDIFF</span><span style="color:gray">(</span><span style="color:fuchsia">Day</span><span style="color:gray">,</span><span style="color:red">'20200101'</span><span style="color:gray">,</span>date_<span style="color:gray">)+</span>1</span></span></span></span></p> <p> </p> <p><span style="font-size:11pt"><span style="font-family:Calibri,sans-serif"><span style="font-size:9.5pt"><span style="font-family:Consolas"><span style="color:blue">WHERE</span></span></span> </span></span></p> <p><span style="font-size:11pt"><span style="font-family:Calibri,sans-serif"><span style="font-size:9.5pt"><span style="font-family:Consolas"><span style="color:gray">(</span></span></span><span style="font-size:9.5pt"><span style="font-family:Consolas">CARDREF <span style="color:gray">=</span>4<span style="color:gray">)</span> </span></span></span></span></p> <p> </p> <p> </p> </blockquote>
0 Yorum