|
|
@@ -1,29 +1,30 @@
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
|
<select>
|
|
|
<selectstr>
|
|
|
- SELECT
|
|
|
- bednetmx_partid,
|
|
|
- u_bednetmx_spring.bednetmxid,
|
|
|
- u_bednetmx_spring.springid,
|
|
|
- ISNULL(vv_spring.name, '') as springname,
|
|
|
- u_bednetmx_spring.spring_qty_width,
|
|
|
- u_bednetmx_spring.spring_qty_length,
|
|
|
- u_bednetmx_spring.fabrics1_mtrl_cost,
|
|
|
- u_bednetmx_spring.spring_mtrl_cost,
|
|
|
- u_bednetmx_spring.spring_mtrl_cost_replace_formula,
|
|
|
- u_bednetmx_spring.spring_weight_replace_formula
|
|
|
- From u_bednetmx_spring
|
|
|
-
|
|
|
- left outer join u_bednetmx on u_bednetmx.bednetmxid = u_bednetmx_spring.bednetmxid
|
|
|
- left outer join (
|
|
|
- SELECT u_spring.springid,
|
|
|
- left(rtrim(cast(u_spring.line_diameter as char(10))),4) + '/'+
|
|
|
- left(rtrim(cast(u_spring.height as char(10))),4) + '/'+
|
|
|
- left(rtrim(cast(u_spring.caliber as char(10))),4) + '/'+
|
|
|
- left(rtrim(cast(u_spring.center_diameter as char(10))),4) + '/'+
|
|
|
- left(rtrim(cast(u_spring.cyclenum as char(10))),4) as name
|
|
|
- FROM u_spring
|
|
|
- ) vv_spring on vv_spring.springid = u_bednetmx_spring.springid
|
|
|
+SELECT bednetmx_partid
|
|
|
+ ,u_bednetmx_spring.bednetmxid
|
|
|
+ ,u_bednetmx_spring.springid
|
|
|
+ ,ISNULL(vv_spring.name, '') AS springname
|
|
|
+ ,u_bednetmx_spring.spring_qty_width
|
|
|
+ ,u_bednetmx_spring.spring_qty_length
|
|
|
+ ,u_bednetmx_spring.fabrics1_mtrl_cost
|
|
|
+ ,u_bednetmx_spring.spring_mtrl_cost
|
|
|
+ ,u_bednetmx_spring.spring_mtrl_cost_replace_formula
|
|
|
+ ,u_bednetmx_spring.spring_weight_replace_formula
|
|
|
+FROM u_bednetmx_spring
|
|
|
+LEFT JOIN u_bednetmx ON u_bednetmx.bednetmxid = u_bednetmx_spring.bednetmxid
|
|
|
+LEFT JOIN (
|
|
|
+ SELECT u_spring.springid
|
|
|
+ ,CASE
|
|
|
+ WHEN springname <> ''
|
|
|
+ THEN springname
|
|
|
+ WHEN u_springtype.springtypecode <> ''
|
|
|
+ THEN rtrim(u_springtype.springtypecode) + '/' + left(rtrim(cast(u_spring.height_original AS CHAR(10))), 2) + '/' + left(rtrim(cast(u_spring.height AS CHAR(10))), 2) + '/' + left(rtrim(cast(u_spring.caliber AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.center_diameter AS CHAR(10))), 3) + '/' + left(rtrim(cast(u_spring.cyclenum AS CHAR(10))), 1) + '/' + left(rtrim(cast(u_spring.line_diameter AS CHAR(10))), 3) + '-' + left(rtrim(cast(u_spring.hardness AS CHAR(10))), 5)
|
|
|
+ ELSE left(rtrim(cast(u_spring.line_diameter AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.height AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.caliber AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.center_diameter AS CHAR(10))), 4) + '/' + left(rtrim(cast(u_spring.cyclenum AS CHAR(10))), 4)
|
|
|
+ END AS name
|
|
|
+ FROM u_spring
|
|
|
+ INNER JOIN u_springtype ON u_springtype.springtypeid = u_spring.springtypeid
|
|
|
+ ) vv_spring ON vv_spring.springid = u_bednetmx_spring.springid
|
|
|
</selectstr>
|
|
|
<where>
|
|
|
<when notnull="@arg_bednetmxid">
|