Look Up Renewals Dates In An Edit Parameters Form

Dec 8, 2006

Hello Everyone and Merry Christmas

I have a question I need my users to be able to enter a between statement into an Edit Parameters form I have created for them. The reason being is so that they can find out when employees are due for a renewal (which is every two years from their final suit date..for example if their final was done on 12/01/2006 then they would be due to renew 12/31/2008).
The code below allows them to look up final suit dates of individuals. I would like them to look up Renewals based on final suits. like: BETWEEN 12/01/2006 AND 12/31/2006. and get the results, does that make sense???



SELECT TM#, LASTNAME, FIRSTNAME, CONDITIONAL, DATEOFCONDITIONAL, FINALSUITDONE
FROM dbo.EmployeeGamingLicense
WHERE (FINALSUITDONE = @Enter_FINALSUITDONE)

View 2 Replies


ADVERTISEMENT

Want To Use Parameters To Filter For Dates Between Two (parameter, User-input) Dates

Mar 2, 2006

SQL 2005 Dev

How can I do this with Parameters? I can get a single parameter to filter for a single date (or even a combo list of the dates in DB). But I want my parameters to interact so that they specify a range. Is this possible?

View 3 Replies View Related

Help Again Edit Parameters From MDB To ADP

Jan 31, 2006

I need to convert this from Jet SqL to SQL Server. Moving out of an MDB to an ADP some of the queries I need to change over, I inherited this database and the bosses want all databases moved over from MDB to ADP.


SELECT Format$([Main Table].Date,'mmmm yyyy') AS [Date By Month], [Main Table].[Action Type], Count([Main Table].[Action Type]) AS [CountOfAction Type]
FROM [Main Table]
GROUP BY Format$([Main Table].Date,'mmmm yyyy'), [Main Table].[Action Type]
HAVING (((Format$([Main Table].[Date],'mmmm yyyy'))=[Enter the Month and the Year]));

View 1 Replies View Related

Crystal Reports Parameters From One Form To Other

Nov 16, 2007



hi friends,
i am having one crystal report from and one web application from which contains one crystal reportviewer i need to give the parameter in the web form and get the data for that parameter untill this its working fine for me.

my problem i need to display the value in the crystal report which i gave in the web form.

View 1 Replies View Related

Select Parameters With Dates

Jan 16, 2007

I have a sqlDataSource control that has its select command and parameters set dynamically.  One of the parameters is a date, which should be in smalldatetime format (ie, 12/22/2006).  Obviously, using SQL Server, the data is stored with both date and time.  The problem is, I cannot get any data selected.   I initially thought that I needed to tell it to only look at the date and not the time, but from what I have seen this should work. Here is the pertinent code. 
dim seldate as datetime
selDate = Session("ChosenDate")
Dim SelCmd As String = "SELECT [PatientName], [AssignedTo], [CPT], [CPT2], [HospitalID], [RoomNbr], [ACType], [TxDx1], [TxDx2], [MRNbr], [Notes], [PatientID], [PCPID], [ResidentID], [Status], [CaseID], [AdmitDate], [crtd_datetime] FROM [DailyBilling] WHERE ([crtd_datetime] = @crtd_datetime) and ([AssignedTo] = @AssignedTo) and ([HospitalID] = @HospitalID) ORDER BY [PatientName]"
SqlDataSource1.SelectCommand = SelCmd
SqlDataSource1.SelectParameters.Clear()
 
 
Dim parFilterProvider As New ControlParameter()
parFilterProvider.ControlID = "ddlProvider"
parFilterProvider.Name = "AssignedTo"
parFilterProvider.Type = TypeCode.String
SqlDataSource1.SelectParameters.Add(parFilterProvider)
 
 
Dim parFilterHospital As New ControlParameter()
parFilterHospital.ControlID = "ddlHospitals"
parFilterHospital.Name = "HospitalID"
parFilterHospital.Type = TypeCode.String
SqlDataSource1.SelectParameters.Add(parFilterHospital)
 
 
 
