|Registered:||Sep 11, 2007|
|Given in last 30 days||0|
|Received in last 30 days||0|
|Last 30 days:||0|
This is the query you are apprently trying to duplicate.
Since you need both table 1 and 2, thenthe HQL would start:
That will return a List<Object> where each row is an array of two Objects, the first is a table1 and the second is a table2.
Not the use of the bind variable ':name', instead of concatenating your SQL.
You ought to be using bind variables
Campbell Ritchie wrote:
Why? If you are creating an empty List, what is wrong with myList = new XYZList<>();? Why did you choose a linked list rather than an array list?
Campbell Ritchie wrote:Maybe I was mistaken about [- /.], but have you tried that with all the different separators between numbers? Please tell us more details about where you found that regex. In two days it will be 1-11-2017 here. Can your regex match that? Does it always require padding the numbers to a particular length with leading 0s?
I am not convinced you have got rid of all the }s.
Why don't you simply find the part which matches the regex and keep that match?
Campbell Ritchie wrote:Even without reading your code I started to get suspicious seeing a long row of }s. Search for arrowhead code or arrowhead antipattern and see what people say about that sort of code.
Campbell Ritchie wrote: Please explain that regex, where you got it from, and how it is supposed to work. Are you seeking dates in dd-mm-yyyy format? I can see at least one error in that regex: what does [- /.] mean? Why not use the regex to find the parts of the String representing dates and simply keep those parts?
Campbell Ritchie wrote: now tell us what you want to keep.