[jboss-user] [EJB 3.0] - Reverse engineer stored proc to JPA entity beans?

asookazian do-not-reply at jboss.com
Wed Oct 3 15:17:35 EDT 2007


Is it possible to do this and generate a ResultSet?  Or is it recommended to just use the existing proc with JSF/Seam/EJB3?  thx.  

SET NOCOUNT ON
  | declare @networkID varchar(50)
  | declare @seedHireLevel int
  | DECLARE @rptPARAM varchar(20)
  | 
  | set @networkID = 'corp\btkach'-- at paraNetworkId
  | set @networkID = right(@networkID,(LEN(@networkID )-5) )
  | 
  | SELECT 
  | UserId
  | ,ISNULL(LEN(EmployeeID),0) AS [len_EmpId]
  | ,EmployeeID
  | ,FirstName + ' ' + LastName as FullName
  | ,Title
  | ,NetworkID
  | ,BillingLogin
  | ,(SELECT [A2VNAF] 
  |   FROM [coxDSS].[dbo].[ORG_CBURIDPF]
  | WHERE
  | [A2USER] = BillingLogin) as SecurityGroup
  | ,(SELECT 
  | 	ABS([AUNUM2]) AS AdjAmount
  | FROM 
  | 	[coxDSS].[dbo].[ORG_AUTUSRPF]
  | WHERE 
  | 	[AUUSER] = (SELECT [A2VNAF] 
  |   FROM [coxDSS].[dbo].[ORG_CBURIDPF]
  | WHERE
  | [A2USER] = BillingLogin)
  | 	AND
  | 	[AUOPTN] = 'AA'
  | 	AND
  | 	[AUENTR] = 'Y'
  | 	AND
  | 	ABS([AUNUM1]) > 0) AS adjAmount
  | 
  | ,(SELECT 
  | 	[AUFUNC] AS AdjFunc
  | FROM 
  | 	[coxDSS].[dbo].[ORG_AUTUSRPF]
  | WHERE 
  | 	[AUUSER] = (SELECT [A2VNAF] 
  |   FROM [coxDSS].[dbo].[ORG_CBURIDPF]
  | WHERE
  | [A2USER] = BillingLogin)
  | 	AND
  | 	[AUOPTN] = 'AA'
  | 	AND
  | 	[AUENTR] = 'Y'
  | 	AND
  | 	ABS([AUNUM1]) > 0) AS AdjFunc
  | from coxIM.dbo.u_tbUser tbU
  | WHERE
  | HierarchyPath LIKE '%' + @networkID + '\'
  | ORDER BY
  | LastName

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091209#4091209

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091209



More information about the jboss-user mailing list