HELP! Dynamically generated data for membership site...
I've past week looking for help and came across this forum and I hope someone can at least point me in the right direction.
Using ADDT, how can I can I create a dynamic page which populates a certain registered users info, ie., name, address, etc.
I've created using addt a user registration page and login page. What I want to do is when a customer logs into the membership site, their data is populated onto that page (or whatever data I want them to see).
I would be forever grateful if someone could point me in the right direction.
Thank you!
Ken
Hi Ken,
When you create a record set you have some options two of them are simple and advanced.
Simple:
You will see "Filter" then a selector for the desired field, then operator selector, then a variable selector, then a place to add the name of the variable.
Advanced:
You will see SQL: for sql statement then Variables: for custom variables.
Here is an example;
SQL:
SELECT * FROM TABLE WHERE FIELD = colname
VARIABLES:
Hit the + to add a new one, then edit.
You have 4 fields to fill in.
Name: colname <-- to match what you put in the sql statement
Type: NUMERIC <-- depends on the variable type
Default Value: -1 <-- Return nothing if nothing is entered
Runtime Value: $_SESSION['kt_login_id'] <-- the actual variable that will be used. (can be anything like $_GET[], $_SESSION[]. $variable, $_SERVER[], etc)
NOTE: This is generic info not specific to your session. I don't know the name of your session variable but will assume its kt_login_id
Similar Messages
-
Help on generating token for opendoc url in XI3.1
Hi Guys,
I am trying to get some help in generating token for opendoc url to avoid login while trying to access a report in Infoview.
From a previous post I got this code:
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.*" %>
<%
boolean loginSuccessful = false;
IEnterpriseSession boEnterpriseSession = null;
String username = "Administrator";
String password = "pwd";
String cmsname = "CMS";
String authenticationType = "secEnterprise";
try {
//Log in.
boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsname, authenticationType);
if (boEnterpriseSession == null) {
out.print("Unable to login.");
} else {
loginSuccessful = true;
} catch (SDKException sdkEx) {
out.print("ERROR ENCOUNTERED
" + sdkEx + "");
if (loginSuccessful) {
ILogonTokenMgr boLogonTokenMgr = boEnterpriseSession.getLogonTokenMgr();
String logonToken = boLogonTokenMgr.createLogonToken("", 60, 1);
String infoViewURL = null;
String tokenParam = null;
String redirectURL = null;
infoViewURL = "http://server:8080/InfoViewApp/logon.jsp";
tokenParam = "ivsLogonToken=" + logonToken;
redirectURL = infoViewURL + "&" + tokenParam;
response.sendRedirect(redirectURL);
%>
The problem is I don't know where to put this code in the opendoc.jsp file.
I tried to create a custom OpenDoc.jsp with a above code, leaving the original opendoc.jsp as it is. And used this custom jsp file in the opendoc url. This is taking me to Infoview login page and I see taht a token is created at the end of the url but it is not passed.
Can somebody help me to understand where exactly to put this code in the opendoc.jsp and any correction to this code or additional steps to get it working.
Any help is greatly appreciatedStratos,
Thanks for your inputs,
I changed the code as you suggested , now my whole code looks like :
<%@ page import="com.crystaldecisions.sdk.framework.*" %>
<%@ page import="com.crystaldecisions.sdk.exception.SDKException" %>
<%@ page import="com.crystaldecisions.sdk.occa.security.*" %>
<%
boolean loginSuccessful = false;
IEnterpriseSession boEnterpriseSession = null;
String username = "user";
String password = "Password";
String cmsname = "Server";
String authenticationType = "secEnterprise";
try {
//Log in.
boEnterpriseSession = CrystalEnterprise.getSessionMgr().logon( username, password, cmsname, authenticationType);
if (boEnterpriseSession == null) {
out.print("<FONT COLOR=RED><B>Unable to login.</B></FONT>");
} else {
loginSuccessful = true;
} catch (SDKException sdkEx) {
out.print("<FONT COLOR=RED><B>ERROR ENCOUNTERED</B><BR>" + sdkEx + "</FONT>");
if (loginSuccessful) {
ILogonTokenMgr boLogonTokenMgr = boEnterpriseSession.getLogonTokenMgr();
String logonToken = boLogonTokenMgr.createLogonToken("", 60, 1);
//String logonToken = boLogonTokenMgr.getDefaultToken();
String infoViewURL = null;
String tokenParam = null;
String redirectURL = null;
infoViewURL = "http://Server:8080/InfoViewApp/logon.jsp";
tokenParam = "ivsLogonToken=" + logonToken;
redirectURL = infoViewURL + "&" + tokenParam;
pageContext.forward( "openDocument.jsp?iDocID=" + 4668 + "&token=" + tokenParam);
%>
But I am still getting the Infoview Login Page . The url on the login page is
http://server:8080/OpenDocument/opendoc/logonTrustedAuth.do?appKind=InfoView&iDocID=4668&isApplication=true&token=ivsLogonToken%server%3A6400%4021181JIipxt70VM0kd90v21179JFd4dHn7kW2FKSBi
We can see that a token is being generated and appended to this url but it is not passing the user name and password.
Please let me know what you think about this. -
How to generate sitemap for SiteStudio sites. Is there any component avai
How to generate sitemap for SiteStudio sites. Is there any component available?
We want to create xml having list of all site URLS for SEO purpose.
Is there any way to achieve this ?
ThanksSiteStudio comes with SiteMap fragments. Change the page template so it is a document type XML, add the fragment and you're practiacally done.
-
Some help on sample data for BPC
Hi
I am trying to create a demo BPC apps( NW 7.5 ) for my self learning exercise.Can some one please help me with sample master data and sample transaction data for consolidation apps ?
I am trying to load some good qualities of data ,so that some meaningful exercise can be done.Any help in this regard will be highly appreciated.I am not looking for how to load the data.
Thanks in advance
RajeshHi Rajesh
Have you run the program UJS_ACTIVATE_CONTENT to create the ApShell Appset?
Additionally you can download the starter kits which should include some basic data to start you off.
I hope this helps
Kind Regards
Daniel -
Crypto newb: Need help with encrypting data for offline Swing app
Hi all,
I'm VERY new to cryptography. Can somebody point me in the right direction? I've created a Swing application that is intended to be used offline (no network connections are established by the app). I need to export XML files from this application, to be transported via floppy to another instance of the application on a different computer for import. The information is sensitive and must be encrypted!
I started looking into AES and using asymmetric ciphers (public/private key encryption). But then I realized that if Jane is exporting a file for Bob to view, she won't have access to Bob's public key (no network access). Ugghh!
I noticed another solution in this forum where the person suggested using password encryption. It was an old post and I think it used DES. Anyway, password encryption doesn't seem too secure.
So, I thought I'd create a symmetic key (correct term?) once, store it in the program directory, and distribute it with the application installer. That way, everyone would have the same key and would be able to encrypt/decrypt each others files. Right? Err... I'm not sure.
Like I said, I'm a newb at crypto. If someone could suggest the best/most secure way to accomplish this, I would be eternally grateful.
PLEASE HELP!!! :-D
Thanks in advance.Sorry, Grant. I must've posted that last one just
after your response. I was intending the message to
be for Anand. Heh - you have no idea how many times I've done the same thing. It's an artifact of the asynchronous nature of message boards.
Your response is very helpful. Out of
curiosity, does my last post provide any more insight
that would change your mind? Or do you still believe
that using password encryption and letting the user
choose/provide the password is the best solution?Well, as you noted, giving everyone two sets of keypairs is semantically equivalent to giving everyone a single symmetric key. And, as I've noted, it's completely INsecure - everyone who gets access to an install disk, either legitimately or no, can read every transmission your app makes forever after. Cryptographically speaking, this is Not A Good Thing.
The advantage of PBE is that it's easy for your users to exchange keys when their machines can't see each other. The real key here is that your app, if you really want it to be secure, MUST allow/require that transmission between Alice and Bob use a different key than that between Alice and Carlos or Bob and Carlos - otherwise, if Eve compromises any user of your software, ALL users are compromised.
I'd go with PBE, just because other alternatives are painful for your end users. You could use generated KeyPairs, for example, if you provide a means for users to exchange public keys. If you display Bob's public key in encoded, String-able form, then Bob can either email that to Alice or read it off to her over the phone. Into your app Alice loads/types in that public key, and the app now knows how to secure communications with Bob.
Public keys are large, though, and people screw them up typing them in. And many users have TERRIBLE key discipline - if Bob loses access to his private key, he can't read anything Alice sends. And if his private key is readable on some public shared folder (which happens with a totally-frightening regularity), then we're back to no security at all.
Use one of the triple-DES PBE Ciphers, and get on with making your app do what you really want it to do, would be my advice. (Free advice, of course, being worth every penny you pay!)
Once again, thanks a bunch!Glad to help.
Grant -
Help request - Could need some help with a logo for my site
Hi I'm working on a project and i have come across a huge problem.
please check out my logo on this site:
http://www.tuxxen.com
I have no idea how i should make my logo and it seems like i have no skills to make one either, i have been trying for days to make one that look decent but it end up looking really really bad each time.
Could really need some help to get a nice logo up, the site im working on is about fishing, the name of this site will be changed to: Absolut mete. So the logo need to have this name.
I have managed to make the layout for my site but i cannot make a logo its a bit funny really but yeah...
Any help are very much welcome!THANK YOU/___sbsstatic___/migration-images/migration-img-not-avail.png so the tolerance makes it not care so much about the gradations in color? what else is tolerence good for?
I have a cleaner copy now after someone suggested GIMP, so played with it last night - though couldn't figure out transparency - that was clear on converter- just not cooperative till these wonderful directions.
So now I know how to do it without messing with the pic, and with messing with it - both good lessons and got a bit brighter color out of the deal.
many thanks for the straightforward and clear directions, they worked perfectly/___sbsstatic___/migration-images/migration-img-not-avail.png extra strars for you/___sbsstatic___/migration-images/migration-img-not-avail.png -
Dynamically populating data for the drop down lists
Hi,
I am trying to have a mutually dependent drop down lists in my page.
This is what I am trying to do -
Lets consider there are 3 drop down lists (Choice - Select Many). A simple example lists are - Country, State, County. Now users selects country from drop down, I need to get all the states for that country as the data for the "State" drop down list. Then user selects a state, I need to populate data for the "County" drop down list.
I am trying to do this. I added a ValueChangeListener method in the backing bean and tried to add this on the "Select Many Choice" component. But the method is never fired. I tried to change few other properties like - "immediate", "Auto Submit". but method is not fired.The method in backing bean is as shown below -
public void onRegionSelect(ValueChangeEvent event) {
System.out.println("Value changed ==>> "+event.getNewValue().toString());
Need some help on how to do this.
JDev: Version 11.1.2.3
Thanks.Hi,
I am trying to have a mutually dependent drop down lists in my page.
This is what I am trying to do -
Lets consider there are 3 drop down lists (Choice - Select Many). A simple example lists are - Country, State, County. Now users selects country from drop down, I need to get all the states for that country as the data for the "State" drop down list. Then user selects a state, I need to populate data for the "County" drop down list.
I am trying to do this. I added a ValueChangeListener method in the backing bean and tried to add this on the "Select Many Choice" component. But the method is never fired. I tried to change few other properties like - "immediate", "Auto Submit". but method is not fired.The method in backing bean is as shown below -
public void onRegionSelect(ValueChangeEvent event) {
System.out.println("Value changed ==>> "+event.getNewValue().toString());
Need some help on how to do this.
JDev: Version 11.1.2.3
Thanks. -
Advice directory locstion for dynamically generated data
Hello, My application generates .jpgs from a file consersion, that happens on the user request. For example they click a button on the jsp and the file is converted to a .jpg...
The problem that I am having is where is the best location in the Tomcat server for the directory to hold the convered .jpgs.
I put the folder for the converted jpgs in the following structure
C:\jakarta-tomcat\webapps\myapp\web\conversion\
However when I come to display the converted .jpgs in a jsp page I cannot get access to the conversion folder which is a sub directory of the web folder... i.e. I just get the missing image icon in the jsp page
For example
<img src="https://localhost:8443/myapp/web/conversion/filename.jpg >The jsp cannot find the .jpg in the conversion folder.. The only way that I have been able to display the jpg is by give the absolute path to the .jpgs
Am I missing a setting somewhere?
do I need to set permission somewhere?
or do I need to reference the conversion folder ?
cheersAlso if i have the converted .jps in the web folder
C:\tomcat\webapps\myapp\web\
everything works great, but I don't want my converted files to be in the same directory aas my .jsps etc, this is why I added the conversion folder
c:\tomcat\webapps\myapp\web\conversion\
cheers -
Generating Data for INSERT using a Stored Procedure, Function and Cursor
I've written a function that I finally got to compile, but was not successful in importing and inserting the data needed to populate a table with at least 1800 rows. Here's what I needed to do:
-- Generate a random test score ranging from 20 to 100 (already done)
-- Generate a random final grade for the course ranging from 4 to 0 (representing A to F) (already done, but question below.
-- Use conditional statements based on the counter to assign three courses (already done -- see SQL statements)
-- Process no more than 95% of the students (300) for test 1.
-- For test 2, process no more than 80% of the students who took test 1. Student cannot take test 2 unless the student takes test 1 (does this require a trigger? If so, how would I go about doing this?)
-- Use a function or another subprocedure to process the grade using IF-ELSIF statements
For example, I've tried the following statements:
For procedures
IF birth_date BETWEEN to_date('01-Jan-89 AND to_date('31-Dec-89','dd-Mon-yy') THEN
school_grade := 6;
AND for functions:
IF birth_date BETWEEN to_date('01-Jan-89 AND to_date('31-Dec-89','dd-Mon-yy') THEN
RETURN (6);
RETURN;
- or -
IF birth_date BETWEEN to_date('01-Jan-89','dd-Mon-yy') AND to_date('31-Dec-89','dd-Mon-yy') THEN
school_grade := 9
RETURN school_grade;
-- Read the birth_date into the main procedure so that the value returned from the subprocedure or function can populate the birth_date column.
To give you an idea of what I've already done:
SQL>
SQL> CREATE OR REPLACE PROCEDURE add_tests (v_school_grade IN NUMBER) AS
2
3 v_counter NUMBER(3) := 0;
4 v_num_students CONSTANT NUMBER(3) := 300;
5 v_students_test1 NUMBER := 0;
6 v_students_test2 NUMBER := 0;
7 v_student_id VARCHAR2(5);
8 v_course1 VARCHAR2(2);
9 v_course2 VARCHAR2(2);
10 v_course3 VARCHAR2(2);
11 v_course4 VARCHAR2(2);
12 v_student_grade NUMBER(1) := 0;
13 v_test_score NUMBER(3) := 0;
14 v_course_final_grade NUMBER(1) := 0;
15 v_birth_date DATE;
16
17 FUNCTION pkg_get_grade RETURN NUMBER
18 IS
19
20 v_birth_date DATE;
21 v_school_grade NUMBER(1) :=0;
22
23 CURSOR grade_cur IS
24 SELECT birth_date FROM students;
25
26 BEGIN
27 OPEN grade_cur;
28 LOOP
29 FETCH grade_cur INTO v_birth_date;
30
31 EXIT WHEN grade_cur%NOTFOUND;
32
33 -- Assign student grade
34
35 -- 9th Grade
36
37 IF v_birth_date < TO_DATE('01-Jan-87','DD-Mon-YY') THEN
38 v_school_grade := 9;
39
40 -- 8th grade
41
42 ELSIF v_birth_date BETWEEN
43 TO_DATE('01-Jan-87','DD-Mon-YY') AND
44 TO_DATE('31-Dec-87','DD-Mon-YY') THEN
45
46 v_school_grade := 8;
47
48 -- 7th grade
49
50 ELSIF v_birth_date BETWEEN
51 TO_DATE('01-Jan-88','DD-Mon-YY') AND
52 TO_DATE('31-Dec-88','DD-Mon-YY') THEN
53
54 v_school_grade := 7;
55
56 -- 6th grade
57
58 ELSIF v_birth_date BETWEEN
59 TO_DATE('01-Jan-89','DD-Mon-YY') AND
60 TO_DATE('31-Dec-89','DD-Mon-YY') THEN
61
62 v_school_grade := 6;
63
64 -- 5th grade
65
66 ELSIF v_birth_date > TO_DATE('31-Dec-89','DD-Mon-YY') THEN
67
68 v_school_grade := 5;
69
70 END IF; -- end if loop for student's grade
71 END LOOP; -- end loop for grade_cur
72 CLOSE grade_cur; -- close cursor for assigning grade
73 RETURN v_school_grade;
74
75 END pkg_get_grade;
76
77 PROCEDURE delete_test_info AS
78
79 BEGIN
80
81 DELETE FROM student_facts;
82
83 END delete_test_info;
84
85 BEGIN
86
87 -- Process student for tests
88
89 WHILE (v_counter <= v_num_students) LOOP
90 v_counter := v_counter + 1; -- initialize counter
91
92 -- Set student id
93
94 v_student_id := 'S'| |v_counter;
95
96 -- portion of students taking beginning of year tests
97
98 v_students_test1 := v_num_students * .95;
99
100
101 -- Portion of students taking end of year tests
102
103 v_students_test2 := v_students_test1 * .80;
104
105
106 -- Est. test scores between 20 and 100
107
108 v_test_score := random.rand_max(80) + 20;
109
110
111 -- Est. final grade for course between 0 and 4
112
113 v_course_final_grade := random.rand_max(4);
114
115
116 -- Process tests for courses
117
118 IF v_counter < ROUND(v_num_students * .20) THEN
119 v_course1 := 'C1';
120 v_course2 := 'C2';
121 v_course3 := 'C3';
122
123 ELSIF v_counter BETWEEN ROUND(v_num_students * .20)
124 AND ROUND(v_num_students * .40) THEN
125
126 v_course1 := 'C2';
127 v_course2 := 'C1';
128 v_course3 := 'C3';
129
130 ELSE IF v_counter BETWEEN ROUND(v_num_students * .40)
131 AND ROUND(v_num_students * .60) THEN
132
133 v_course1 := 'C3';
134 v_course2 := 'C1';
135 v_course3 := 'C2';
136
137 ELSE IF v_counter BETWEEN (v_num_students * .60)
138 AND ROUND(v_num_students * .80) THEN
139
140 v_course1 := 'C3';
141 v_course2 := 'C1';
142 v_course3 := 'C2';
143
144 ELSE
145 v_course1 := 'C4';
146 v_course2 := 'C2';
147 v_course3 := 'C3';
148
149 END IF;
150 END IF;
151 END IF;
152
153 -- Input test information for students
154
155 -- Beginning of year test for Course 1
156
157 IF v_counter <= v_students_test1 THEN
158 INSERT INTO studentfacts
159 VALUES(v_student_id, v_course1, 'ACH1999',
160 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
161 v_student_grade, v_course_final_grade, v_test_score);
162 ELSE
163 INSERT INTO studentfacts
164 VALUES(v_student_id, v_course1, 'ACH1999',
165 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
166 v_student_grade, v_course_final_grade, NULL);
167 END IF;
168
169
170 -- End of year test for Course 1
171
172 IF v_counter <= v_students_test2 THEN
173 INSERT INTO studentfacts
174 VALUES(v_student_id, v_course1,'ACH2000',
175 TO_DATE('01-JUN-2001','DD-MON-YYYY'),
176 v_student_grade, v_course_final_grade, v_test_score);
177 ELSE
178 INSERT INTO studentfacts
179 VALUES(v_student_id, v_course1, 'ACH2000',
180 TO_DATE('01-JUN-2001','DD-MON-YYYY'),
181 v_student_grade, v_course_final_grade, NULL);
182 END IF;
183
184
185 -- Beginning of year test for Course 2
186
187 IF v_counter <= v_students_test1 THEN
188 INSERT INTO studentfacts
189 VALUES(v_student_id, v_course2, 'ACH1999',
190 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
191 v_student_grade, v_course_final_grade,
192 v_test_score);
193 ELSE
194 INSERT INTO studentfacts
195 VALUES(v_student_id, v_course2, 'ACH1999',
196 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
197 v_student_grade, v_course_final_grade, NULL);
198 END IF;
199
200
201 -- End of year test for Course 2
202
203 IF v_counter <= v_students_test2 THEN
204 INSERT INTO studentfacts
205 VALUES(v_student_id, v_course2,'ACH2000',
206 TO_DATE('01-JUN-2001''DD-MON-YYYY'),
207 v_student_grade, v_course_final_grade,
208 v_test_score);
209 ELSE
210 INSERT INTO studentfacts
211 VALUES(v_student_id, v_course2, 'ACH2000',
212 TO_DATE('01-JUN-2001','DD-MON-YYYY'),
213 v_student_grade, v_course_final_grade, NULL);
214 END IF;
215
216
217 -- Beginning of year test for Course 3
218
219 IF v_counter <= v_students_test1 THEN
220 INSERT INTO studentfacts
221 VALUES(v_student_id, v_course3, 'ACH1999',
222 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
223 v_student_grade, v_course_final_grade,
224 v_test_score);
225 ELSE
226 INSERT INTO studentfacts
227 VALUES(v_student_id, v_course3, 'ACH1999',
228 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
229 v_student_grade, v_course_final_grade, NULL);
230 END IF;
231
232
233 -- End of year test for Course 3
234
235 IF v_counter <= v_students_test2 THEN
236 INSERT INTO studentfacts
237 VALUES(v_student_id, v_course3,'ACH2000',
238 TO_DATE('01-JUN-2001','DD-MON-YYYY'),
239 v_student_grade, v_course_final_grade,
240 v_test_score);
241 ELSE
242 INSERT INTO studentfacts
243 VALUES(v_student_id, v_course3, 'ACH2000',
244 TO_DATE('01-JUN-2001','DD-MON-YYYY'),
245 v_student_grade, v_course_final_grade, NULL);
246 END IF;
247
248
249 -- Beginning of year test for Course 4
250
251 IF v_counter <= v_students_test1 THEN
252 INSERT INTO studentfacts
253 VALUES(v_student_id, v_course4, 'ACH1999',
254 TO_DATE('01-SEP-1999','DD-MON-Y YYY'),
255 v_student_grade, v_course_final_grade,
256 v_test_score);
257 ELSE
258 INSERT INTO studentfacts
259 VALUES(v_student_id, v_course4, 'ACH1999',
260 TO_DATE('01-SEP-1999','DD-MON-YYYY'),
261 v_student_grade, v_course_final_grade, NULL);
262 END IF;
263
264
265 -- End of year test for Course 4
266
267 IF v_counter <= v_students_test2 THEN
268 INSERT INTO studentfacts
269 VALUES(v_student_id, v_course4,'ACH2000',
270 TO_DATE('01-JUN-2001', 'DD-MON-YYYY'),
271 v_student_grade, v_course_final_grade, v_test_score);
272 ELSE
273 INSERT INTO studentfacts
274 VALUES(v_student_id, v_course4, 'ACH2000',
275 TO_DATE('01-JUN-2001','DD-MON-YYYY'),
276 v_student_grade, v_course_final_grade, NULL);
277
278 END IF;
279 END LOOP;
280 END add_tests;
281 /
Procedure created.
SQL>
SQL> show errors
No errors.
SQL>
SQL> Input truncated to 9 characters
spool off
When I executed the main procedure, no data populated the student_table. I've tried several things, but I was not still able to populate the student_fact table (I've been at this for more than a week now, but haven't figured a way to populate the student_facts table with at least 1800 rows). Can you tell me what I need to change (if anything) whether if I need to structure things differently? I'm thinking that I missed something in calling the birth_date into the main procedure or returning the value from either a function or subprocedure. Related to the random final grade -- is there a way to sum the totals of the test scores (each student will have three), and generate a final grade from these values.
I also compiled successfully a package containing this same information, but don't know how to execute it to see whether this approach works.
Many thanks to anyone who can help.
nullldsw,
I am not sure if I totally understand everything that you are trying to do, but I tried to clean up your code and what is listed below is what I came up with. Please see if you can make use of any of it.
SQL> EDIT ldsw
CREATE OR REPLACE PACKAGE ldsw
AS
CURSOR grade_cur
IS
SELECT birth_date
FROM students;
PROCEDURE delete_test_info;
FUNCTION get_grade
(v_birth_date IN DATE)
RETURN NUMBER;
PRAGMA RESTRICT_REFERENCES (get_grade, WNDS, WNPS, RNDS, RNPS);
PROCEDURE add_tests;
END ldsw;
CREATE OR REPLACE PACKAGE BODY ldsw
AS
v_student_grade NUMBER (1) := 0;
PROCEDURE delete_test_info
IS
BEGIN
DELETE FROM studentfacts;
END delete_test_info;
FUNCTION get_grade
(v_birth_date IN DATE)
RETURN NUMBER
IS
v_school_grade NUMBER (1) := 0;
BEGIN
IF v_birth_date < TO_DATE ('01-Jan-1987', 'DD-Mon-YYYY')
THEN
v_school_grade := 9;
ELSIF v_birth_date BETWEEN TO_DATE ('01-Jan-1987', 'DD-Mon-YYYY') AND TO_DATE ('31-Dec-1987', 'DD-Mon-YYYY')
THEN
v_school_grade := 8;
ELSIF v_birth_date BETWEEN TO_DATE ('01-Jan-1988', 'DD-Mon-YYYY') AND TO_DATE ('31-Dec-1988', 'DD-Mon-YYYY')
THEN
v_school_grade := 7;
ELSIF v_birth_date BETWEEN TO_DATE ('01-Jan-1989', 'DD-Mon-YYYY') AND TO_DATE ('31-Dec-1989', 'DD-Mon-YYYY')
THEN
v_school_grade := 6;
ELSIF v_birth_date > TO_DATE ('31-Dec-1989', 'DD-Mon-YYYY')
THEN
v_school_grade := 5;
END IF;
RETURN v_school_grade;
END get_grade;
PROCEDURE add_tests
IS
v_num_students CONSTANT NUMBER (3) := 300;
v_students_test1 NUMBER := 0;
v_students_test2 NUMBER := 0;
v_counter NUMBER (3) := 0;
v_student_id VARCHAR2 (5);
v_test_score NUMBER (3) := 0;
v_course_final_grade NUMBER (1) := 0;
v_course1 VARCHAR2 (2) := NULL;
v_course2 VARCHAR2 (2) := NULL;
v_course3 VARCHAR2 (2) := NULL;
v_course4 VARCHAR2 (2) := NULL;
BEGIN
ldsw.delete_test_info;
v_students_test1 := v_num_students * .95;
v_students_test2 := v_students_test1 * .80;
FOR rec IN grade_cur
LOOP
v_counter := v_counter + 1;
IF v_counter <= v_num_students
THEN
v_student_id := 'S' | | TO_CHAR (v_counter);
v_test_score := random.rand_max (80) + 20;
v_course_final_grade := random.rand_max (4);
IF v_counter < ROUND (v_num_students * .20)
THEN
v_course1 := 'C1';
v_course2 := 'C2';
v_course3 := 'C3';
ELSIF v_counter BETWEEN ROUND (v_num_students * .20) AND ROUND (v_num_students * .40)
THEN
v_course1 := 'C2';
v_course2 := 'C1';
v_course3 := 'C3';
ELSIF v_counter BETWEEN ROUND (v_num_students * .40) AND ROUND (v_num_students * .60)
THEN
v_course1 := 'C3';
v_course2 := 'C1';
v_course3 := 'C2';
ELSIF v_counter BETWEEN ROUND (v_num_students * .60) AND ROUND (v_num_students * .80)
THEN
v_course1 := 'C3';
v_course2 := 'C1';
v_course3 := 'C2';
ELSE
v_course1 := 'C4';
v_course2 := 'C2';
v_course3 := 'C3';
END IF;
SELECT ldsw.get_grade (rec.birth_date)
INTO v_student_grade
FROM DUAL;
IF v_counter <= v_students_test1
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course1,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course1,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test2
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course1,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course1,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test1
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course2,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course2,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test2
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course2,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course2,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test1
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course3,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course3,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test2
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course3,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course3,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test1
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course4,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course4,
'ACH1999',
TO_DATE ('01-SEP-1999', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
IF v_counter <= v_students_test2
THEN
INSERT INTO studentfacts
VALUES (v_student_id,
v_course4,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
v_test_score);
ELSE
INSERT INTO studentfacts
VALUES (v_student_id,
v_course4,
'ACH2000',
TO_DATE ('01-JUN-2001', 'DD-MON-YYYY'),
v_student_grade,
v_course_final_grade,
NULL);
END IF;
END IF;
END LOOP;
END add_tests;
END ldsw;
Save the file.
SQL> START ldsw
Package created.
Package body created.
SQL> EXECUTE ldsw.add_tests
PL/SQL procedure successfully completed.
SQL> SELECT * FROM student_facts;
null -
Dynamically generating Ok_Code for select option of HUMO t-code
Hi Gurus ,
I have used BDC call transaction method in my program to call the HUMO t-code and populating the handling unit in the select option . The ok_code of the select option is written in the program as :
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00120100000003011'.
Now these ok_code value is changing inside the ECC landscape , In all Non-production system the value remains same but in the production system the ok_code value is different , because of this program is successfully executing in non-production but not in production .
If anyone of you have come across situation like this , please help me how to help hold of this ok_code or can we generate in dynamically . For temporary solution i have coded it based on the system like shown below but I am looking for a permanent solution
IF syst-sysid = 'EWP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00120100000003011'.
ELSE.
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00120100000718796'.
ENDIF.
Regards
AnshumanHi Gurus ,
I have used BDC call transaction method in my program to call the HUMO t-code and populating the handling unit in the select option . The ok_code of the select option is written in the program as :
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00120100000003011'.
Now these ok_code value is changing inside the ECC landscape , In all Non-production system the value remains same but in the production system the ok_code value is different , because of this program is successfully executing in non-production but not in production .
If anyone of you have come across situation like this , please help me how to help hold of this ok_code or can we generate in dynamically . For temporary solution i have coded it based on the system like shown below but I am looking for a permanent solution
IF syst-sysid = 'EWP'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00120100000003011'.
ELSE.
PERFORM bdc_field USING 'BDC_OKCODE'
'=%00120100000718796'.
ENDIF.
Regards
Anshuman -
Not exactly iweb - need help with a graphic for my site
This doesn't fit anywhere so dumping it here. I drew by hand a graphic I want to use with iweb to put on my site as my site's logo. Main problem is that getting the background transparent isn't working well as when it was scanned the scanner didn't back the background "pure" white. I have tried adjusting the whitepoint and setting the color depth down, but still no good. I don't know a ton about graphic program use. I have an older copy of graphic converter that came on this powerbook when i got it. I would be fine having the graphic loose the marker look and have solid fill colors - just I am not good enough with computer drawing tools to do it on the computer! So I either need to get a volunteer to help me out, or some help with some detailed instructions to get this to work out... (also I am broke so no cost/shareware is only option here)
many thanks!!!!
I can get you a scanned jpg of the pic if needed.THANK YOU/___sbsstatic___/migration-images/migration-img-not-avail.png so the tolerance makes it not care so much about the gradations in color? what else is tolerence good for?
I have a cleaner copy now after someone suggested GIMP, so played with it last night - though couldn't figure out transparency - that was clear on converter- just not cooperative till these wonderful directions.
So now I know how to do it without messing with the pic, and with messing with it - both good lessons and got a bit brighter color out of the deal.
many thanks for the straightforward and clear directions, they worked perfectly/___sbsstatic___/migration-images/migration-img-not-avail.png extra strars for you/___sbsstatic___/migration-images/migration-img-not-avail.png -
NEED HELP - Skype Phone icons for my site - one fo...
I need help please
I have a website with 1000+ members (1000+ phone numbers). I need members to call each other once we give them approval to contact via phone. However, I don't want them to see each other's number (also, it should show while dialing) but just click on logo and the other site phone rings (system will search database and call number assosiated to a profile.)
I have my PHP developers but they are not sure how to even start and out of ideas. And even if we do it on our website, will it destroy our site's performance/bandwidth...etcHi, Tamer732,
I have learned the best course is to please contact Skype Customer Service with your enquiry. Here is the link to use: https://support.skype.com/en/faq/FA1170/how-can-i-contact-skype-customer-service
Please report back if you do not receive a timely or complete reply.
Best regards,
Elaine
Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often! -
Generating data for the next90days
Hi
Could someone let me know how to get a report for the 'Next90days', this should be dynamic. Something similar to 'Next30days',
Regards
CauveryA few ways of getting Next90Days:
{table.date} in currentdate to currentdate +90;
{table.date} in minimum(Next30Days) to maximum(Next61To90Days);
{table.date} in minimum(Next30Days) to maximum(Next30Days)+60; -
Hi,
i have share point list like below
ID name AdminEmail Useremail URl DueDate UploadSatus
1 ppp [email protected] [email protected] url some date uploaded
2 yyy [email protected] [email protected] url somedate empty
3 xxx [email protected] [email protected] url somedate empty
4 jjj [email protected] [email protected] url somedate emp
AdminEmail and UserEmail are lookup column
i using query the list using caml query
inside of foreach i am checking two condition like below
one is upload status in not empty
i need to send to mail to admin user this part i have done my adding all list items which have datatable apply group by working fine
in send condition i am checking difference between DueDate And current date value
if the value is =1 or -1
if the value is i
thank
i am getting the
table like below
ID name AdminEmail Useremail URl DueDate Upload
2 yyy [email protected] [email protected] url somedate empty
3 xxx [email protected] [email protected] url somedate empty
4 jjj [email protected] [email protected] url somedate empty
my issue is here how can i get the dynamic table rows which are same values of AdminEmail and user email one set and distintict rows are another set
sets which are same emails are same
3 xxx [email protected] [email protected] url somedate empty
4 jjj [email protected] [email protected] url somedate empty
set 2
2 yyy [email protected] [email protected] url somedate empty
how can i get this separate this can any one tell i need to send mail only one time to user [adim and user] .planing to aviod duplicate mail
Srinivasyour case better to use the two data tables to store the data
DataTable dt = list.Items.GetDataTable();
foreach (DataRow row in dt.Rows) -
Help dynamically generating RTF table of contents
I inserted a TOC in word (Insert -> References -> Index & Tables -> TOC) into my template. I then set the TITLE field to level 1 and the EPI_COLUMN4 field to level 2 and then did a Update TOC -> Entire table:
<?TITLE?> <!-- set as level 1 -->
<?for-each:CHAPTER1_ROW?>
<?EPI_COLUMN4?> <!-- set as level 2 -->
<?EPI_CLOB1?>
<?end for-each?>
When generating the preview my TOC looks like:
CHAPTER 1..........................................0
EPI_COLUMN4..................................... 0
1. Its not repeating the multiple EPI_COLUMN4, only shows the first
2. It doesn't show the value of EPI_COLUMN4 instead shows EPI_COLUMN4??I have done TOC,
let me look at your files
send me the xml and template to
fusion[dot]object[at]gmail[dot]com
Maybe you are looking for
-
Backup of the OS to a USB flashdrive
I rather restart from scratch, and reinstall Windows 8 on my B580 i5 I saw, in another post, this http://support.lenovo.com/en_US/downloads/detail.page?DocID=HT076024 The idea is to create a USB flash drive with the OS to reinstall. The method says:
-
Cprojects 3.1 and internal ITS
Dear Sirs, we are usign cprojects 3.1 in conjunction with internal ITS on WAS 6.40. In accounting and other places where there are links to SAP transactions, when clicked, they open a new window with the following url. host/scripts/wgate/webgui/!?Cal
-
hi all, i;m trying to burn a dvd with my photos, it seemed to to be working but when i open the dvd its empty. i have copied all my photos from i photo to a folder on desktop, therfore i want to burn from desktop folder to dvd, please help
-
Standardrole for BI developer in productive SAP R/3
Hi. We are building up a new SAP BW environment from the scratch and our base support does not like that we requested access to the productive SAP R/3 to administrate the extractors. If there a standard role available that can be given to SAP BI deve
-
How to create new filed in vendor master
Dear Guru's, Our client wants to see all related group vendros, when he post the invoice, now i want to create new field for related group in vendor master, is it possible to create, please tell the process thanks in advance. gopi.