Dim parFilterStatus As New Parameter()
parFilterStatus.Name = "crtd_datetime"
parFilterStatus.DefaultValue = selDate.ToShortDateString
parFilterStatus.Type = TypeCode.DateTime
SqlDataSource1.SelectParameters.Add(parFilterStatus)
 
Gridview1.databind()
Any ideas?

View 5 Replies View Related

Passing DateDiff Rather Than Actual Dates As Parameters

Nov 29, 2005

I've gotten sort of fed up with dealing with regional date settings onthe client side and am considering the following scheme - justwondering if anyone has a negative view of it or not:Instead of@StartDate datetime,@EndDate datetimeUse:@StartDaysDiff int,@EndDaysDiff intIn the front end app take the desired date and do a DATEDIFF with thecurrent date, then pass the date diff as a parameter as an integerrather than deal with the dates at all.Then...DECLARE @TodayDate datetime, @StartDate datetime, @EndDate datetimeSELECT @TodayDate = GETDATE()SELECT @StartDate = DATEDIFF(DAY,@StartDaysDiff,@TodayDate)SELECT @EndDate = DATEDIFF(DAY,@EndDaysDiff,@TodayDate)SELECTa.SomethingFROMdbo.Appointments aWHEREa.AppointmentDate BETWEEN @StartDate and @EndDateJust wondering ...Thanks,lq

View 9 Replies View Related

Problem With Dates Format Passed As Parameters...

Jan 8, 2007

Hi,

I am having the "classical problem" of the forums; A local date changed to the american format (normally in the development environment) which I call "Switching months with days"... well it switches both again if you press "view report" again :)The problem I'm having is that when I Navigate from one report to other, the dates get switched... Everything's been set in the locale uk date format (dd/mm/aaaa), in the operating system, in the database and in the reports... and the reports are working properly through the web interface.. the only thing that is not working properly is the Navigation which switches the date month with the day...Changing all the Reporting Services server, database server to the american format date is not an acceptable solution. Thanks for any guidance on this, as I'm pretty lost...Jose

View 4 Replies View Related

Populate Dates For Parameters Based On A String Parameter

Jul 2, 2007

Hello,



My basic goal is to try to simplify inputs for the user. I have 3 parameters: Begin Date, End DAte and Duration. Duration will contain 3 choices: All, 2 Years and Range and is meant to give them a shortcut to dates as described below:

All - Would automatically populate the start date to 10/01/2005 and an end date to current date

2 Years - Would automatically populate the start date to current date minus 2 years, and the end date to current date.

Range - Would allow the user to select any dates as desired.



I'm able to get the dates to populate based on the duration field using non-queried values based on the Duration value, but the problem is that if I want to allow them to select Range the calendar control is not available and a text box is displayed.



I've tried to create some code in the properties that would populate, but I keep getting that this item is Read Only. The code I've created is as follows:

public function populateDates(Duration) as String

Select Case Duration
Case = "Range"
Report.Parameters!pBeginDate = Report.Parameters!pBeginDate
Report.Parameters!pEndDAte = Report.Parameters!pEndDAte
Case = "All"
Report.Parameters!pBeginDate = #10/01/2005#
Report.Parameters!pEndDAte = Now().Today
case = "Two"
Report.Parameters!pBeginDate = DateAdd("yyyy", -2, Now().Today)
Report.Parameters!pEndDAte = Now().Today
end select
end sub


My only goal is to give the User the 3 choices, but still keep the calendar control available, and I can't seem to do this?



suggestion please!

Thanks!

Maureen

View 6 Replies View Related

Need Help W/ Postback To 'Customers' Table On Form Using Select Query From 'Parameters' Table

Dec 20, 2007

I have set up a 'Parameters' table that solely stores all pre-assigned selection values for a webform. I customized a stored query to Select the values from the Parameters table. I set up the webform. The result is that the form1.apsx automatically populates each DropDownList task with the pre-assigned values from the 'Parameters' table (for example, the stored values in the 'Parameters' table 'Home', 'Business', and 'Other'  populate the drop down list for 'Type').
The programming to move the selected data from form1.aspx to a new table in the SQL database perplexes me. If possible, I would like to use the form1.aspx to Postback (or Insert) the "selected" data to a *new* column in a *new* table (such as writing the data to the 'CustomerType' column in the 'Customers' table; I clearly do not want to write back to the 'Parameters' table). Any help to get over this hurdle would be deeply appreciated.

