Ok,I have had a chance to play around with this for a while and it revealed even more that is needed to do a valid comparison.
I have a wageclass that is made up of a number that looks like this
024*0*10044
024 is the class
*0* is placeholder
10044 is the julian date based on fiscal year...
Ok, I can see how this converts todays date to Julian but what about an existing database field that is used in a view?
Something like this???
declare @d datetime
select @d = employees_class.position_status_date
select datediff(dd,0,@d)
I have a date that I am wanting to convert to a Julian date to match up with another field that is stored in another table. I am having some problems seeing how this function from Novick Software works.
CREATE FUNCTION dbo.udf_DT_ToJulian (
@Date datetime -- Date to convert to Julian...
Hi JackVam.
I changed this to use a function rather than a sproc. Now I am able to get the data that I need but I am prompted twice for the same parameters that are in the main form. I thought that is what I was eliminating using this code.
Is this the code you are looking for:
Private Sub...
JackVam,
What do you mean by the call?
This data is called when the form opens. The main form is populated from a sproc. There is currently no VBA in this form.
Please clarify.
LNBruno,
I added this to MS Access Forum when I thought this is more of an Access thing that SQL Server possibly.
Here is what I added to the record source field in the properites of my subform. Is this not the right place to add this?
Me.Recordsource="Select * From dbo.PopulatePayTypesandHoursSummaryByDateRange(" & Me.EnterEmpNo & ", '" & Me.@EnterStartingCheckDate & "', '" & Me.@EnterEndingCheckDate &...
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[PopulatePayTypesandHoursSummaryByDateRange]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[PopulatePayTypesandHoursSummaryByDateRange]
GO
CREATE FUNCTION dbo.PopulatePayTypesandHoursSummaryByDateRange
(...
I have a function that I am calling in a subfomr. I am getting the error: Insufficient number of arguments were supplied for procedure or function.
When I run this in SQL it returns exactly what I want with the exact same parameters that I am entering in Access.
Please help.
Thanks
I managed to get this into Access but now I am getting the error: Insufficient number of arguments were supplied for procedure or function.
When I run this in SQL it returns exactly what I want with the exact same parameters that I am entering in Access. I will also add this one to the...
I created a table function and that allowed me to pass the parameters into the dataset that I needed. Now all I have to do is figure out how to call them in my Access form. Any suggestions?
Problem, I am prompted twice for the same parameters. It makes sense because both sprocs are using the same parameter information but it would be nice to find a way to pass that parameter so the end user does not have to enter it twice.
History:
I have a form that is populated with a stored...
This may be a crazy question, but I have been beating it around in my head for days as to how I would possibly do this.
Is there anyway to convert this into a view with a given date range that will change on execution of form?
Maybe there is a way that we can get this into a view, but I am not...
I got what I needed to do by placing the above items in a view verses a stored procedure. Once they were in the view I was able to link on the respective fields and retreive the data that I want with one prompt.
I am not sure that I follow you. I have a form that is based from a sproc. When the form is opened the user is prompted for the parameters. It populates fine but it just prompts twice for the same parameters. The second set is for a sub report that is created from a view. How do I get the...
I am not really familiar with using the HAVING clause. How would I incorporate that into my script? I still do not think that this will take care of the problem that I am having with being prompted mutlriple times for the parameter when called in MS Acces.. SQLSister was onto something...
I am calling this from an Access adp file. I have a form that I created which when launched prompts for parameters that populates the record set from the stored procedure.
Here is the sproc that I created:
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE PROCEDURE dbo.sp_PayTypesandHoursSummaryTtl
@EmpNo int
,@Year int
AS
SELECT DISTINCT
phptc.emp_id
, phptc.year
, phptc.pay_type
, pt.description
, NULL AS...
Thanks for the quick response. This gets me about half way. I thought I would be able to do this in two separate steps but maybe not.
Whole story:
I am creating a view that will hold this information.
CREATE VIEW dbo.vw_PayTypesandHoursSummaryTtl
AS
SELECT DISTINCT...
I have this query which sums the hours and gross earnings. I want to add TtlHours and TtlGrossEarnings to this same view but I am not sure how to do it. Seems like I should be able to do something like SUM(SUM(phptc.hours)) AS TtlHours being that is what I want as a result.
Here is the query...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.