Archívum - Nov 4, 2002
Tárolt eljárás
Sziasztok,
Adott egy tárolt eljárás mssql alatt:
CREATE Procedure dbo.spwGetMachineLossByWeek
@PL varchar(1),
@Line varchar(1),
@Week int,
@HUF int,
@FIM int
As
select b.machine,
Sum(Cast(b.lost * p.price as decimal(15,2))) euro,
Sum(Cast(b.lost * p.price* @HUF as decimal(15,2))) huf,
Sum(Cast(b.lost * p.price* @FIM as decimal(15,2))) fim
from baandata b,
pec06.baan_data.baan_admin.price p
where Datepart( wk ,Cast((cast(ho as varchar)+'/'+cast(nap as varchar)+'/'+cast(ev as varchar)) as datetime)) = @Week
and b.component = p.component
and SUBSTRING(b.machine,2,1) = @PL
and SUBSTRING(b.machine,3,1) = @Line
group by b.machine
GO
A .php ami meghívja ezt:
$sql = "exec spwGetMachineLossByWeek '1','1','43','241','6' ";
$que = mssql_query($sql);
while ($row = mssql_fetch_row($que)){
print " $row[0] $row[1] $row[2]";
}
Kérdésem: miért nem addja át az értékeket web alatt?
Ha Query Analyzerrel futtatom, akkor simán megy...
???
köszi
z
■ Adott egy tárolt eljárás mssql alatt:
CREATE Procedure dbo.spwGetMachineLossByWeek
@PL varchar(1),
@Line varchar(1),
@Week int,
@HUF int,
@FIM int
As
select b.machine,
Sum(Cast(b.lost * p.price as decimal(15,2))) euro,
Sum(Cast(b.lost * p.price* @HUF as decimal(15,2))) huf,
Sum(Cast(b.lost * p.price* @FIM as decimal(15,2))) fim
from baandata b,
pec06.baan_data.baan_admin.price p
where Datepart( wk ,Cast((cast(ho as varchar)+'/'+cast(nap as varchar)+'/'+cast(ev as varchar)) as datetime)) = @Week
and b.component = p.component
and SUBSTRING(b.machine,2,1) = @PL
and SUBSTRING(b.machine,3,1) = @Line
group by b.machine
GO
A .php ami meghívja ezt:
$sql = "exec spwGetMachineLossByWeek '1','1','43','241','6' ";
$que = mssql_query($sql);
while ($row = mssql_fetch_row($que)){
print " $row[0] $row[1] $row[2]";
}
Kérdésem: miért nem addja át az értékeket web alatt?
Ha Query Analyzerrel futtatom, akkor simán megy...
???
köszi
z