473,400 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,400 software developers and data experts.

how to check item sold ? date

hi, guy can anybody help me please to create a trigger.

example I have data:

ITEM.......QTY.......DATE
ABC........100......1-jan-2012
ABC........150......15-jan-2012

on 25 jan 2012, ABC sold out 120, so i want data above remain like this:

ITEM.......QTY.......DATE
ABC........0.........1-Jan-2012
ABC........30........15-Jan-2012

I'm new for oracle, please help me.

Thanks in advance.
Sorry for my bad English.
Mar 25 '12 #1
2 2070
debasisdas
8,127 Expert 4TB
Please post the code that you are working on for review by experts.
Mar 27 '12 #2
Rabbit
12,516 Expert Mod 8TB
You shouldn't do it that way. What you have there looks like a transaction history table. Leave that alone. If you want a know the balance of inventory, there are two methods. One is to calculate it from the transaction history, the other is to store it in a separate table. The former method has less discrepancies but is slower to calculate the inventory while the latter method has more chance for discrepancy but the inventory is readily available. If you go with the latter method, you will want to do a discrepancy check every so often to make sure the numbers are in line.
Mar 27 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: - | last post by:
what is the function to check whether a date, eg 2005-02-44, exists? in php, there is a checkdate() function.
2
by: David Fickbohm | last post by:
People, I am trying to determine the creation date of files in a folder. I am using the following code to find the folder and confirm that files exist in the folder. If someone could give me an...
2
by: DaveF | last post by:
I am using the following code to see if the image is there, is there a way to check the image date as well? Dim sTxt As String If strURL <> "" Then If Left(LCase(strURL), 7) <> "http://" Then...
44
by: user | last post by:
Hi, Let's say I have 2 dates in the b/m format: Date 1 and date 2 How do I check whether Date2 is later than Date 1? Date1. 21-Nov-2006 09:00:00 PM
9
by: User | last post by:
Hi, Assuming the date format is in 31-Feb-2006 <head> <script language="javascript"> function t() { mill=new Date(2006, 01, 31) ;
5
by: owz | last post by:
Hi again had some more problems, all help welcome. Access 2000, SQL My problem is as stated in the title. I want 2 display the highest and lowest priced car sold for this month. This is what I...
1
by: Iain | last post by:
Hi All I've 2 calendar controls on my web form - i need to check if Calender1 date selected is greater than Calender 2 date selected (and then display an error message) TIA iain
2
by: Andrew Poulos | last post by:
If I check for a invalid date e.g. February 30th, 2008? Andrew Poulos
2
by: KMEscherich | last post by:
Microsoft Access 2003 Hi there, am stuck with something that I am not sure on how to get done. I am attempting to have 3 check boxes and have 3 date fields. I need to have each date field be...
1
Soniad
by: Soniad | last post by:
Hi All, Is there any way in VBScript Array,where I can check if particular item is present in given array items. For Example : There is file extention I want to check. Dim StrFlExt ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.