|
So if '20090501' is less than the first effective tarrif date, then there is no tarrif to be charged. Right? For example,Does this mean that on January 1, 2010 there will be a tarrif ?
I'm not sure what the problem is. Maybe you could list some sample data.
BTW: I've used effective dating logic for payroll where we had to determine what the pay rate was for an employee and we found that to make the algorithm simpler we always had a very large date as the final entry so that our query would always work.
For example, a new employee is hired on Jan 1, 2009 with a payrate of $10/hr
The effective payrate records looked something like this:
EffectiveFromDate 20090101
EffectiveToDate 29991231
Rate 10.00
Maybe that will help you with your algorithm.
|
|
|
|
|
David Mujica wrote:
So if '20090501' is less than the first effective tarrif date, then there is no tarrif to be charged. Right?
That is actually right. Like I said, I was having a dull moment, where I was thinking records earlier than the 1st tariff should default to the 1st tariff. I'll raise an error if the user tries to insert without a tariff.
On Jan 1 2010, the effective tariff will be the last tariff in the table. I only have one date to work with, e.g.
tariffid tariffdate tariff
1 2009-05-02 00:00:00 100
2 2009-05-04 00:00:00 150
3 2009-05-05 00:00:00 70
4 2009-05-10 00:00:00 90
You really gotta try harder to keep up with everyone that's not on the short bus with you.
- John Simmons / outlaw programmer.
|
|
|
|
|
you are disrupting the markets. We need more stability, not less.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
please can anyone help with out??
I'm trying to login to a window based application
developed with VB.NET and after entering
my username and password on the login page,
i saw the following error message after waiting
for some time;
A connection was successfully established with the server,
but then an error occured during the pre-login handshake.
(Provider:TCP provider, error 0 - The specified network
name is no longer available) Source: .NET sqlclient Data Provider
someone help me out
Jondo
|
|
|
|
|
I suspect someone moved your server or changed the IP. Unless you are using express/lite/local version in which case the local DB may not have been deployed with the app.
What version of SQL Server are you using. Is the developer of the VB app available to annoy?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i'm using SQL SERVER 2005 enterprise edition
and no has moved de server
and besides other computers that
are connected to the server are
all working apart from this particular
one.
|
|
|
|
|
so take that computer out and ....
Sorry couldn't resist. I have never run across a "pre login handshake" error before but I guess it may be a network issues, especially as it is isolated. May be some config on that PC.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hi every one ,,,
How do i insert and retrive images in a sql server database 2000 or 2005???
thanks in advance.
|
|
|
|
|
|
Hi ,
I am using VB.NET2005 with Ms Access database(c:\aa\aa.mdb). But i have upgraded the ms office to 2007 now.
Now when I access the database without password works fine.Bit if I give a password...it shows the error, something like
"couldn't find installable ISAM"
My connection string is
"microsoft.ACE.OLEDB.12.0;Data Source=c:\aa\db1.mdb;jet OLEDB;Database Password=abc;"
Could anyone please show me a way to solve the problem.
thanks in advance
-----------------------------
I am a beginner
|
|
|
|
|
This is because your Connection Sting is not correctly done.
I once had the Problem and i found help and shared it in this Forum, please google before you post there are plenty of solution to this problem.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi.
I've created this program[^] some days ago. (I've had WinXP and SQLExpress 2008 then)
It works on XP well , but when I wanna run it on Vista SP1 Ultimate this error[^] occurred.
and there is a link in the error window http://oca.microsoft.com/en/dcp20.asp[^]
What's wrong ?
Could you guide me ?
Thanks
PS : I've installed SQLExpress 2008 on Vista
|
|
|
|
|
I dont know if there are any perl programmers here, but im looking for some testers in my creation of my project. It an flat file style database that uses SQL queries to access data thats stored. If you would like to help drop by. http://ffdperl.sourceforge.net
|
|
|
|
|
How can I check if a column has a constraint on it through SQL code please?
Thanks for your help
|
|
|
|
|
|
Hi Everyone,
I used the below stored procedure to delete a single record in a table in MySql.
Procedure:
DELIMITER $$
DROP PROCEDURE IF EXISTS `healthtour`.`USP_User_DeleteUserRole`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `USP_User_DeleteUserRole`
(
IN UserRoleID INT
)
BEGIN
DELETE FROM HT_UserRole WHERE UserRoleID = UserRoleID;
END$$
DELIMITER ;
Problem:
I run this procedure as below,
CALL USP_User_DeleteUserRole(2);
I have the records in my table for the UserRoleID 10. And i don't have the records for the UserRoleID 2. If I give the input(UserRoleID 2) then the record 10 is deleted. It should not be deleted. Because i gave the input 2 and not 10.
Please can anybody help me?.
Thanks,
-Periyasamy Ramachandiran
|
|
|
|
|
|
Hi,
Yes I found the error that i have used the same name for both table column name and the variable name. Just i changed the variable name. Now it works fine.
Thank u very much.
-Periyasamy Ramachandiran.
|
|
|
|
|
hi,
i can some speak english. so i hope you understand me.
my question;
how to i measuring to database performance? are there tools for database performance?
best regards.
|
|
|
|
|
Hi,
I am Writing an sql that returns a single record which is row from a table. In the same sql i would like to traverse through the columns of this row. How can I do that? Is it possible to access the columns in SQL through indexing for example like column[1]?
Thanks for your time and help
|
|
|
|
|
You cannot refer to a column by it's ordinal (1) in SQL unless you use dynamic SQL in which case you look up the column name from the schema view and build a string to execute.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
thanks for your reply. I am using Dynamic Sql but the problem is that I don't know the name of the column to fetch for, thats why I was trying to find a way similar to indexing.Is there a way?
|
|
|
|
|
Take a look into the information schema views (under system views in Management Studio) INFORMATION_SCHEMA.COLUMNS is the one you want
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi All,
I am new in MySQL Database. Can anybody give sample stored procedure for Insert Query with "Exception handling".
Please...
Thanks,
Easton.
|
|
|
|
|
You do know that there is a MySQL forum, right?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|