SELECT * FROM IN_inventorydat WHERE SITEID='50'
select * from site order by siteid

INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'01',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'02',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'03',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'06',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'07',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'10',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'11',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'19',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'50',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'51',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'52',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'53',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'54',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'55',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'56',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
/*INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'57',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'*/
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'58',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'59',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'61',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'62',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'63',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'64',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'65',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'66',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'67',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'68',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'69',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'70',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'71',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'72',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'73',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'
GO
INSERT INTO IN_INVENTORYDAT(INVTIDSKU,SITEID,STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK)
SELECT INVTIDSKU,'74',STOCKMIN,STOCKMAX,STOCKSTAR,QTYAVAIL,STARTDATEINV,ENDDATEINV,LASTINVFIS,AVGCOSTPEN,AVGCOSTUSD,STDCOSTPEN,STDCOSTUSD,LASTSTDCOSTPEN,LASTSTDCOSTUSD,SLS_PRICE,LASTDAYIN,LASTDAYOU,PRECLVID,INVTIDSTK,INVTIDNOSTK
FROM IN_INVENTORYDAT
WHERE SITEID='00057'

SELECT SLS_PRICE FROM IN_INVENTORYDAT WHERE SITEID='54' AND INVTIDSKU='100002              '
Exec ObtieneTipoCambioGeneralProc 10.32,'USD','PEN','2002/09/12','DIAVT',2
SELECT * FROM CURYRATE 