SQL Server Export Database
NAVCAT for SQL Server open connection, open database, right--data transfer, General tab--mode SELECT dbo, target select connection (select your new library) or file (export your desired SQL file location), click Start
Stuff Makes the table
CUSTOMER
1 shz
2 sz
1 Chinese
Into
CUSTOMER
1 Shz,chinese
2 sz
Select No,stuff ((select ', ' + login_name from customer where NO = a.no FOR XML Path ("))," ("),") from customer a
Stored procedure (returns a list of records)
PROCEDURE [dbo]. [Get_customer]
@No varchar (10),
@beginTime varchar (19),
@endTime varchar (19)
As
BEGIN
Select No, loginname,age where CONVERT (varchar, open_time,) between @beginTime and @endTime and [email protect Ed
ORDER by Info.agent_no;
END
Hibernate calls a stored procedure where query does not support paging of stored procedures, and can of course be written to the stored procedure
Public list<customer> Getallcustomer (final String no,final date begintime,final date endTime) {
Return (list<customer>) gethibernatetemplate (). Execute (new Hibernatecallback () {
Public Object Doinhibernate (session session)
Throws Hibernateexception, SQLException {
Query query = session.createsqlquery ("{Call Get_customer (:p arm1,:p arm2,:p arm3)}");
Query.setparameter ("Parm1", Agentno);
Query.setparameter ("Parm2", Xadateutil.getdatew3cformat (BeginTime));
Query.setparameter ("Parm3", Xadateutil.getdatew3cformat (EndTime));
List arr = query.list ();
list<customer> list = new ArrayList ();
if (arr==null) return null;
for (int i = 0; i < arr.size (); i++) {
object[] ob = (object[]) arr.get (i);
CUSTOMERPL = new Customer ();
Pl.setno (String) ob[0]);
Pl.setloginname (String) ob[1]);
List.add (PL);
}
return list;
}
});
}
SQL Server uses the miscellaneous notes