Can't get JSF scriplet value.

Hi all...
I have a problem here when i'm applying EJB with JSF.
Here is my code.
EJB project
package com.ejb;
import javax.ejb.Remote;
@Remote
public interface daoCalculator {
     String getMessage();
package com.ejb;
import javax.ejb.Stateful;
import com.ejb.daoCalculator;
public @Stateful
class daoCalculatorBean implements daoCalculator {
     public daoCalculatorBean() {
     public String getMessage() {
          if ((Math.random() * 10) > 5) {
               return "Hello EJB World~!";
          } else
               return "THis is not 0 !";
_This is the JSF managed bean_
package com.web;
import javax.faces.event.ActionEvent;
import com.ejb.*;
import javax.ejb.*;
* @author samuel
public class intCalculator {
     @EJB (name="daoCalculatorBean/remote") private daoCalculator cart;
     String text;
     String text2;
     String text3;
     public intCalculator() {
     /*     try {
               InitialContext ctx = new InitialContext();
               cart = (daoCalculator) ctx.lookup("daoCalculatorBean/remote");
          } catch (Exception n) {
               System.out.println(n);
     public String getText3() {
          return text3;
     public void setText3(String text3) {
          this.text3 = text3;
     public String getText2() {
          return text2;
     public void setText2(String text2) {
          this.text2 = text2;
     public String getText() {
          return text;
     public void setText(String text) {
          this.text = text;
     public void present(ActionEvent e) {
          text = cart.getMessage();
          text2 = cart.getMessage();
}In my web-page(presentation layer), I'm able to get EJB function's value.
But i can't use scriplet to retrieve "#{intCalculator.text3}".
This is weird, because i can get this value if just apply Dynamic Web Project without EJB project.
Did anyone face the same problem? Please kindly advice or share experience.
Thanks in advance :)

Hi...
I think i shall explain my program.
Actually I'm trying to implement JSF + EJB together.
Initially, I just implement JSF and everything works fine. In managedBean (using session scope), i can create getter & setter with functions also and these items are retrievable in my JSP page with scirplet only ---> "#{managedBean.variableORfunction}"
But this no longer happen with I implement EJB into it.
here is the extra code for JSP side.
<%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<f:view>
     <h:panelGrid border="1" columns="2">
          <h:outputText value="1st"></h:outputText>
          <h:inputText value="#{intCalculator.text }"></h:inputText>
          <h:outputText value="2nd"></h:outputText>
          <h:inputText value="#{intCalculator.text2 }"></h:inputText>
          <h:outputText value="3rd"></h:outputText>
          <h:inputText value="#{intCalculator.text3}"></h:inputText>
     </h:panelGrid><h:form>
          <h:commandButton value="Press Me Pls~!" actionListener="#{intCalculator.present}"></h:commandButton>
          <h:commandButton value="Go Next Page~!" action="welcome"></h:commandButton>
     </h:form>
</f:view>
</body>
</html>Usually if we implement only JSF, then intCalculator will be in the managed bean, text, text2, text3 will be in intCalculator with getter & setter. And in JSP page as above, we just need to place as above code. When the button "Press Me Pls~!" is trigger(press), then it shall redirect to the same page(because as above this button does not direct to any other page) and show the above text,text2 and text3 values right? (I mean if i just implement JSF only).
Example:- if i type as below (ps: This is only with JSF)
text = "Hello"
text2 = "EJB"
text3 = "JSF"
then, it shall display in the textfields with the above values.(because it already store in intCalculator managedbean when button is pressed)
But the problem occur when i implement EJB + JSF together. (ps: EJB + JSF)
the managedBean seems like lost function. It couldn't store the value into the getter & setter in my managedBean.
Fyi, I can call the function from sessionBean(EJB). (just try to prove that JNDI lookup is well done)
I suspect the sessionBean(EJB) already created a sessionID and cause the managedBean session scope does not performing well. Is this possible? Is there any better approach for this solution?
THanks for all of your time =D
Do share experience if meet this kind of cases before. =D

Similar Messages

  • How can i get the all values from the Property file to Hashtable?

    how can i get the all values from the Property file to Hashtable?
    ok,consider my property file name is pro.PROPERTIES
    and it contain
    8326=sun developer
    4306=sun java developer
    3943=java developer
    how can i get the all keys & values from the pro.PROPERTIES to hashtable
    plz help guys..............

    The Properties class is already a subclass of Hashtable. So if you have a Properties object, you already have a Hashtable. So all you need to do is the first part of that:Properties props = new Properties();
    InputStream is = new FileInputStream("tivoli.properties");
    props.load(is);

  • How can i get all these values in single row with comma separated?

    I have a table "abxx" with column "absg" Number(3)
    which is having following rows
    absg
    1
    3
    56
    232
    43
    436
    23
    677
    545
    367
    xxxxxx No of rows
    How can i get all these values in single row with comma separated?
    Like
    output_absg
    1,3,56,232,43,436,23,677,545,367,..,..,...............
    Can you send the query Plz!

    These all will do the same
    create or replace type string_agg_type as object
    2 (
    3 total varchar2(4000),
    4
    5 static function
    6 ODCIAggregateInitialize(sctx IN OUT string_agg_type )
    7 return number,
    8
    9 member function
    10 ODCIAggregateIterate(self IN OUT string_agg_type ,
    11 value IN varchar2 )
    12 return number,
    13
    14 member function
    15 ODCIAggregateTerminate(self IN string_agg_type,
    16 returnValue OUT varchar2,
    17 flags IN number)
    18 return number,
    19
    20 member function
    21 ODCIAggregateMerge(self IN OUT string_agg_type,
    22 ctx2 IN string_agg_type)
    23 return number
    24 );
    25 /
    create or replace type body string_agg_type
    2 is
    3
    4 static function ODCIAggregateInitialize(sctx IN OUT string_agg_type)
    5 return number
    6 is
    7 begin
    8 sctx := string_agg_type( null );
    9 return ODCIConst.Success;
    10 end;
    11
    12 member function ODCIAggregateIterate(self IN OUT string_agg_type,
    13 value IN varchar2 )
    14 return number
    15 is
    16 begin
    17 self.total := self.total || ',' || value;
    18 return ODCIConst.Success;
    19 end;
    20
    21 member function ODCIAggregateTerminate(self IN string_agg_type,
    22 returnValue OUT varchar2,
    23 flags IN number)
    24 return number
    25 is
    26 begin
    27 returnValue := ltrim(self.total,',');
    28 return ODCIConst.Success;
    29 end;
    30
    31 member function ODCIAggregateMerge(self IN OUT string_agg_type,
    32 ctx2 IN string_agg_type)
    33 return number
    34 is
    35 begin
    36 self.total := self.total || ctx2.total;
    37 return ODCIConst.Success;
    38 end;
    39
    40
    41 end;
    42 /
    Type body created.
    [email protected]>
    [email protected]> CREATE or replace
    2 FUNCTION stragg(input varchar2 )
    3 RETURN varchar2
    4 PARALLEL_ENABLE AGGREGATE USING string_agg_type;
    5 /
    CREATE OR REPLACE FUNCTION get_employees (p_deptno in emp.deptno%TYPE)
    RETURN VARCHAR2
    IS
    l_text VARCHAR2(32767) := NULL;
    BEGIN
    FOR cur_rec IN (SELECT ename FROM emp WHERE deptno = p_deptno) LOOP
    l_text := l_text || ',' || cur_rec.ename;
    END LOOP;
    RETURN LTRIM(l_text, ',');
    END;
    SHOW ERRORS
    The function can then be incorporated into a query as follows.
    COLUMN employees FORMAT A50
    SELECT deptno,
    get_employees(deptno) AS employees
    FROM emp
    GROUP by deptno;
    ###########################################3
    SELECT SUBSTR(STR,2) FROM
    (SELECT SYS_CONNECT_BY_PATH(n,',')
    STR ,LENGTH(SYS_CONNECT_BY_PATH(n,',')) LN
    FROM
    SELECT N,rownum rn from t )
    CONNECT BY rn = PRIOR RN+1
    ORDER BY LN desc )
    WHERE ROWNUM=1
    declare
    str varchar2(32767);
    begin
    for i in (select sal from emp) loop
    str:= str || i.sal ||',' ;
    end loop;
    dbms_output.put_line(str);
    end;
    COLUMN employees FORMAT A50
    SELECT e.deptno,
    get_employees(e.deptno) AS employees
    FROM (SELECT DISTINCT deptno
    FROM emp) e;
    DEPTNO EMPLOYEES
    10 CLARK,KING,MILLER
    20 SMITH,JONES,SCOTT,ADAMS,FORD
    30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
    CREATE OR REPLACE FUNCTION concatenate_list (p_cursor IN SYS_REFCURSOR)
    RETURN VARCHAR2
    IS
    l_return VARCHAR2(32767);
    l_temp VARCHAR2(32767);
    BEGIN
    LOOP
    FETCH p_cursor
    INTO l_temp;
    EXIT WHEN p_cursor%NOTFOUND;
    l_return := l_return || ',' || l_temp;
    END LOOP;
    RETURN LTRIM(l_return, ',');
    END;
    COLUMN employees FORMAT A50
    SELECT e1.deptno,
    concatenate_list(CURSOR(SELECT e2.ename FROM emp e2 WHERE e2.deptno = e1.deptno)) employees
    FROM emp e1
    GROUP BY e1.deptno;
    DEPTNO EMPLOYEES
    10 CLARK,KING,MILLER
    20 SMITH,JONES,SCOTT,ADAMS,FORD
    30 ALLEN,WARD,MARTIN,BLAKE,TURNER,JAMES
    CREATE OR REPLACE TYPE t_string_agg AS OBJECT
    g_string VARCHAR2(32767),
    STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
    RETURN NUMBER,
    MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
    value IN VARCHAR2 )
    RETURN NUMBER,
    MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
    returnValue OUT VARCHAR2,
    flags IN NUMBER)
    RETURN NUMBER,
    MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
    ctx2 IN t_string_agg)
    RETURN NUMBER
    SHOW ERRORS
    CREATE OR REPLACE TYPE BODY t_string_agg IS
    STATIC FUNCTION ODCIAggregateInitialize(sctx IN OUT t_string_agg)
    RETURN NUMBER IS
    BEGIN
    sctx := t_string_agg(NULL);
    RETURN ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIAggregateIterate(self IN OUT t_string_agg,
    value IN VARCHAR2 )
    RETURN NUMBER IS
    BEGIN
    SELF.g_string := self.g_string || ',' || value;
    RETURN ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIAggregateTerminate(self IN t_string_agg,
    returnValue OUT VARCHAR2,
    flags IN NUMBER)
    RETURN NUMBER IS
    BEGIN
    returnValue := RTRIM(LTRIM(SELF.g_string, ','), ',');
    RETURN ODCIConst.Success;
    END;
    MEMBER FUNCTION ODCIAggregateMerge(self IN OUT t_string_agg,
    ctx2 IN t_string_agg)
    RETURN NUMBER IS
    BEGIN
    SELF.g_string := SELF.g_string || ',' || ctx2.g_string;
    RETURN ODCIConst.Success;
    END;
    END;
    SHOW ERRORS
    CREATE OR REPLACE FUNCTION string_agg (p_input VARCHAR2)
    RETURN VARCHAR2
    PARALLEL_ENABLE AGGREGATE USING t_string_agg;
    /

  • How can I get the edited value from the editor in JTable

    I have a JTextField added as an editor to a cell in JTable.
    I value gets changed when I press enter.
    but in actionPerformed of the JTextField when I say
    String txtEditorValue = txtEditor.getText();
    I am getting the old value. How can I get the edited value? Thanks.

    Hi,
    I guess, your understanding of how JTable works together with its models is not good enough - for example the method getTableCellEditorComponent(...) of the TableCellEditor interface is used to get the component, that should be used as editing component - its second parameter is a value that should be used to setup the editing component - it is normally not the editing component itself.
    JTable uses an underlying TableModel to store the cell values - if you have edited a cell, JTable gets the value of the editing component by itself and stores it in the TableModel using its setValueAt(...) method. To retrieve this data you only need to query the TableModel using row and column of this cell as parameters
    say jt is your JTable, and row and column are the row and column of the cell - so to get the value, simply use
    Object obj = jt.getModel().getValueAt(row,column);
    if you know, that there is a String in this cell use
    String str = (String) jt.getModel().getValueAt(row,column);
    The editor component is used for the view of the JTable - you only want the data, which is stored in the model - you don't have to deal with the GUI components in this case.
    greetings Marsian

  • How Can I get multi column values from dynamic search help?

    Hi Gurus;
    I'm using dynamic search help in my program.
    I want to get multi column values from search help. But I dont know solution for this issue.
    I'm using F4IF_INT_TABLE_VALUE_REQUEST FM.
    How Can I get multi column values from dynamic search help?
    Thanks.

    Believe it or not, the same FM worked for me in a dynpro. I will try to explain here how it works in custom screen and then you can do your work for other screens or program types. I am not going to write my actual work but will explain in general.
    I have 4 fields (FLD1, FLD2, FLD3, FLD4) and i made the search based on FLD2 and when user click on a line (could be any field), then this would bring the line on to the screens.
    There are like 3 steps.
    You have your value_tab for my fields FLD1, FLD2, FLD3 and FLD4. This is just the data that we pass into the FM. (data: IT_VALTAB type table of ZVAL_TABLE)
    Next map the screen fields into an internal table (data: It_dynpfld type table of dselc ). I also have other internal tables defined  (just to keep it straight, i will be putting here) data:  It_return type standard table of ddshretval.
    Next step is to call the function module. Make sure you have values in IT_VALTAB.
    call function 'F4IF_INT_TABLE_VALUE_REQUEST'
    exporting
            retfield        = 'FLD2'
            value_org       = 'S'
          tables
            value_tab       = It_VALTAB
            return_tab      = It_return
            dynpfld_mapping = It_dynpfld
          exceptions
            parameter_error = 1
            no_values_found = 2
            others          = 3.
        if sy-subrc <> 0.
          message id sy-msgid type sy-msgty number sy-msgno
          with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        else.
          perform get_selected_fields tables It_return.
        endif.
    The code within the perform GET_SELECTED_FIELDS  - We need to map the result fields after user selects it. The code goes like this. This is step is to update the dynpro fields.
    I need a internal table as well as a work area here. like,
    data: lt_fields type table of dynpread,
            la_fields type dynpread.
      field-symbols: <fs_return> type ddshretval.
    so fill out LT_FIELDS from the IT_RETURN table
    loop at lt_return assigning <fs_return>.
        la_fields-fieldname = <fs_return>-retfield.
        la_fields-fieldvalue = <fs_return>-fieldval.
        append la_fields to lt_fields.
        clear: la_fields.
      endloop.
    Call the FM to update the dynpro
    call function 'DYNP_VALUES_UPDATE'
        exporting
          dyname               = sy-repid
          dynumb               = '1002' "This is my screen number. You could use 1000 for selection screen (hope so)
        tables
          dynpfields           = lt_fields
        exceptions
          invalid_abapworkarea = 1
          invalid_dynprofield  = 2
          invalid_dynproname   = 3
          invalid_dynpronummer = 4
          invalid_request      = 5
          no_fielddescription  = 6
          undefind_error       = 7
          others               = 8.
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    good luck

  • How can I get the default value of a particular preference programatically. I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=702631&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have a problem with my bookmarks, cookies, history or settings
    == Description
    ==
    How can I get the default value of a particular preference in FireFox?.
    I know I can see the default value for some of the preferences in about:config but, I need a programatic way to get the default value.
    I see some that there are values for preferences in firefox.cs but I am not certain that these are being used as the default values for preferences. prefs.js in user's profile only has the updated values and not the default values.
    Any help towards acheiving this programtically is greatly appreciated.
    If the default values are stored in a file, kindly let me know the format in which it is stored for me to parse it programatically.
    == User Agent
    ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)

    Dear Friend,
    Here when you have the callableSattement as ?=proc(?), the first ? is an output parameter. So you should register it as out parameter using registeroutparameter.
    Then you can get the value from the outparameter using callablestatement.getXXX().
    Try that way.
    For free tral versions of JDBC Drivers go to www.Atinav.com

  • How can i get the parent value by sum of the child value of billing of material by using with cte

    I want to sum every parent recursively to the top of parent for example
    So far i got all relation between parent and child
    but I can t get the sum value of all parent in every levels ,
    This is what i get so far 
     WITH EmpCTE( MS_ID ,  MMS_ID , Qty , FLG , lvl)
                        AS
                        SELECT        Child_Code, Parent_Code , Cast(1 as float) ,  GSS_HR_COSTRELATION.FLG  , 0 AS lvl
                        FROM            GSS_HR_COSTRELATION
                        WHERE Child_Code  =  '01'
                        UNION ALL
                        SELECT        Child_Code, Parent_Code , Cast(1 as float) , E.FLG  , M.lvl + 1
                        FROM            GSS_HR_COSTRELATION AS E
                        JOIN EmpCTE AS M  ON E.Parent_Code = M.MS_ID WHERE  E.FLG is null
                        SELECT  A.Cost_ID , MS_ID  , A.Cost_CODE , A.Cost_name ,  MMS_ID , FLG , ISNULL(A.TOTAL , 0) As Cost , Cast(A.month AS nvarchar) As month , lvl From EmpCTE  LEFT join
                        SELECT  Cost_ID , Cost_CODE , Cost_Name ,  Sum(QTY*PRICE) AS TOTAL ,month(DateCreated) AS month
                        FROM            GSS_HR_COSTCENTER LEFT JOIN
                        GSS_AC_WTHDRAW ON GSS_HR_COSTCENTER.Cost_ID = GSS_AC_WTHDRAW.line_id
                        GROUP BY Cost_ID , Cost_Name , Cost_CODE ,month(DateCreated) ) A ON A.Cost_code = EmpCTE.MS_ID Order by lvl , A.Cost_CODE
    Thanks
    I am using Sql server 2012 
    this is my script of my database (include data)
    USE [SMEDB]
    GO
    /****** Object:  Table [dbo].[GSS_AC_WTHDRAW]    Script Date: 11/23/2014 3:31:31 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[GSS_AC_WTHDRAW](
    [MATID] [int] IDENTITY(1,1) NOT NULL,
    [MATNO] [nvarchar](50) NULL,
    [STPRICE_ID] [int] NULL,
    [MS_CD] [nvarchar](50) NULL,
    [QTY] [decimal](16, 2) NULL,
    [PRICE] [float] NULL,
    [DateCreated] [datetime] NULL,
    [Name] [nvarchar](50) NULL,
    [DeptID] [int] NULL,
    [CreatedID_by] [int] NULL,
    [JvHeader_ID] [int] NULL,
    [line_id] [int] NULL,
    [createby] [nvarchar](50) NULL,
     CONSTRAINT [PK_GSS_AC_WTHDRAW] PRIMARY KEY CLUSTERED 
    [MATID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[GSS_HR_COSTCENTER]    Script Date: 11/23/2014 3:31:31 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[GSS_HR_COSTCENTER](
    [Cost_ID] [int] IDENTITY(1,1) NOT NULL,
    [Cost_code] [nvarchar](50) NOT NULL,
    [Cost_name] [nvarchar](50) NULL,
    [Dept_ID] [int] NULL,
    [DeptGroup_ID] [int] NULL,
     CONSTRAINT [PK_GSS_HR_COSTCENTER] PRIMARY KEY CLUSTERED 
    [Cost_code] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO
    /****** Object:  Table [dbo].[GSS_HR_COSTRELATION]    Script Date: 11/23/2014 3:31:31 PM ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    CREATE TABLE [dbo].[GSS_HR_COSTRELATION](
    [Relation_ID] [int] IDENTITY(1,1) NOT NULL,
    [Child_Code] [nvarchar](50) NULL,
    [Parent_Code] [nvarchar](50) NULL,
    [FLG] [int] NULL
    ) ON [PRIMARY]
    GO
    SET IDENTITY_INSERT [dbo].[GSS_AC_WTHDRAW] ON 
    INSERT [dbo].[GSS_AC_WTHDRAW] ([MATID], [MATNO], [STPRICE_ID], [MS_CD], [QTY], [PRICE], [DateCreated], [Name], [DeptID], [CreatedID_by], [JvHeader_ID], [line_id], [createby]) VALUES (1002, N'1411-0130', 1385, N'9101101', CAST(200.00 AS Decimal(16, 2)), 18,
    CAST(0x0000A3DB00000000 AS DateTime), N'0', 13, NULL, NULL, 49, NULL)
    INSERT [dbo].[GSS_AC_WTHDRAW] ([MATID], [MATNO], [STPRICE_ID], [MS_CD], [QTY], [PRICE], [DateCreated], [Name], [DeptID], [CreatedID_by], [JvHeader_ID], [line_id], [createby]) VALUES (1003, N'1411-0130', 1466, N'910201', CAST(50.00 AS Decimal(16, 2)), 18, CAST(0x0000A3DB00000000
    AS DateTime), N'0', 13, NULL, NULL, 49, NULL)
    INSERT [dbo].[GSS_AC_WTHDRAW] ([MATID], [MATNO], [STPRICE_ID], [MS_CD], [QTY], [PRICE], [DateCreated], [Name], [DeptID], [CreatedID_by], [JvHeader_ID], [line_id], [createby]) VALUES (1004, N'1411-0131', 1456, N'914201', CAST(150.00 AS Decimal(16, 2)), 27.25,
    CAST(0x0000A3DB00000000 AS DateTime), N'0', 13, NULL, NULL, 58, NULL)
    INSERT [dbo].[GSS_AC_WTHDRAW] ([MATID], [MATNO], [STPRICE_ID], [MS_CD], [QTY], [PRICE], [DateCreated], [Name], [DeptID], [CreatedID_by], [JvHeader_ID], [line_id], [createby]) VALUES (1005, N'1411-0131', 1118, N'914016', CAST(31.00 AS Decimal(16, 2)), 105, CAST(0x0000A3DB00000000
    AS DateTime), N'0', 13, NULL, NULL, 59, NULL)
    INSERT [dbo].[GSS_AC_WTHDRAW] ([MATID], [MATNO], [STPRICE_ID], [MS_CD], [QTY], [PRICE], [DateCreated], [Name], [DeptID], [CreatedID_by], [JvHeader_ID], [line_id], [createby]) VALUES (1006, N'1411-0131', 105, N'914015', CAST(34.00 AS Decimal(16, 2)), 70, CAST(0x0000A3DB00000000
    AS DateTime), N'0', 13, NULL, NULL, 59, NULL)
    SET IDENTITY_INSERT [dbo].[GSS_AC_WTHDRAW] OFF
    SET IDENTITY_INSERT [dbo].[GSS_HR_COSTCENTER] ON 
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (107, N'01', N'SME', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (1, N'02', N'ADMIN', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (2, N'03', N'MANUFACTURE', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (15, N'11', N'Pattern', 11, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (104, N'21', N'Foundry', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (16, N'2100', N'FD Common', NULL, 2)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (41, N'2110', N'Melting', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (108, N'2110-00', N'Melting Common', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (123, N'2110-01', N'Melting Repairing', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (109, N'2110-01-0101', N'Melting_เตา.1', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (124, N'2110-01-0201', N'Melting CM1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (125, N'2110-01-0202', N'Melting CM2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (126, N'2110-01-0203', N'Melting CM3', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (127, N'2110-01-0204', N'Melting CM4', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (128, N'2110-01-0205', N'Melting CM5', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (129, N'2110-01-0206', N'Melting CM6', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (130, N'2110-01-0207', N'Melting CM7', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (131, N'2110-01-0208', N'Melting CM8', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (132, N'2110-01-0209', N'Melting CM9', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (110, N'2110-02-0102', N'Melting_เตา.2', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (111, N'2110-03-0103', N'Melting_เตา.3', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (112, N'2110-04-0104', N'Melting_เตา.4', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (113, N'2110-05-0105', N'Melting_เตา.5', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (114, N'2110-06-0106', N'Melting_เตา.6', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (115, N'2110-07-0107', N'Melting_เตา.7', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (116, N'2110-08-0108', N'Melting_เตา.8', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (117, N'2110-09-0109', N'Melting_เตา.9', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (118, N'2110-10-0110', N'Melting_เตา.10', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (119, N'2110-11-0111', N'Melting_เตา.11', 12, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (18, N'2111', N'Molding', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (42, N'2111-01', N'Core Common', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (151, N'2111-01-0201', N'Moulding -Core _CSC1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (152, N'2111-01-0202', N'Moulding -Core _CSC2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (148, N'2111-01-0401', N'Moulding -Core _CS-1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (149, N'2111-01-0402', N'Moulding -Core _CS-2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (150, N'2111-01-0501', N'Moulding -Core _MP-1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (43, N'2111-0110', N'Core - HSP', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (44, N'2111-0111', N'Core - AVS', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (45, N'2111-0112', N'Core - VML', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (46, N'2111-0113', N'Core - AMF', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (47, N'2111-0114', N'Core - DISA', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (48, N'2111-02', N'Molding Line Common', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (49, N'2111-0210', N'Molding Line - HSP', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (144, N'2111-0210-0201', N'Moulding Line-HSP_CHSP1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (145, N'2111-0210-0202', N'Moulding Line-HSP_CHSP2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (146, N'2111-0210-0203', N'Moulding Line-HSP_CHSP3', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (143, N'2111-0210-0301', N'Moulding Line-HSP_HSP', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (50, N'2111-0211', N'Molding Line - AVS', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (139, N'2111-0211-0201', N'Moulding Line-AVS_CAVS', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (140, N'2111-0211-0202', N'Moulding Line-AVS_CAV1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (141, N'2111-0211-0203', N'Moulding Line-AVS_CAV2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (142, N'2111-0211-0204', N'Moulding Line-AVS_CAV3', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (138, N'2111-0211-0301', N'Moulding Line-AVS_AVS', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (51, N'2111-0212', N'Molding Line - VML', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (137, N'2111-0212-0201', N'Moulding Line-VML_CVML', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (136, N'2111-0212-0301', N'Moulding Line-VML_VML', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (52, N'2111-0213', N'Molding Line - AMF', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (134, N'2111-0213-0201', N'Moulding Line-AMF_CAMF1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (135, N'2111-0213-0202', N'Moulding Line-AMF_CAMF2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (133, N'2111-0213-0301', N'Moulding Line-AMF_AMF', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (53, N'2111-0214', N'Molding Line - DISA', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (147, N'2111-0214-0301', N'Moulding Line-DISA_DISA', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (54, N'2111-0215', N'Finishing Small - Shot Blast', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (55, N'2111-0216', N'Finishing Small - Grinding', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (159, N'2111-0216-1101', N'Moulding-Finishing-small grinding_G1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (160, N'2111-0216-1102', N'Moulding-Finishing-small grinding_G2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (161, N'2111-0216-1103', N'Moulding-Finishing-small grinding_G3', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (162, N'2111-0216-1104', N'Moulding-Finishing-small grinding_G4', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (163, N'2111-0216-1105', N'Moulding-Finishing-small grinding_G5', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (164, N'2111-0216-1106', N'Moulding-Finishing-small grinding_G6', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (165, N'2111-0216-1107', N'Moulding-Finishing-small grinding_G7', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (166, N'2111-0216-1108', N'Moulding-Finishing-small grinding_G8', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (167, N'2111-0216-1109', N'Moulding-Finishing-small grinding_G9', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (168, N'2111-0216-1110', N'Moulding-Finishing-small grinding_G10', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (56, N'2111-0217', N'Finishing Small - Oil Painting', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (57, N'2111-0218', N'Finishing Small - Packing', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (58, N'2111-0219', N'Finishing Line - Shot Blast', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (153, N'2111-0219-0901', N'Moulding-Finishing Line Shot Blast_SB-1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (154, N'2111-0219-0902', N'Moulding-Finishing Line Shot Blast_SB-2', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (155, N'2111-0219-0903', N'Moulding-Finishing Line Shot Blast_SB-3', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (156, N'2111-0219-0904', N'Moulding-Finishing Line Shot Blast_SB-4', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (157, N'2111-0219-0905', N'Moulding-Finishing Line Shot Blast_SB-5', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (158, N'2111-0219-0906', N'Moulding-Finishing Line Shot Blast_SB-6', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (59, N'2111-0220', N'Finishing Line - Grinding', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (60, N'2111-0221', N'Finishing Line - Oil Painting', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (61, N'2111-0222', N'Finishing Line - Packing', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (62, N'2111-03', N'Molding Repairing', 13, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (19, N'2112', N'F1', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (63, N'2112-00', N'F1 Common', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (64, N'2112-01', N'Molding Roll', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (65, N'2112-0110', N'Grinding Roll', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (66, N'2112-02', N'Molding M/C Tool', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (67, N'2112-0210', N'Finishing F1', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (68, N'2112-0211', N'Shot Blast F1', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (69, N'2112-0212', N'Grinding F1', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (70, N'2112-0213', N'Painting F1', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (71, N'2112-0214', N'Packing F1', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (72, N'2112-0215', N'Repairing F1', 14, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (20, N'2113', N'F2', NULL, NULL)
    GO
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (73, N'2113-00', N'F2 Common', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (74, N'2113-01', N'Molding Press Die', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (75, N'2113-02', N'Finishing F2', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (76, N'2113-03', N'Shot Blast F2', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (77, N'2113-04', N'Grinding F2', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (78, N'2113-05', N'Painting F2', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (79, N'2113-06', N'Repairing F2', 15, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (105, N'51', N'Machine', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (21, N'5100', N'MC Common', NULL, 3)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (22, N'5110', N'SME M/C', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (80, N'5110-00', N'SME M/C Common', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (81, N'5110-01', N'SME M/C CNC Late', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (82, N'5110-02', N'M/C Center', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (83, N'5110-03', N'Timing', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (84, N'5110-04', N'Milling', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (85, N'5110-05', N'SME M/C Grinding', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (86, N'5110-06', N'Drilling', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (87, N'5110-07', N'Boring', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (88, N'5110-08', N'Honning', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (89, N'5110-09', N'Double Colume', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (90, N'5110-10', N'Painting', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (91, N'5110-11', N'SME M/C Packing', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (23, N'5111', N'ROLL M/C', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (92, N'5111-00', N'ROLL M/C Common', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (93, N'5111-01', N'Rough Cut', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (94, N'5111-02', N'Center', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (95, N'5111-03', N'ROLL M/C  CNC Late', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (96, N'5111-04', N'M/C Center (Ring roll)', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (97, N'5111-05', N'ROLL M/C Grinding', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (98, N'5111-06', N'Plan Cut', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (99, N'5111-07', N'Flower Cut', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (100, N'5111-08', N'Drilling', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (101, N'5111-09', N'Hand Finish', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (102, N'5111-10', N'ROLL M/C Packing', 16, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (106, N'81', N'Maintenance', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (24, N'8100', N'MT Common', NULL, 3)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (3, N'91', N'ADMIN', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (4, N'9100', N'Admin Common', NULL, 5)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (5, N'9110', N'Account', 1, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (6, N'9111', N'Purchase', 2, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (7, N'9112', N'Human Resource', 3, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (8, N'9113', N'Quality Assurance', 4, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (9, N'9114', N'Quality Control', 5, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (10, N'9115', N'Safety', 6, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (11, N'9116', N'Doc.Control', 7, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (12, N'9117', N'Sale', 8, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (13, N'9118', N'Planning', 9, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (14, N'9119', N'Store&Delivery', 10, NULL)
    INSERT [dbo].[GSS_HR_COSTCENTER] ([Cost_ID], [Cost_code], [Cost_name], [Dept_ID], [DeptGroup_ID]) VALUES (120, N'9120', N'R & D Engineering', 19, NULL)
    SET IDENTITY_INSERT [dbo].[GSS_HR_COSTCENTER] OFF
    SET IDENTITY_INSERT [dbo].[GSS_HR_COSTRELATION] ON 
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (1, N'02', N'01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (2, N'03', N'01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (3, N'91', N'02', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (4, N'9100', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (5, N'9110', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (6, N'9111', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (7, N'9112', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (8, N'9113', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (9, N'9114', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (10, N'9115', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (11, N'9116', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (12, N'9117', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (13, N'9118', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (14, N'9119', N'91', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (15, N'11', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (16, N'2100', N'21', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (17, N'2110', N'21', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (18, N'2111', N'21', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (19, N'2112', N'21', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (20, N'2113', N'21', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (21, N'5100', N'51', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (22, N'5110', N'51', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (23, N'5111', N'51', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (24, N'8100', N'81', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (121, N'2110-01', N'2110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (122, N'2110-01-0201', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (123, N'2110-01-0202', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (124, N'2110-01-0203', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (125, N'2110-01-0204', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (126, N'2110-01-0205', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (127, N'2110-01-0206', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (128, N'2110-01-0207', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (129, N'2110-01-0208', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (130, N'2110-01-0209', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (131, N'2111-0213-0301', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (132, N'2111-0213-0201', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (133, N'2111-0213-0202', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (134, N'2111-0212-0301', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (135, N'2111-0212-0201', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (136, N'2111-0211-0301', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (137, N'2111-0211-0201', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (42, N'2111-01', N'2110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (43, N'2111-0110', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (44, N'2111-0111', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (45, N'2111-0112', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (46, N'2111-0113', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (47, N'2111-0114', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (48, N'2111-02', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (49, N'2111-0210', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (50, N'2111-0211', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (51, N'2111-0212', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (52, N'2111-0213', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (53, N'2111-0214', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (54, N'2111-0215', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (55, N'2111-0216', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (56, N'2111-0217', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (57, N'2111-0218', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (58, N'2111-0219', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (59, N'2111-0220', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (60, N'2111-0221', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (61, N'2111-0222', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (62, N'2111-03', N'2111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (63, N'2112-00', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (64, N'2112-01', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (65, N'2112-0110', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (66, N'2112-02', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (67, N'2112-0210', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (68, N'2112-0211', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (69, N'2112-0212', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (70, N'2112-0213', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (71, N'2112-0214', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (72, N'2112-0215', N'2112', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (73, N'2113-00', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (74, N'2113-01', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (75, N'2113-02', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (76, N'2113-03', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (77, N'2113-04', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (78, N'2113-05', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (79, N'2113-06', N'2113', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (80, N'5110-00', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (81, N'5110-01', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (82, N'5110-02', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (83, N'5110-03', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (84, N'5110-04', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (85, N'5110-05', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (86, N'5110-06', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (87, N'5110-07', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (88, N'5110-08', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (89, N'5110-09', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (90, N'5110-10', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (91, N'5110-11', N'5110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (92, N'5111-00', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (93, N'5111-01', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (94, N'5111-02', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (95, N'5111-03', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (96, N'5111-04', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (97, N'5111-05', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (98, N'5111-06', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (99, N'5111-07', N'5111', NULL)
    GO
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (100, N'5111-08', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (101, N'5111-09', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (102, N'5111-10', N'5111', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (103, N'11', N'03', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (104, N'21', N'03', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (105, N'51', N'03', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (106, N'81', N'03', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (107, N'01', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (108, N'2110-00', N'2110', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (109, N'2110-01-0101', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (110, N'2110-02-0102', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (111, N'2110-03-0103', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (112, N'2110-04-0104', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (113, N'2110-05-0105', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (114, N'2110-06-0106', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (115, N'2110-07-0107', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (116, N'2110-08-0108', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (117, N'2110-09-0109', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (138, N'2111-0211-0202', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (139, N'2111-0211-0203', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (140, N'2111-0211-0204', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (141, N'2111-0210-0301', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (142, N'2111-0210-0201', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (143, N'2111-0210-0202', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (144, N'2111-0210-0203', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (145, N'2111-0214-0301', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (146, N'2111-01-0401', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (147, N'2111-01-0402', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (148, N'2111-01-0501', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (149, N'2111-01-0201', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (150, N'2111-01-0202', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (151, N'2111-0219-0901', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (152, N'2111-0219-0902', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (153, N'2111-0219-0903', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (154, N'2111-0219-0904', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (155, N'2111-0219-0905', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (156, N'2111-0219-0906', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (157, N'2111-0216-1101', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (158, N'2111-0216-1102', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (159, N'2111-0216-1103', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (160, N'2111-0216-1104', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (161, N'2111-0216-1105', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (162, N'2111-0216-1106', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (163, N'2111-0216-1107', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (164, N'2111-0216-1108', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (165, N'2111-0216-1109', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (166, N'2111-0216-1110', NULL, NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (118, N'2110-10-0110', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (119, N'2110-11-0111', N'2110-01', NULL)
    INSERT [dbo].[GSS_HR_COSTRELATION] ([Relation_ID], [Child_Code], [Parent_Code], [FLG]) VALUES (120, N'9120', N'91', NULL)
    SET IDENTITY_INSERT [dbo].[GSS_HR_COSTRELATION] OFF

    >> I want to sum every parent recursively to the top of parent <<
    The terms “parent” and “child” are part of network databases and NOT RDBMS. We have “weak entity” and “{strong entity” in our data models today.
    If you use the nested sets model, this hierarchical aggregation is easy. But your mindset is still in file systems, pointer chains and procedural language programming code. You also have no idea how ISO-11179 naming rules work. 
    Most of the data element names are garbage! Most of your code is garbage, even after we get over the fundamental design errors. 
    Think about how absurd “qty” as a data element name is in a schema. Quantity of what?? From logic (specifically the Law of Identity, the most fundamental law in mathematics) that “to be” (exist) is to be something in particular; so this has to be “<something
    in particular>_qty” to be valid. Your other data elemet names are also vague garbage. 
    We do NOT use flags in SQL; this is a predicate language like Assembly code. We do NOT set flags; we discover a current “state of being” with predicates. 
    Think about “GSS_Hr_Cost_Relation” as a name. Is there only one of them, as you have said?? Would also call a table of “Marriages” a “Man_Woman_Legal_Relations” ? NO! The relationship has a name of its own! 
    CAST(1 AS FLOAT) is better written AS a constant E1.0; but it is weird. why are you using FLOAT? Do you want rounding errors? Why do you write crap like “CAST(34.00 AS DECIMAL(16, 2)”  when an insertion of just 34.00 works better? Why do you write crap
    like “CAST(0x0000a3db00000000 AS DATETIME” instead of using ISO-8601 formats, DATE and DATETIME2(0) data types? 
    Then you have no idea what kind of attribute a “<something>_code” is and why it cannort ever be key. Go to any library and look at the Dewey DECIMAL Classification system. The hierarchy is in the encoding itself, NOT in some multiple levels of storage. 
    Why do you have more NULL-able columns than the loan systems of major automobile corporations? I can answer that! Your schema is a disaster that needs to be re-done. 
    Putting audit data into the table being audited is both stupid and illegal! And then to make it worse, “datecreated” should have been “creation_date” if the moron knew ISO-11179 rules. But it is still a crime; what happens to the audit data when the row is
    deleted or the table is dropped? Can a person with access to the data also have access to the audit trail? DOH! 
    The use of “NVARCHAR(50)” might be correct in places where the data actually is in Unicode varying strings. I think I have seen ~10 of them in 30 years of writing SQL. But everything does not qualify; most likely some moron using ACCESS or a ORM tool used this
    default because he is both stupid and lazy. Fire him; his ignorance is dangerous to the project. 
    Most ISO encodings are fixed length and between 9 and 16 characters with a regular expression for validation. Not all but most. 
    Finally, after all the decades of RDBMS, why do you use “mat_id INTEGER IDENTITY(1,1) NOT NULL”?? Why do you think that the insertion attempt count of one table is a valid logical attribute, much less a KEY? 
    You do not know how to write an INSERT UNTO statement! Look up the VALUES () clause and row constructions. 
    I have decades of my life invested in SQL and RDBMS. Reading code like this is painful. Can you please get a minimal education and correct this mess? I have been asked to write a book on bad SQL and this is classic illiterate programming! Almost nothing is
    right. 
    Sorry, but you wanted help and the best help is to stop you from doing more harm until you can learn how to do it properly. >> I want to sum every parent recursively to the top of parent <<
    The terms “parent” and “child” are part of network databases and NOT RDBMS. We have “weak entity” and “{strong entity” in our data models today.
    If you use the nested sets model, this hierarchical aggregation is easy. But your mindset is still in file systems, pointer chains and procedural language programming code. You also have no idea how ISO-11179 naming rules work. 
    Most of the data element names are garbage! Most of your code is garbage, even after we get over the fundamental design errors. 
    Think about how absurd “qty” as a data element name is in a schema. Quantity of what?? From logic (specifically the Law of Identity, the most fundamental law in mathematics) that “to be” (exist) is to be something in particular; so this has to be “<something
    in particular>_qty” to be valid. Your other data elemet names are also vague garbage. 
    We do NOT use flags in SQL; this is a predicate language like Assembly code. We do NOT set flags; we discover a current “state of being” with predicates. 
    Think about “GSS_Hr_Cost_Relation” as a name. Is there only one of them, as you have said?? Would also call a table of “Marriages” a “Man_Woman_Legal_Relations” ? NO! The relationship has a name of its own! 
    CAST(1 AS FLOAT) is better written AS a constant E1.0; but it is weird. why are you using FLOAT? Do you want rounding errors? Why do you write crap like “CAST(34.00 AS DECIMAL(16, 2)”  when an insertion of just 34.00 works better? Why do you write crap
    like “CAST(0x0000a3db00000000 AS DATETIME” instead of using ISO-8601 formats, DATE and DATETIME2(0) data types? 
    Then you have no idea what kind of attribute a “<something>_code” is and why it cannort ever be key. Go to any library and look at the Dewey DECIMAL Classification system. The hierarchy is in the encoding itself, NOT in some multiple levels of storage. 
    Why do you have more NULL-able columns than the loan systems of major automobile corporations? I can answer that! Your schema is a disaster that needs to be re-done. 
    Putting audit data into the table being audited is both stupid and illegal! And then to make it worse, “datecreated” should have been “creation_date” if the moron knew ISO-11179 rules. But it is still a crime; what happens to the audit data when the row is
    deleted or the table is dropped? Can a person with access to the data also have access to the audit trail? DOH! 
    The use of “NVARCHAR(50)” might be correct in places where the data actually is in Unicode varying strings. I think I have seen ~10 of them in 30 years of writing SQL. But everything does not qualify; most likely some moron using ACCESS or a ORM tool used this
    default because he is both stupid and lazy. Fire him; his ignorance is dangerous to the project. 
    Most ISO encodings are fixed length and between 9 and 16 characters with a regular expression for validation. Not all but most. 
    Finally, after all the decades of RDBMS, why do you use “mat_id INTEGER IDENTITY(1,1) NOT NULL”?? Why do you think that the insertion attempt count of one table is a valid logical attribute, much less a KEY? 
    You do not know how to write an INSERT UNTO statement! Look up the VALUES () clause and row constructions. 
    I have decades of my life invested in SQL and RDBMS. Reading code like this is painful. Can you please get a minimal education and correct this mess? I have been asked to write a book on bad SQL and this is classic illiterate programming! Almost nothing is
    right. 
    Sorry, but you wanted help and the best help is to stop you from doing more harm until you can learn how to do it properly. 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • How can I get the element value with namespace?

    I tried to get a element value in xml has namespace but i can't.
    I removed the namespace, i can get a element value.
    How can i get a element value with namespace?
    --1. Error ----------- xml ------------------------------
    <?xml version="1.0" encoding="UTF-8"?>
    *<TaxInvoice xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0 http://www.kec.or.kr/standard/Tax/TaxInvoiceSchemaModule_1.0.xsd">*
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    --2. sucess ----------- xml ---------remove namespace---------------------
    <?xml version="1.0" encoding="UTF-8"?>
    <TaxInvoice>
    <ExchangedDocument>
    <IssueDateTime>20110810133213</IssueDateTime>
    <ReferencedDocument>
    <ID>318701-0002</ID>
    </ReferencedDocument>
    </ExchangedDocument>
    <TaxInvoiceDocument>
    <IssueID>201106294100</IssueID>
    <TypeCode>0101</TypeCode>
    <IssueDateTime>20110810</IssueDateTime>
    <PurposeCode>02</PurposeCode>
    </TaxInvoiceDocument>
    <TaxInvoiceTradeLineItem>
    <SequenceNumeric>1</SequenceNumeric>
    <InvoiceAmount>200000000</InvoiceAmount>
    <TotalTax>
    <CalculatedAmount>20000000</CalculatedAmount>
    </TotalTax>
    </TaxInvoiceTradeLineItem>
    </TaxInvoice>
    ---------- program ------------
    procedure insert_table
    l_clob clob,
    wellformed out boolean,
    error out varchar2
    is
    l_parser dbms_xmlparser.Parser;
    xmldoc xmldom.domdocument;
    l_doc dbms_xmldom.DOMDocument;
    l_nl dbms_xmldom.DOMNodeList;
    l_n dbms_xmldom.DOMNode;
    l_root DBMS_XMLDOM.domelement;
    l_node DBMS_XMLDOM.domnode;
    l_node2 DBMS_XMLDOM.domnode;
    l_text DBMS_XMLDOM.DOMTEXT;
    buf VARCHAR2(30000);
    xmlparseerror exception;
    TYPE tab_type is Table of xml_upload%ROWTYPE;
    t_tab tab_type := tab_type();
    pragma exception_init(xmlparseerror, -20100);
    l_node_name varchar2(300);
    begin
    l_parser := dbms_xmlparser.newParser;
    l_doc := DBMS_XMLDOM.newdomdocument;
    dbms_xmlparser.parseClob(l_parser, l_clob);
    l_doc := dbms_xmlparser.getDocument(l_parser);
    l_n := dbms_xmldom.makeNode(l_doc);
    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');
    FOR cur_tax In 0..dbms_xmldom.getLength(l_nl) - 1 LOOP
    l_n := dbms_xmldom.item(l_nl, cur_tax);
    t_tab.extend;
    t_tab(t_tab.last).ed_id := '5000000';
    dbms_xslprocessor.valueOf(l_n, 'IssueID/text()', t_tab(t_tab.last).tid_issue_id);
    dbms_xslprocessor.valueOf(l_n, 'TypeCode/text()', t_tab(t_tab.last).tid_type_code);
    END LOOP;
    FORALL i IN t_tab.first .. t_tab.last
    INSERT INTO xml_upload VALUES t_tab(i);
    COMMIT;
    dbms_xmldom.freeDocument(l_doc);
    wellformed := true;
    exception
    when xmlparseerror then
    --xmlparser.freeparser(l_parser);
    wellformed := false;
    error := sqlerrm;
    end insert_table;

    l_nl := dbms_xslprocessor.selectNodes(l_n, '/TaxInvoice/TaxInvoiceDocument');try to change as follow
    l_nl := dbms_xslprocessor.selectnodes(l_n,'/TaxInvoice/TaxInvoiceDocument','xmlns="urn:kr:or:kec:standard:Tax:ReusableAggregateBusinessInformation:1:0"');Edited by: AlexAnd on Aug 17, 2011 12:36 AM

  • In Jsp TagLib how can I get the Attribute value (like JavaBean) in jsp

    Dear Friends,
    TagLib how can I get the Attribute value (like JavaBean) in jsp .
    I do this thing.
    public void setPageContext(PageContext p) {
              pc = p;
    pc.setAttribute("id", new String("1") );
              pc.setAttribute("first_name",new String("Siddharth")); //,pc.SESSION_SCOPE);
              pc.setAttribute("last_name", new String("singh"));
    but in Jsp
    <td>
    <%=pageContext.getAttribute("first_name"); %>
    cause null is returing.
    Pls HELP me
    with regards
    Siddharth Singh

    First, there is no need to pass in the page context to the tag. It already is present. How you get to it depends on what type of tag:
    Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/SimpleTagSupport.html]SimpleTagSupport
    public class MyTag extends SimpleTagSupport
      public void doTag()
        PageContext pc = (PageContext)getJspContext();
        pc.setAttribute("first_name", "Siddharth");
        pc.setAttribute("last_name", "Singh");
        pc.setAttribute("id", "1");
    }Using [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/TagSupport.html]TagSupport or it's subclass [url http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/jsp/tagext/BodyTagSupport.html]BodyTagSupport the page context is aleady declared as an implicit object:
    public class MyTag extends TagSupport
      public void doStartTag()
        pageContext.setAttribute("first_name", "Siddharth");
        pageContext.setAttribute("last_name", "Singh");
        pageContext.setAttribute("id", "1");
    }In each case, this sort of thing should work:
    <mytags:MyTag />
    <%= pageContext.getAttribute("first_name") %>I

  • LiveCycle DS , can't get the return value of fill( arg) from Assembler class

    Hi all!
    I'm a have small problem , can any one help me? Please
    I make a project which very similar to Product project(in
    example).
    1) Have Assembler class: I work correctly
    package flex.samples.stock;
    import java.util.List;
    import java.util.Collection;
    import java.util.Map;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    public class StockAssembler extends AbstractAssembler {
    public Collection fill(List fillArgs) {
    StockService service = new StockService();
    System.out.print(fillArgs.size());
    return service.getStocks();
    public Object getItem(Map identity) {
    StockService service = new StockService();
    return service.getStock(((Integer)
    identity.get("StockId")).intValue());
    public void createItem(Object item) {
    StockService service = new StockService();
    service.create((Stock) item);
    public void updateItem(Object newVersion, Object
    prevVersion, List changes) {
    StockService service = new StockService();
    boolean success = service.update((Stock) newVersion);
    if (!success) {
    int stockId = ((Stock) newVersion).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    changes);
    public void deleteItem(Object item) {
    StockService service = new StockService();
    boolean success = service.delete((Stock) item);
    if (!success) {
    int stockId = ((Stock) item).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    null);
    some require class is ok.
    2) I configure in data-management-config.xml
    <destination id="stockinventory">
    <adapter ref="java-dao" />
    <properties>
    <source>flex.samples.stock.StockAssembler</source>
    <scope>application</scope>
    <metadata>
    <identity property="StockId"/>
    </metadata>
    <network>
    <session-timeout>20</session-timeout>
    <paging enabled="false" pageSize="10" />
    <throttle-inbound policy="ERROR" max-frequency="500"/>
    <throttle-outbound policy="REPLACE"
    max-frequency="500"/>
    </network>
    </properties>
    </destination>
    3) My client app:
    I use :
    <mx:ArrayCollection id="stocks"/>
    <mx:DataService id="ds" destination="stockinventory"/>
    ds.fill(stocks); --> Problem here
    When I run this app, The StockAssembler on the server work
    correctly (i use printout to debug) . But variable stocks can't get
    the return value,it is a empty list.
    Please help me!

    Hi,                                                             
    The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
    respond”.
    From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
    I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
    A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
    for your reference:
    http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • How can i get this variable value into second page IN BSP

    Hi friends
    I have variable wk_matnr value 'ABC' in first page of BSP.
    How can i get this variable value into second page.
    Moosa

    Hi,
    you can define variable (page attribiue) on the second page with the same name. You can realise the Navigation with Button ther started onInputProcesing routine. In onInputProcesing you have to call navigation->set_parameter with attribut name as parameter and then starting the navigation. If you have checked the auto property on the variable on second page and varable have same name, the value of variable should be transported.
    [See this tutorial|http://help.sap.com/saphelp_erp2005/helpdata/DE/1a/c5133a62983c0ae10000000a114084/frameset.htm]
    Best regards
    Bogdan

  • Can't get the current value of item.

    i user javascript to set a item value by a Partial Page Refresh .then i want to turn to another page by a button and Transfer the item's new value to the second page's item,but the value of the item is always teh old value but not de new value,how can i get the new value of the item first. thanks;

    Hi 蓝色理想_行者 ( Ideal _ blue Walker),
    >
    i user javascript to set a item value by a Partial Page Refresh .then i want to turn to another page by a button and Transfer the item's new value to the second page's item,but the value of the item is always teh old value but not de new value,how can i get the new value of the item first.
    >
    Values set using JavaScript are present only in HTML DOM, not in the session state. To set the value in session state you need to use PL/SQL.
    Exact implementation will depend on how you navigate to the second page, by doing a submit or something else.
    Cheers,

  • Can't get JSF to access managed bean methods from web page

    I'm using NetBeans 6.7.1 and Glassfish v2.1
    Having problems here can somebody please help? It is really
    frustrating because I have written apps like this before in fact I
    used one as a model to create an even simpler app and still can't get
    it to work. I ran it through the debugger and it stops in the
    constructor so it looks like the bean object is being created, but the
    setUid method and the testit method are not being entered when I click
    on the enter commandbutton. Can somebody PLEASE give me an idea as to
    what might be going on? I am totally stumped and this is holding up
    some important work I need to get done. Any help would be greatly
    appreciated:
    web.xml:
    - Show quoted text -
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <context-param>
    <param-name>com.sun.faces.verifyObjects</param-name>
    <param-value>false</param-value>
    </context-param>
    <context-param>
    <param-name>com.sun.faces.validateXml</param-name>
    <param-value>true</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>client</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
    <welcome-file>faces/welcomeJSF.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
    faces-config.xml:
    <?xml version='1.0' encoding='UTF-8'?>
    <!-- =========== FULL CONFIGURATION FILE ================================== -->
    <faces-config version="1.2"
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
    http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
    <managed-bean>
    <managed-bean-name>testbean</managed-bean-name>
    <managed-bean-class>com.lingosys.quoteest.testbean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/go.jsp</from-view-id>
    <navigation-case>
    <from-outcome>correct</from-outcome>
    <to-view-id>/ok.jsp</to-view-id>
    <redirect/>
    </navigation-case>
    </navigation-rule>
    </faces-config>
    go.jsp:
    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <%@taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
    <%@taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%--
    This file is an entry point for JavaServer Faces application.
    --%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>JSP Page</title>
    </head>
    <body>
    <f:view>
    <h1>JAS Generator</h1>
    <p/>
    <h:form id="testForm" enctype="multipart/form-data" >
    <p/>Both fields are required.
    <p/>Enter Test ID: <h:inputText id="pid"
    value="#{testbean.uid}" required="true"/>
    <p/><h:commandButton value="Enter"
    action="#{testbean.testit}"/>
    </h:form>
    </f:view>
    </body>
    </html>
    testbean.java:
    * To change this template, choose Tools | Templates
    * and open the template in the editor.
    package com.lingosys.quoteest;
    * @author mphoenix
    public class testbean {
    private String uid;
    public testbean() {
    int x=0;
    public String getUid() {
    return uid;
    public void setUid(String uid) {
    this.uid = uid;
    public String testit() {
    return "correct";
    }

    MikePhoenix wrote:
    enctype="multipart/form-data"
    Why?
    Oh, in the future please post code in code blocks. Use the CODE button to get them. Use the Preview tab to see if anything went right.

  • How can I get all the values of a String array profile property using javascript?

    I am trying to build functionality into our site that records all products added to the basket against a user's profile.
    I have so far been able to store the product codes against the profile as a property using Ajax:
           var dataString = ":formid=addProduct&:formstart=/apps/thread/templates/page_product/jcr:content/par/produc t/formstart&:redirect=/content/thread/en/user/cart.html&productId=151515:profile="+profile ;
                         $.ajax({ 
                type: "POST", 
                url: "/content/women/evening/dresses/l-k-bennett-davinadress.html", 
                data: dataString, 
                success: function(data) { 
    In this example I have hardcoded a product ID of 151515.
    In order to save the property as a multi string field you simply replace &productId=151515 with &productId=151515&productId=131313&productId=141414 or as many extra values as you want to build into that string. This stores a productId property against a user profile.
    The issue comes from calling that data back. Using var value = CQ_Analytics.ProfileDataMgr.getProperty("productId") I can get the first value of this array (or the single value if only one is stored).
    However there does not seem to be a way to get any of the other stored values in the array using getProperty. Does anyone know how I can achieve this?

    Hi,
    Don't think that's possible. Even if it were, you wouldn't be able to use/display BOOLEAN type in SQL.
    If you just aim to see what they are, you could do something like this
    select text
      from all_source
    where owner = 'SYS'
       and name = 'DBMS_DB_VERSION'
       and type = 'PACKAGE';Or even
    select dbms_metadata.get_ddl('PACKAGE', 'DBMS_DB_VERSION', 'SYS') from dual;My version is:
    SQL> select * from v$version where rownum = 1;
    BANNER                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    1 row selectedIn 11g you also have [PL/SCOPE|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_plscope.htm#ADFNS02203] which might help you even more.
    Regards
    Peter

  • How Can I get all the values of a DBMS package?

    Hi all
    I'm using this "dbms_output.put_line(DBMS_DB_VERSION.VERSION || '.' ||DBMS_DB_VERSION.RELEASE);" to show the version. But how Can I get the all the values from DBMS_DB_VERSION ? Is there a common way ?
    Thanks .
    Best
    Laurence

    Hi,
    Don't think that's possible. Even if it were, you wouldn't be able to use/display BOOLEAN type in SQL.
    If you just aim to see what they are, you could do something like this
    select text
      from all_source
    where owner = 'SYS'
       and name = 'DBMS_DB_VERSION'
       and type = 'PACKAGE';Or even
    select dbms_metadata.get_ddl('PACKAGE', 'DBMS_DB_VERSION', 'SYS') from dual;My version is:
    SQL> select * from v$version where rownum = 1;
    BANNER                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    1 row selectedIn 11g you also have [PL/SCOPE|http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_plscope.htm#ADFNS02203] which might help you even more.
    Regards
    Peter

Maybe you are looking for

  • How do you move the iphone from one computer to another.

    I am having a lot of trouble with a computer so I started using a different one. I have never had an iphone on this computer. When I hook up the phone and try to put anything on it, like a ringtone, it says that the phone is using another iTunes and

  • Line string validation and ORA-13349 on polygons

    Hi all, We are having the following problem: Our application accepts linestrings and connects them to create polygons. Each individual line validates TRUE but some polygons validate with ORA-13349. The problem is caused by lines that we call Lightnin

  • HOW TO POST J1IEX FOR SERV ENTRY SHEET.?

    Dear All ,                                       User had done a serv entry sheet , against serv P.O in invoice the service is exciseable , pl help me how to post the J1IEX for this serv entry sheet.? item catogary in P.O is d & acctt assignnis P( Pr

  • Passing IR Values to Form via Link Column

    I am fairly new to APEX and was wondering if there was a way to pass more than the 3 allotted values in the Link Column of an Interactive Report. My report is generated from a query that pulls from several tables. My link column navigates to a form t

  • IPhone auto rotation problem

    I am trying to create an app with multiple views. I have a seperate nib file and view controller for all the views. I have created methods in the app delegate that call up the different views as well as add a transition. I then call that method from