View 1 Replies View Related

ReportServer URL Access : French Language Problem For Parameters (dates) After Installing SQL 2005 SP2

Mar 3, 2007

Hello,

We are using ReportServer URL Access. The parameters aren't pass into the URL, they have a default value and it's possible to change them by the "parameter toolbar". We are using datetime parameters with the very usefull calendar...

We are using a French version of : Windows (XP or W2K3), SQL2005+SP1 and VS2005 + SP1. It works fine, the calendar (for datetime parameter) is in French.

After installing the French SP2, the calendar is in English (w2k3 + VS2005 SP1). On a new installation (XP), with SQLExpress SP2 Advanced + Toolkit (in French), we have the same problem.

With this URL (solution 1), the calendar is in English (it was in French before the SP2):

http://localhost/Reportserver$SQLExpress?%2fProjet+de+rapport1%2fReport1&rs:Command=Render

But with this URL (solution 2), the calendar is in French :

http://localhost/ReportServer$SQLExpress/Pages/ReportViewer.aspx?%2fProjet+de+rapport1%2fReport1&rs%3aCommand=Render

In the documentation, we have to use solution 1 (but we have a problem). Is the solution 2 a possible "alternative" ?

Thanks for your help,

Frederic

View 2 Replies View Related

One Form To Update Different SQL Tables Based Upon Form Selection

Apr 16, 2008

Hello,
My company Intranet has a form that agents can use to post their comments about the company to upper management, but our customer service department would like to modify the form so that the agent has to pick from a comment type.
The dropdown options on the form will be as follows:
ComplimentsComplaintsGeneral CommentsSuggestions
Each dropdown option has a designated table in a SQL DB.Using postback on the same page, I need to change which fields of the form are visible based upon which dropdown selection the user chooses, and I need the fields to then be inserted into the table that corresponds with the dropdown selection item.
For example: If the Compliments dropdown selection is picked, I need a text box to show for the user's location, the name of the customer, account number, and the message box. Once the submit button is clicked, the characters in these boxes need to be inserted into the Compliments table using its data adapter.
However, if the user selects Suggestions, the name of the customer and the account number should not be visible, since these fields do not exist and when the submit button is pressed, the Suggestions table should be updated.
If you need more information, I will provide whatever is needed.
As always, thanks for everyone's assistance.
Chris

View 3 Replies View Related

How To Make The SSMSE To Return Whole Records Without Any Close Query Form And Re-create Query Form Operation?

Dec 25, 2007

Hi,
I got a problem.
I installed Microsoft SQL Server Management Studio Express 2005 version.
And I created a Compact database.
I created an connection in SSMSE to connect the database and opened a query form.
then, i run the following sql:

Select * from Table1

It returned 3 records to me.
After that, I used program to insert record into this table.
Then i ran this sql again, it still show me 3 records.
I closed the query form, and re-created a new query form, then run the sql, it returned 4 records to me.

Why? It's very strange and difficult to operate, right?
Is there anyone know how to make the SSMSE to return whole records without any close query form and re-create query form operation?

Thanks a lot!

And Merry X'max!!!

View 4 Replies View Related

First Form Normalizations And Second Form Normalization

Jul 19, 2006

Hi everyone,
What is the main difference between first form normalizations and second form normalization ?
In my opinion, they are both generated for the same operation which is to prevent redundancy(in other words; duplication of data in several records).
So would you please explain it to me ?

Thanks

View 1 Replies View Related

How Do I Bring In A Date Which Is In Integar Form Into A Databse As A Date Form.

Jul 23, 2005

HiI have a Platinum database which stores dates in integer form e.g the dateis formatted as below:Column_name Type Length Precision------------------------------ ------------------------------from_date int 4 10Some of the dates in the Platinum database are as follows:729115729359730059730241730302730455How can I bring them into SQL 2000 as valid dates.Thanks for your assistanceSam CJoin Bytes!

