Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

Wednesday, March 28, 2012

inventory FIFO

Hi,
I want to calculate inventory with FIFO METHOD. my tabel is :
inventory(doc char(10),tgl date, qty numeric(15,2), price
numeric(15,2))
doc tgl PRICE QTY
---
FP123 02/02/06 180 10
ASD12 07/02/06 -9
FP23 10/02/06 150 2
ASD14 11/02/06 -2
I want to result is as below:
doc tgl price qty
---
FP123 02/02/06 180 10
ASD12 07/02/06 180 -9
FP23 10/02/06 150 2
ASD14 11/02/06 180 -1
ASD14 11/02/06 150 -1
how to create sintak SQL SERVER ?
thank you for your advanced.
best regards,
alimIf I understand your problem correctly , the sybtax is;
SELECT doc,tgl,qty,price ORDER BY tgl ASC
Jack Vamvas
___________________________________
Receive free SQL tips - http://www.ciquery.com/sqlserver.htm
"alim" <alfen_lim@.yahoo.com> wrote in message
news:1141293436.115783.286230@.i40g2000cwc.googlegroups.com...
> Hi,
> I want to calculate inventory with FIFO METHOD. my tabel is :
> inventory(doc char(10),tgl date, qty numeric(15,2), price
> numeric(15,2))
> doc tgl PRICE QTY
> ---
> FP123 02/02/06 180 10
> ASD12 07/02/06 -9
> FP23 10/02/06 150 2
> ASD14 11/02/06 -2
> I want to result is as below:
> doc tgl price qty
> ---
> FP123 02/02/06 180 10
> ASD12 07/02/06 180 -9
> FP23 10/02/06 150 2
> ASD14 11/02/06 180 -1
> ASD14 11/02/06 150 -1
> how to create sintak SQL SERVER ?
> thank you for your advanced.
> best regards,
> alim
>|||hi jack,
cannot used syntax like :SELECT doc,tgl,qty,price ORDER BY tgl ASC
because
in tabel : ASD14 11/02/06 -2
I want to :
ASD14 11/02/06 180 -1
ASD14 11/02/06 150 -1
best regards,
alim|||Have you been over to www.dbazine.com and looked for my article on
inventory?

Sunday, February 19, 2012

Internet Replication

I am attempting to setup a publication where I'm replicating date between 2
sql 2000 servers via the internet. The snapshots are configured to be written
to ftp to be downloaded by the untrusted subscribers via ftp. I'm having
troubles with not having access to the distributor, this wasnt an issue until
I restricted access to RPC on the firewall seperating the
distributor/publication and the subscriber. The subscribers get the error
'the process could not connect to Distributor <SERVER>'
Is there a way to give access the distributor via ftp (or some other way)
and how is this done?
Do particular types of replication require access to the distributor (can I
get away with no distributor access)?
If I setup up an updating subscription, what is the best way to achieve an
updating subscription over the internet without a vpn?
Any help would be greatly appreciated.
-James
Nobody can help?
"James" wrote:

> I am attempting to setup a publication where I'm replicating date between 2
> sql 2000 servers via the internet. The snapshots are configured to be written
> to ftp to be downloaded by the untrusted subscribers via ftp. I'm having
> troubles with not having access to the distributor, this wasnt an issue until
> I restricted access to RPC on the firewall seperating the
> distributor/publication and the subscriber. The subscribers get the error
> 'the process could not connect to Distributor <SERVER>'
> Is there a way to give access the distributor via ftp (or some other way)
> and how is this done?
> Do particular types of replication require access to the distributor (can I
> get away with no distributor access)?
> If I setup up an updating subscription, what is the best way to achieve an
> updating subscription over the internet without a vpn?
> Any help would be greatly appreciated.
> -James