on 06-18-2015 6:20 PM
How to increase the constant value and extra alpha character for each loop without UDF .
Example : presently XYZ/MM --- > XYZ/MM
we need to change
XYZ/MA
XYZ/MB
XYZ/MC
XYZ/MD
XYZ/ME
XYZ/MF
or
XYZ/YESL
XYZ/LKSJ
XYZ/JSHL ( any random unique. )
thanks
Hi
or can you give me UDF code and how to use.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Finaly we have fixed using UDF
--------------------------------------------------------------------------------------------------------
final String AB = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
Random rnd = new Random();
StringBuffer sb = new StringBuffer(a);
for (int i = 0; i < 4; i++) {
sb.append(AB.charAt(rnd.nextInt(AB.length())));
}
return sb.toString();
------------------------------------------------------------------------------------------------------------
Thanks for all the support.
Hi Praveen,
Can you please elaborate the requirement for better understanding.
Depending upon the requirement, our first choice will always be graphical functions, and then UDF.
Regards
Vishnu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You can use a fix value lookup for this like follows.
If loop =1 retreive and append alphabet A
if loop =2 retrieve and append alphabet B
.
.
.
1 | A |
2 | B |
3 | C |
4 | D |
5 | E |
6 | F |
7 | G |
8 | H |
9 | I |
10 | J |
11 | K |
12 | L |
13 | M |
14 | N |
15 | O |
16 | P |
17 | Q |
18 | R |
19 | S |
20 | T |
21 | U |
22 | V |
23 | W |
24 | X |
25 | Y |
26 | Z |
Thanks,
Avinash.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That could be a difficult requirement.
Thinking outside the box, haven't tried this, but maybe you do a JDBC lookup to database stored procedure which keeps sequence externally and returns the next unique value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.