View 1 Replies View Related

T-SQL (SS2K8) :: Calculate Sum Of Dates Minus Repetitive Dates

Jul 18, 2014

Today I have got one scenario to calculate the (sum of days difference minus(-) the dates if the same date is appearing both in assgn_dtm and complet_dtm)/* Here goes the table schema and sample data */

IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[temp_tbl]') AND type in (N'U'))
DROP TABLE [dbo].[temp_tbl]
GO
CREATE TABLE [dbo].[temp_tbl](
[tbl_id] [bigint] NULL,
[cs_id] [int] NOT NULL,
[USERID] [int] NOT NULL,

[code]....

View 9 Replies View Related

T-SQL (SS2K8) :: Insert Into Table Dates In Between Two Dates

Feb 28, 2015

I have a table that has hotel guests and their start stay date and end stay date, i would like to insert into a new table the original information + add all days in between.

CREATE TABLE hotel_guests
(
[guest_name] [varchar](25) NULL,
[start_date] [date] NULL,
[end_date] [date] NULL,
[comment] [varchar](255) NULL

[code]...

View 7 Replies View Related

Comparing Dates With Today Dates

Jun 21, 2005

I want to know if there is a way to compare dates in the sql statement with dates that I input into a database and todays date.  the datatype that I'm using is smalldatetime.The statement I used is:Select Date from Table where Date > 'Today.now'I get an errorCould this be done or is there another approach?

View 1 Replies View Related

ADO.NET 2-VB 2005 Express Form1:Printing Output Of Returned Data/Parameters From The Parameters Collection Of A Stored Procedure

Mar 12, 2008

Hi all,
From the "How to Call a Parameterized Stored Procedure by Using ADO.NET and Visual Basic.NET" in http://support.microsft.com/kb/308049, I copied the following code to a project "pubsTestProc1.vb" of my VB 2005 Express Windows Application:


Imports System.Data

Imports System.Data.SqlClient

Imports System.Data.SqlDbType

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim PubsConn As SqlConnection = New SqlConnection("Data Source=.SQLEXPRESS;integrated security=sspi;" & "initial Catalog=pubs;")

Dim testCMD As SqlCommand = New SqlCommand("TestProcedure", PubsConn)

testCMD.CommandType = CommandType.StoredProcedure

Dim RetValue As SqlParameter = testCMD.Parameters.Add("RetValue", SqlDbType.Int)

RetValue.Direction = ParameterDirection.ReturnValue

Dim auIDIN As SqlParameter = testCMD.Parameters.Add("@au_idIN", SqlDbType.VarChar, 11)

auIDIN.Direction = ParameterDirection.Input

Dim NumTitles As SqlParameter = testCMD.Parameters.Add("@numtitlesout", SqlDbType.Int)

NumTitles.Direction = ParameterDirection.Output

auIDIN.Value = "213-46-8915"

PubsConn.Open()

Dim myReader As SqlDataReader = testCMD.ExecuteReader()

Console.WriteLine("Book Titles for this Author:")

Do While myReader.Read

Console.WriteLine("{0}", myReader.GetString(2))

Loop

myReader.Close()

Console.WriteLine("Return Value: " & (RetValue.Value))

Console.WriteLine("Number of Records: " & (NumTitles.Value))

End Sub

End Class

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
The original article uses the code statements in pink for the Console Applcation of VB.NET. I do not know how to print out the output of ("Book Titles for this Author:"), ("{0}", myReader.GetString(2)), ("Return Value: " & (RetValue.Value)) and ("Number of Records: " & (NumTitles.Value)) in the Windows Application Form1 of my VB 2005 Express. Please help and advise.

Thanks in advance,
Scott Chang

View 29 Replies View Related

Generate Dates Between Two Dates

Nov 8, 2006

Hi,

I have a table which records employees'time-off records. There are 6 columns in this TimeOff table. They are RequestID, EmpName, StartDate, EndDate, Type, NumofDays. I have another table which has all the dates from 01/01/1950 to 01/01/2056.

I am trying write a query which lists all the dates between the timeoff startdate and enddate, including the the start and end dates, but my query so far only lists the start and end date in a timeoff record:

SELECT D.[Date], Datename(dw,D.[Date]) AS Weekday
FROM Dates D LEFT JOIN TimeOff T ON D.[Date] = T.OffStartDate OR D.[Date] = T.OffEndDate
WHERE (OffType = 'Sick Day' AND EmpName = 'Cat White') AND (D.[Date] BETWEEN T.StartDate AND T.EndDate)

Any advice will be greatly appreciated!

View 1 Replies View Related

Getting Individual Dates Between 2 Dates

Mar 4, 2008

Has anyone ever written a function to retrieve all individual dates between two given dates? Using DATEDIFF I can get the number of days between two dates. However I need to iterate through the days to identify weekend and holiday dates. Has anyone ever written a function to do this?

So, if select datediff(d,'07/01/2007','07/15/2007') as NumOfDays returns 14, I'd need to iterate through the 14 days and get the weekends and holidays. Would I have to use a cursor to iterate through the days?

View 13 Replies View Related

Run Report By Different Parameters Without Having To Enter Information For All Parameters At Same Time

Oct 29, 2013

I have a SSRS report with four parameters,and I want to be able to enter information for two of the parameters and run the report opposed to all four of them. However, when I select allow blanks and only select the parameters that I want to run the report by, the report come back blank..Essentially, I want to be able to the run report by different parameters without having to enter information for all parameters at the same time.

View 2 Replies View Related

Edit Sql

Dec 7, 2006

Edski writes "Help please,
below is my sql query, when I run it, I get the right result with one problem. I get same customers with same email many times. I would only like the same customer shown one time. Checking it by email.


SELECT od.pName, od.dIndx AS dindx, od.pIndx AS pindx, od.device AS device, c.Cust_Id AS cust_id,

c.First_Name AS First_name,

c.Last_Name AS last_name, c.Email AS Email, c.Phone AS phone,c.company, h.productCode AS

product_code, DATEDIFF(dd, GETDATE(), h.expirationDate)

AS Difference, h.hotSyncId AS regcode, od.autorenewal AS autorenewal, od.installment AS

installment

FROM Orders_Detail od INNER JOIN

Hot_Sync_ID h ON od.dIndx = h.dIndx INNER JOIN

Customers c ON c.Cust_Id = h.cust_id

WHERE (od.prenewal ='False') and (od.autorenewal = 'no') and (c.newsletter <> 0) AND

(DATEDIFF(dd, GETDATE(), h.expirationDate) = '27') AND (c.company <> 'University of Alberta')

ORDER BY difference, c.Last_Name, h.productCode"

View 2 Replies View Related

How Can I Edit An SQL Database?

Oct 9, 2004

Hello,

I have been working in ASP.Net web sites with Access database.

Now I want to create a web site using an MS SQL database.

What software or softwares can I use to create and edit MS SQL databases?

I am using Windows XP Professional SP2.

Thank You,
Miguel

View 5 Replies View Related

Pb To Edit A Recordset With VB In A DTS

Nov 24, 2001

Hello,

I have some problems to edit a recordset in an ActiveX DTS using Vbscript.
Here is an example of the script :

dim varsql, varset, varconn
set varconn = CreateObject("ADODB.Connection")
set varset = CreateObject("ADODB.Recordset")
varconn.Open = "Provider=SQLOLEDB.1;Data Source=(local);Initial Catalog=Enregistrement3;user id = 'sa';password=''"

varsql = "SELECT * "
varsql = varsql & "FROM mytable "
varset.Open varsql, varconn, 3,3

msgbox "How much : " & varset.recordcount

if varset.recordcount >0 then
do while varset.eof
varset.edit
.........................
varset.update
varset.movenext
loop
end if
varset.close
varconn.close

Does someone see what is wrong ?
I allways get -1 for the varset.recordcount ! (I checked there are some records into the table).
I don't think it is a problem of user's right as it works with the same user configuration using a SQL action requery.
If I modify the open statement like this :
varset.Open varsql, varconn, 1
varset.recordcount contains the good number of records but the recordset is read noly and can't be modified...

Any Help will be very wellcome !
TIA

View 1 Replies View Related

How To Edit A SQL DB Via MS Access?

Aug 23, 2000

This is a basic, remedial question, but I've no experience whatsoever with SQL server or Access (although I'm familiar with basic DB concepts). Even so, I have inherited this project because no one else will take it (besides, I like the challenge of learning something new :-). If I understand correctly, I can use Access 2000 to create and edit DBs on my SQL 7 server, and to run queries. This is done by creating a WBEM ODBC connector (I have no idea how this is done). I'm pretty good at figuring things out on my own, but I sure would appreciate being pointed in the right direction. What I'd like to know is first of all, am I on the right track, and secondly, what do you all recommend as a good source of info on this topic (the Microsoft web site, technet, manuals?).

All info is greatly appreciated.

thanx,
-scott

View 3 Replies View Related

Edit Web Assistant Job

Oct 25, 2005

Where do I go to modify the T-SQL statement I entered while creating a job with the web assistant wizard?

View 1 Replies View Related

Last Edit Time?

Jul 23, 2005

How can i mark a row with its last edit time?With access it was obvious, in sqlserver?

View 1 Replies View Related

Edit .mdf Database

Jul 23, 2005

Greetings,Are there any tools freely available to modify or edit a .mdf databasefile? As far as seeing the actual tables?Regards,cd

View 6 Replies View Related

Edit Distance

Mar 18, 2008

Hi,
please, it is possible to know the edit distance used in the fuzzy lookup/grouping.
On this forum I read fuzzy lookup use 4-gram with fix size.
Does exist any document explaining how fuzzy lookup calculate the similarity? In other word, what kind of edit distance, algorithm is used by fuzzy lookup/grouping?
I hope I was enough clear with my poor english.
Thanks All

View 1 Replies View Related

Cannot Edit Jobs

Sep 3, 2007



Two days back we have installed SP2 on SQLServer2005 Active/Active Cluster which result in failure.

Only Database Services and Analysis Services where not updated and rest of the services got updated.

After a restart , the behaviour of SQLServer is helarious.

We got into lot of problem so we opened support from Microsoft.

One of the problem i forgot to mentioed to Microsoft was on editing the Job i cannot see anything inside,all the entries where empty closing the job window and opening it again i got all my entries back but on editing i got the below mentioned Error.
Error:
Creating an instance of the COM component with CLSID {E80FE1DB-D1AA-4D6B-BA7E-040D424A925C} from the IClassFactory failed due to the following error:c001f011(Microsoft.SqlServer.ManagedDTS)

If anyone faced the same problem and got any resolution please let me know.

Anyhelp will be appriciated.



View 2 Replies View Related

Many To Many Relationship - What's Best Way To Add/edit/delete

Aug 3, 2006

I have a many to many relationship I can design the table 2 ways:1) Category table (cat_id, cat_name, active) - cat_id as PKCategoryReq (cat_id, req_name) - cat_id & req_name as PK2)CategoryReq (req_name, cat_name) - req_name & cat_name as PKIf
I design 1st way. Then when they want to add and delete from the
CategoryRequest table, they would have to add to the category table
first. Then maybe build a list of checkboxes to select from. The one's
they check insert into the CategoryRequest table.Drawback of
this is that they can't edit the list on the fly. Since it may be used
by other request (since cat_id CategoryReq is fk into Category table)If I design it the 2nd way. Then they can edit, delete, add on the fly. But there won't be a master category list.Which way is better?

View 1 Replies View Related

How To Edit Stored Procedures ?

Apr 27, 2007

I have two questions:
 
1) Is it possible to rename a SQL table –or- copy the content of a table into a new table ?
 
2) How to replace the renamed or replaced table name inside the code of Stored Procedures that references it ?

View 2 Replies View Related

Edit SQL Identity Seed

Jan 9, 2004

Because of testing and deletion, my table of user groups starts at 15 or so. Now I want to insert a group for administrators but I would like to have the groupID be 1. I tried to turn off the identity seed property and insert it manually but that didn't work.

Is there any way to do this?

Thanks, Dave

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved