Convert SQL Server stored procedure to Access Query -


To display in a gridview in ASP.NET + VB code, I am using the SQL Server stored procedure for one of my calculations +

Access database web.

  Optional process [dbo]. Set to declare [report] (@ year end, @ months ago), declare @d smalldatetime, declare @total int @dedmaltetetime set @d = cst (CAST (@ year year) + '-' + CAST (@ mantrant AS negotiation) + Small-time as '-1' set @total = datediff (day, @d, datead (month, 1, d)) set = x = cst (cst) (@ Year AS Vertical) + '-' + CST (MMS AS WARRAR) + '-' + CST (TTL AS Whoring) Sm @ R-Dedday Decimal (18, 3) @ R_perday case set = when @total = 31 then 2.471612 9 03 when @total = 30 then 2.554 when @total = 29 then 2.642068 9 66 when @total = 28 2.736428571 end; As L0 (Select C as 1 Select All Unions 1), L1 AS (Select 1 AS CFLL A A Cross JO NLB), L2A (L1A) Selection 1 AC to L1A Cross Join L1B), L3A (Select 1CCL2A Cross Join L2B), L4 AS (Select 1 ASCFLL3A Cross Joiner L 3b), Select as kamyno, Rank, Business, Name, Pl, Appt, Cat, Days_Absent, Days_Present, R_perday as Nums (Select ROW_NUMBER (more than L4) as Order (Selection 0)) From @R_perday I, - In case when Days_Absent = 0 then @ R_perday * any other @ C_Allce form R_perday * Days_Absent end Days_Present, @ C_Allce, as the case R_perday * Days_present when Days_Present & gt; = 20 then 38 when Days_Present & lt; = 9 then 0 when Days_Present & gt; = 10 then in the form of the 19th (kamyno Selection RC_Allce, Rank, Business, Name, Pl, Cat, Appt, CDPR, Count (D) Days_Absent, as the total count from @ (d) Days_Present * (Selection STAFF.kamyno, DATEADD (by day, I-1, rm.aut_tt) D. Staff, rank, staff, trade, staffing name, staff.apple, staff, apt, staff.cat, The CDRP I & lt; = 1 + DateDiff (Day, Rum.Out_dt, Rum.In_dt) and STAFF.kamyno = Rum.kamyno from Staff Number, Rum, STAFF) where one month (d) = @ month and year (d) ) = @ Year) by kamyno b group, [ray Select a kamyno with dot rum from a business name, trade, name, pl, cat, apt, cdpr union camino, [rank], trade, name, pl, cat, apt, cdpr, 0s day_abant, STAFF (month ( Out_dt) = @ month and year (Out_dt) = @ year) or (month (In_dt) = @ month and year (In_dt) = @ year) or @d Out_dt and In_dt between staff and .ORS & lt; = @dd) TEND  

I want to use the same calculation in an access query. How can this be done? I have tried a lot and have browsed and have done a lot, please help me.

I'm giving my table structure here with reference to some sample data.

The MS-Access 2003 Database Web is my two tables; STAFF and ABSENT .

  • In the table, the details of people working in the company are stored
  • ABSENT in the table, people The absence of the accumulation is done

I want to show a summary of the absence of employees in the selected month + year eg. August 2013, September 2013) with a dropdown list.

STAFF

  PNO name 214 Raju 365 Tamas 785 King 963 Sonu  Name of PSO Status Out- DT IN_DT 214 Raju Leap September 1, 2013 12 September 2013 365 Tam Out Out Duty September 5, 2013 10 September 2013 214  / Pre> 

I want it as output:

  PNO's name is currently absent ----------- --------- -------------- 214 Raju 15 15 365 Tamas 24 06 785 Raja 30 9 93 Sonu 30 0  


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -