JavaScript: Help with IF statement
I'm not familiar with Java and I fight with this IF statement and I can't make it work. I'm sure it's something pretty basic. Can anyone help? I tried everything, seeminly. In this example below I'm checking if the data that the user has entered in the field of the AAA FAVOR and if it is then put in place a message and if not then set up another message. My top node in my hierarchy is data, and then I have a MainSubform and a Contact02Subform. I have this code attached to a button and notthing happens when I click the button. If I delete the statement and have just the box of message by itself, then it will display the message box. So I know that's my statement and I'm sure it's simple. Help please?
If
{
xfa.host.messageBox ("my IF");else ; xfa.host.messageBox ("my ELSE"); endif;
Try this.
If (rawValue. xfa.resolveNode("xfa.form.data.MainSubform.Contact02Subform.FAVOR") is 'AAA')
{
xfa.host.messageBox ("my IF");
}
on the other
{
xfa.host.messageBox ("my ELSE");
}
endif is used in FormCalc are generally not in JavaScript.
Thank you
Sidonie.
Tags: Adobe LiveCycle
Similar Questions
-
Need help with update statement to be used in the stored procedure
I have the following update statement and I get "ORA-06512. Someone of you can help me.
----
UPDATE MO X SET X.MOMODEL = (SELECT Y.MOMODEL FROM MO Y WHERE Y.MOID = A_TEMP_INT3)
WHERE X.MOID in (UPDATE MO X SET X.MOMODEL = (SELECT Y.MOMODEL FROM MO Y WHERE Y.MOID = A_TEMP_INT3)
WHERE X.MOID in (A_TEMP_INT1, (select assocchild from mo_association
Connect prior assocchild = assocparent
Start with assocparent = A_TEMP_INT1)); (by selecting assocchild in mo_association
Connect prior assocchild = assocparent
Start with assocparent = A_TEMP_INT1));
----
Note: A_TEMP_INT1 and A_TEMP_INT3 are the values of cursor and is assigned to numeric values in the code.
Thanks for all the help in advance.
Kind regards
REDAWHERE X.MOID IN (SELECT ASSOCCHILD FROM MO_ASSOCIATION CONNECT BY PRIOR ASSOCCHILD = ASSOCPARENT START WITH ASSOCPARENT = A_TEMP_INT1 UNION SELECT A_TEMP_INT1 FROM DUAL );
Should work.
VR,
Sudhakar B. -
Help with If statement in menu drop down
Hello
I'm not too familiar with the implementation of the custom scripts and I was wondering if someone here might be able to help me. I'm figuring a discount in the form of price value if the customer applies for a military/senior discount, but if the customer is not applicable I want the field to calculate the total without factoring in a shed.
I took a screenshot and circled the field that concerns me in red. If someone could help I would be very happy!
Suppose that the names of the fields are "Subtotal", "Discount military" and "military discount amount.
You can use this code as the custom of the latter calculation script:
if (this.getField("Military Discount").value=="Yes") event.value = Number(this.getField("Subtotal").value) * 0.05; else event.value = "";
-
Hello all and thanks in advance. I'm sorry if I am posting this in the wrong section. Could someone show me how I can write this statement in oracle? for now, I have as an SQL statement in asp.net VB. Any help would be greatly appreciated!
SELECT DISTINCT EQP_SERIAL_EQP, EQP_TYP_EQP in #TEMP
of EQP_BASE
where EQP_LOCAL_EQP = right (' 000000000000' + ' "& DDLTECHNUMBERS." ") Text & "(', 16) AND EQP_STAT_EQP IN ('C', ' t ',' K')"
EQP_TYP_EQP GROUP, EQP_SERIAL_EQP
SELECT DISTINCT EQP_TYP_EQP AS TYPE, count (1) AS COUNTY GROUP #TEMP BY EQP_TYP_EQP
TRUNCATE TABLE #TEMP
DROP TABLE #TEMP
Thank you
EHello
SELECT DISTINCT EQP_SERIAL_EQP, EQP_TYP_EQP Into #TEMP from EQP_BASE where EQP_LOCAL_EQP = right('000000000000' + '" & DDLTECHNUMBERS.Text & "', 16) AND EQP_STAT_EQP IN ('C','T','K') GROUP BY EQP_TYP_EQP, EQP_SERIAL_EQP SELECT DISTINCT EQP_TYP_EQP AS TYPE, count(1) AS COUNT from #TEMP GROUP BY EQP_TYP_EQP
SELECT DISTINCT temp. EQP_TYP_EQP AS TYPE,
Count (1) AS COUNT
Of
(
SELECT DISTINCT EQP_SERIAL_EQP, EQP_TYP_EQP
of EQP_BASE
where EQP_LOCAL_EQP = substr ("000000000000' |") DDLTECHNUMBERS. Text 1: 16)
AND EQP_STAT_EQP IN ('C', 'T ', ' K')
EQP_TYP_EQP GROUP, EQP_SERIAL_EQP
) temp
Temp GROUP BY. EQP_TYP_EQP-Pavan Kumar N
-
So I am new to SQL and ORACLE. I need to know how to do the commands below in a single statement. I did it in two here, but I have no idea how do it in one. Any ideas?
ALTER TABLE books
ADD Catcode VARCHAR2 (3);
ALTER TABLE books
ADD CONSTRAINT books_catcode_fk FOREIGN KEY (catcode)
REFERENCES (catcode) category;
Any help appreciated ^^SQL> ed Wrote file afiedt.buf 1 alter table books 2 add( catcode varchar2(3), 3 constraint books_catcode_fk 4 foreign key( catcode ) 5* references category( catcode ) ) SQL> / Table altered.
Justin
-
Help with If statement emergency please!
Hello world
I wonder if someone can tell me why flash seems to ignore my statements if, whenever I try to use an it ignores the condition and fair actions command. Its driving me crazy. I don't know that I do something wrong, I just can't cope.
I put;
on (release) {}
If ((_root.eyeshadow = "Rose") & & (_root.lipy = 'Pink')) {}
_root.correct._alpha = 100;
}
}
It seems just action _root.correct._alpha = 100;
even when a different color is selected.
I was wondering can flash read a variable from another script, because otherwise it will not know what eyeshadow and lípy are. I get no error message though.
Please help someone!
Thank you
Stacy.x.
is this variable declared at the root?
like you did here
_root.eyeshadow1._alpha = 100;I'm not sure because I don't know what you have
-
Help with mousedown State in phone version
Hello
I am having some problems affecting the mousedown State in the version of phone of my site.
You can check it out here: www.betterargentina.com
On the portfolio page, I have some information hidden behind the bottle and when someone clicks on the bottle that he was supposed to appear in the text. Here, it works only in some bottles, in anothers nothing happens and in a few the right image is empty, but it has quite the same way.
Someone might know why this is happening or know another way I can program the phone interactions?
Thanks in advance.
Rita Gomes
Using the effects Panel, change the opacity for the blocks of text inside buttons from 0 to 100% State in the rollover State.
-
Need a bit of JavaScript help with deactivation of a selection list in a table frm
Hello people
Here's the scenario.
I have a tabular presentation which, subject to the setting from the list, select I want to toggle each other.
I've had to date and it allows to disable a text element, but not a list of selection...
It is in the HTML of the page header section...
< script type = "text/javascript" >
function test (pThis)
{
var currIndex = $('select[name="'+pThis.name+'"]').index (pThis);
If (pThis.value == '2') {}
. style.backgroundColor $('input[name="f02"]') [currIndex] = "LightGrey";
$('input[name="f02"]') [currIndex] .disabled = true;
}
}
The report is defined as...
SELECT iot_rebate_type_id apex_item.text (1, ir.iot_rebate_type_id)
apex_item.select_list_from_lov_xl(2,ir.rebate_currency,'LOV_CURRENCY_CODES') rebate_currency
To iot_rebate ir
WHERE ir.iot_agreement_id =: P303_IOT_AGREEMENT_ID
The iot_rebate_type_id column is an attribute of the column element value...
OnChange = "JavaScript:test (this); »
As I say, if I set the currency of repayment as a text element, the JavaScript works fine.
Can anyone offer any suggestions?
Thank you very much
Simon
Request Express 4.0.2.00.07Sounds familiar to me...
to manage selection lists change the function javascript like this
function test(pThis) { var currIndex = $('select[name="'+pThis.name+'"]').index(pThis); if (pThis.value=='2') { $('select[name="f02"]')[currIndex].style.backgroundColor = "LightGrey"; $('select[name="f02"]')[currIndex].disabled=true; } }
-
Can someone help with this statement?
SELECT count (*) from document_master
where PROJ_id = "888"
and doc_status = 'I '.
and rec_update_date like ' % 08'.
rec_update_date desc order
This gives result numbered for a column that ends in 08.
Can someone tell me how to generate a list of 09, 08, 07, 06, etc...
I tried
and rec_update_date like ' %-08' or rec_update_date like ' %-09'.
I also tried
and rec_update_date like ' % 08'.
and rec_update_date like ' %-09'.
neither work.
I appreciate all help.
Thank youWhat is the rec_update_date column data type? It if DATE, right? If so, you question is completely wrong. Condition rec_update_date like ' %-08' force the implicit conversion from DATE to string using default data format that's in your case, be MON-JJ-AA and dependent client session.» So if the user whose session has different default date format runs your code it will not get the expected results:
SQL> alter session set nls_date_format = 'DD-MON-YY'; Session altered. SQL> select sysdate from dual; SYSDATE --------- 31-JUL-09 SQL> select sysdate from dual where sysdate like '%-09'; SYSDATE --------- 31-JUL-09 SQL> alter session set nls_date_format = 'MM/DD/YYYY'; Session altered. SQL> select sysdate from dual; SYSDATE ---------- 07/31/2009 SQL> select sysdate from dual where sysdate like '%-09'; no rows selected SQL>
Looks like you want to select counties of line for each year. If so, use:
select trunc(rec_update_date,'YYYY'),count (*) from document_master where PROJ_id = '888' and doc_status = 'I' group by trunc(rec_update_date,'YYYY') order by trunc(rec_update_date,'YYYY') desc /
SY.
-
Help with the insert statement
Hello
I was wondering if someone could help write me a sql statement.
Here is my table:
Here are the instructions for correct insertion. This time, I posted 2 examples with 2 numbers different otherwise.CREATE TABLE "TEMP_INVOICE" ("INVOICE" VARCHAR2(100 BYTE), "DATE_OF_DOCUMENT" DATE, "DATE_OF_PAY_DAY" DATE, "D" NUMBER, "K" NUMBER );
I want to do is make an insert allows you to table another call is MADE:insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (1000,to_date('01.02.2012','dd.mm.yyyy'),to_date('01.03.2012','dd.mm.yyyy'),5000,0); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (1000,to_date('01.04.2012','dd.mm.yyyy'),'','',1000); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (1000,to_date('01.05.2012','dd.mm.yyyy'),'','',3000); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (1000,to_date('01.06.2012','dd.mm.yyyy'),'','',1000); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (2000,to_date('01.07.2012','dd.mm.yyyy'),to_date('01.09.2012','dd.mm.yyyy'),8000,0); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (2000,to_date('01.10.2012','dd.mm.yyyy'),'','',5000); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (2000,to_date('01.11.2012','dd.mm.yyyy'),'','',2000); insert into temp_invoice (invoice,DATE_OF_DOCUMENT,DATE_OF_PAY_DAY,d,k) values (2000,to_date('01.12.2012','dd.mm.yyyy'),'','',1000);
Statements in the INVOICE table should be like this:CREATE TABLE "INVOICE" ("INVOICE" VARCHAR2(100 BYTE), "DATE_OF_DOCUMENT" DATE, "DATE_OF_PAY_DAY" DATE, "DATE_OF_PAYMENT_REC" DATE, "VALUE" NUMBER, "VALUE_DEDUCT" NUMBER, "DATE_FROM" DATE, "DATE_TO" DATE );
........ The Bill... date_of_document... date_of_pay_day... date_of_payment_rec... value... value_deduct... Date_from... Date_to
1...... 1000...............1.1.2012.................1.3.2012................NULL............................ 5000... NULL... 1.3.2012...1.4.2012
2...... 1000...............1.4.2012.................NULL..................... 1.4.2012...1000... 4000... 2.4.2012... 1.5.2012
3...... 1000...............1.5.2012.................NULL..................... 1.5.2012...3000... 1000... 2.5.2012... 1.6.2012
4...... 1000...............1.6.2012.................NULL..................... 1.6.2012...1000
Can someone help me with the sql statement that would insert data from table to table Bill temp_invoice as in the example?
Thank you!
PS
I would try to explain.
(1) the first statement that is to be inserted is original imply that at which is different DATE_OF_PAY_DAY to NULL.
To this inserted negative of the original imply, we must add date_from that is exatly the same date_of_pay_day and date_to which is exactly the same as the date of the first payment. Payment which came first!
(2) we have now in the second insert statement. It will be the first payment of lease with date_of_document and date_pf_payment_rec, which is the same as date_fo_document. Value field will be populated with the amount of payment received and value_deduct field will be the value of the original imply - value of the first payment. Date is date_of_document + 1 and date_to is the date of the next payment.
(3) Insert us the next installment. Date_od_payment_rec is the same as date_of_document... value is the amount of the second payment and value_deduct's previous value_deduct which was of 4000 - value of this second payment. date_from date_of_payment_rec + 1 and date_to is the date of the next payment
So we continue this same pattern until we reached the final payment when we finish insert with the statement:
Date of the document (date of the last payment received) and even for date_of_payment_rec and field value with the amount of the payment receieved. The rest (value_deduct, date_from, date_to) is null.
I really hope you understand what I'm trying to do here.
If you have any other questions please.
Published by: user13071990 on November 22, 2012 04:16
Published by: user13071990 on November 22, 2012 04:16Hello
user13071990 wrote:
... Here are the instructions for correct insertion. This time, I posted 2 examples with 2 numbers different otherwise.Ok!
Be sure to post the results you want new data.You probably need to add "PARTITION BY the Bill" to all analytical clauses in my solution:
INSERT INTO invoice ( invoice, date_of_document, date_of_pay_day, date_of_payment_rec , value, value_deduct, date_from, date_to ) SELECT invoice , date_of_document , date_of_pay_day , CASE WHEN k > 0 THEN date_of_document END AS date_of_payment_rec , NVL (d, k) AS value , NVL2 ( date_of_pay_day , NULL , SUM (d) OVER ( PARTITION BY invoice ORDER BY date_of_document ) - SUM (k) OVER ( PARTITION BY invoice ORDER BY date_of_document ) ) AS value_deduct , NVL ( date_of_pay_day , date_of_document + 1 ) AS date_from , LEAD (date_of_document) OVER ( PARTITION BY invoice ORDER BY date_of_document ) AS date_to FROM temp_invoice ;
Because I'm not an English speaker nativ, that I just posted what it should look like after the insert is successful.
OK, so you can't explain as you want, but you still need to explain.
... @Frank Kulash: you are very close, but still not quite what I'm looking for.
Point out where my solution is the production of incorrect results, and explain (as you can) how to get good results in these places.
-
need help with the Update statement
Hello
I received a question in a course and I tried my best to respond, and now my brain is giving. I would really appreciate help with the update statement. I don't mind if you do not validate a solution, a little nudge in the right direction would be really useful. I'll post that I got.
THE QUESTION
/ * For these agents disabled on more than seven missions, change their date of deactivation of the first date of deactivation of all the agents that have been activated in the same year as the agent that you update currently.
*/
I have it divided into parts, here is my select statement to agents disabled on more than 7 missions, which produces the deactivation_dates in the agents table that I want to update...
.. .and the code for the first date of deactivation for each year of activation agentSELECT s.deactivation_date FROM ( SELECT a.deactivation_date, count(m.mission_id) as nomissions FROM agents a INNER JOIN missions_agents m on a.agent_id=m.agent_id GROUP BY a.deactivation_date ) s WHERE s.nomissions>7 AND s.deactivation_date IS NOT NULL
..... I am not real to marry these two statements together in the Update statement. I can't extract each date of deactivation produced in the first select statement and their match against the first date of deactivation in the year they have been activated for the second select statement.select a2.deactivation_date from agents a2 where a2.deactivation_date= ( select min(a.deactivation_date) from agents a where to_number(to_char(a.activation_date,'YYYY'))=to_number(to_char(a2.activation_date,'YYYY')) )
Any help greatly appreciated... :))I began to wonder how things would :)
user8695469 wrote:
First of all why he chooses the date the earliest of all agentsUPDATE AGENTS_COPY AC /* (1) */ SET DEACTIVATION_DATE = ( SELECT MIN(AGS.DEACTIVATION_DATE) FROM AGENTS_COPY AGS , AGENTS_COPY AC /* (2) */ WHERE TRUNC(AGS.ACTIVATION_DATE,'YEAR') = TRUNC(AC.ACTIVATION_DATE,'YEAR') /* (3) */ )
He recovers as soon as the subquery has not been correctly set in the SET clause. It seems you are trying to update a correlated, but we are still having a conceptual shift. I have added a few comments to your code above and below will explain.
(1): when you do a correlated update it is useful to the table alias that you did right here.
(2): this table statement is not necessary and is the reason why the FIRST deactivation date is selected. The alias that you use (3) refers to THIS table, not the one defined in the update statement. Remove the line indicated by (2) in the FROM clause and a correlated update will happen.
and secondly why is it to update each row, when I thought that I'm just the lines where the agents are disabled and missions > 7? Pointers on where I'm wrong would be very appreciated. (SQL = stupid query language!) :)
user8695469 wrote: then why is it to update each row, when I thought that I'm just the lines where the agents are disabled and missions > 7? Pointers on where I'm wrong would be very appreciated. (SQL = stupid query language!) :)
WHERE EXISTS ( SELECT a.agent_id, count(m.mission_id) FROM agents a /* INNER JOIN AC ON AC.AGENT_ID = A.AGENT_ID */ INNER JOIN missions_agents m ON a.agent_id=m.agent_id GROUP BY a.agent_id, a.deactivation_date HAVING count(m.mission_id)>7 AND a.deactivation_date IS NOT NULL )
Once again this problem is similar to the question above that a correlation update doesn't work. Test existence of lines in an EXISTS subquery. Since your subquery is not related to the table that you are trying to update, it will be always return a line and, therefore, it returns true for EACH LINE in the AGENTS table. To limit the game to only agents > 7 missions results, you need to add a join condition that references the table in your update statement. I added one above (with comments) as a sample.
I recommend you look over all material that you have associated with correlated subqueries, including documents that I posted above. This seems to be what you're having the problem more with. If you need me to explain the concept of correlated queries any better please let me know.
Thank you!
-
Help with making SQL query references to column aliases in the Case statement
I need help with a sql query that I'm trying. I can go about it the wrong way, but I would be grateful if I could get any suggestions on possible solutions. This is my query:
SELECT DISTINCT spriden_pidm, spriden_id id, spriden_last_name | ',' | spriden_first_name name,
CASE
WHEN rcresar_comm_code_01 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_01
WHEN rcresar_comm_code_02 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_02
WHEN rcresar_comm_code_03 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_03
WHEN rcresar_comm_code_04 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_04
WHEN rcresar_comm_code_05 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_05
WHEN rcresar_comm_code_06 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_06
WHEN rcresar_comm_code_07 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_07
WHEN rcresar_comm_code_08 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_08
WHEN rcresar_comm_code_09 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_09
WHEN rcresar_comm_code_10 IN ('268 ', '269', ' 270') THEN rcresar_comm_code_10
END acg_elig_comm_code
CASE
WHEN acg_elig_comm_code = ' 268' THEN 'rigorous HS course. "
WHEN acg_elig_comm_code = '269' THEN ' 2 or several AP or IB"
WHEN acg_elig_comm_code = '270' THEN 'NOC as possible ".
END comm_code_description
OF spriden, rcresar, rcrapp1
WHERE (rcresar_comm_code_01 IN ('268 ', '269', ' 270')
OR rcresar_comm_code_02 ('268 ', '269', ' 270')
OR rcresar_comm_code_03 ('268 ', '269', ' 270')
OR rcresar_comm_code_04 ('268 ', '269', ' 270')
OR rcresar_comm_code_05 ('268 ', '269', ' 270')
OR rcresar_comm_code_06 ('268 ', '269', ' 270')
OR rcresar_comm_code_07 ('268 ', '269', ' 270')
OR rcresar_comm_code_08 ('268 ', '269', ' 270')
OR rcresar_comm_code_09 ('268 ', '269', ' 270')
OR rcresar_comm_code_10 ('268 ', '269', ' 270'))
Rcresar_aidy_code = & aidy_code
AND rcrapp1_aidy_code = rcresar_aidy_code
AND rcrapp1_curr_rec_ind = 'Y '.
AND rcrapp1_seq_no = rcresar_seq_no
AND spriden_pidm = rcresar_pidm
AND rcrapp1_pidm = rcresar_pidm
AND spriden_change_ind IS NULL
ORDER BY name
The second case statement is where I don't know exactly what it takes to get what I want.
Output should be like:
spriden_pidm name ID acg_elig_comm_code comm_code_description
«0000000000', ' 1111111111 ","John Doe","268", «rigorous HS race"»
If I take the second case statement it works great except that I do not have my comm_code description column. My question is how can I use my first statement value box to determine this column? I think that I need a case statement as I have, but I don't know how to reference the value of acg_elig_comm_code. Any help would be greatly appreciated. Thank you.
Published by: blackhole82 on January 20, 2009 09:20Hello
You cannot use the alias column in the query, even where it is set (except in the ORDER BY clause).
You can set the alias in a subquery and then use it in a great query, like this:WITH sub_q AS ( SELECT DISTINCT spriden_pidm,spriden_id id, spriden_last_name||', '||spriden_first_name name, CASE WHEN rcresar_comm_code_01 IN ('268','269','270') THEN rcresar_comm_code_01 WHEN rcresar_comm_code_02 IN ('268','269','270') THEN rcresar_comm_code_02 WHEN rcresar_comm_code_03 IN ('268','269','270') THEN rcresar_comm_code_03 WHEN rcresar_comm_code_04 IN ('268','269','270') THEN rcresar_comm_code_04 WHEN rcresar_comm_code_05 IN ('268','269','270') THEN rcresar_comm_code_05 WHEN rcresar_comm_code_06 IN ('268','269','270') THEN rcresar_comm_code_06 WHEN rcresar_comm_code_07 IN ('268','269','270') THEN rcresar_comm_code_07 WHEN rcresar_comm_code_08 IN ('268','269','270') THEN rcresar_comm_code_08 WHEN rcresar_comm_code_09 IN ('268','269','270') THEN rcresar_comm_code_09 WHEN rcresar_comm_code_10 IN ('268','269','270') THEN rcresar_comm_code_10 END acg_elig_comm_code -- Originally posted with , here (error) FROM spriden, rcresar, rcrapp1 WHERE (rcresar_comm_code_01 IN ('268','269','270') OR rcresar_comm_code_02 IN ('268','269','270') OR rcresar_comm_code_03 IN ('268','269','270') OR rcresar_comm_code_04 IN ('268','269','270') OR rcresar_comm_code_05 IN ('268','269','270') OR rcresar_comm_code_06 IN ('268','269','270') OR rcresar_comm_code_07 IN ('268','269','270') OR rcresar_comm_code_08 IN ('268','269','270') OR rcresar_comm_code_09 IN ('268','269','270') OR rcresar_comm_code_10 IN ('268','269','270')) AND rcresar_aidy_code = &aidy_code AND rcrapp1_aidy_code = rcresar_aidy_code AND rcrapp1_curr_rec_ind = 'Y' AND rcrapp1_seq_no = rcresar_seq_no AND spriden_pidm = rcresar_pidm AND rcrapp1_pidm = rcresar_pidm AND spriden_change_ind IS NULL ) SELECT sub_q.*, CASE WHEN acg_elig_comm_code = '268' THEN 'Rigorous HS course' WHEN acg_elig_comm_code = '269' THEN '2 or more AP or IB' WHEN acg_elig_comm_code = '270' THEN 'ACG possible' END comm_code_description FROM sub_q ORDER BY name
Furthermore, you might think to rearrange your table, so that you do not have 10 columns (rcresar_comm_code_01, rcresar_comm_code_02,...) that essentially do the same thing. The usual way to handle this kind of one-to-many relationship is to have all rcresar_comm_codes in a separate table, one per line, with a pointer to the table where you have them now.
Published by: Frank Kulash, January 20, 2009 11:35
Syntax error has been corrected -
Help with the situation where a simple group by statement does not work
There is a table with two columns, which is memo (varchar2), another is recording_date (date). This table is used to recode an every day event. Right now, I need to know how many events registered each day during the time period (between any of the given day and any given end day). the result by selecting should have two columns the numeration of the event, the recording_date. chances are one day it is not just any event, in this situation there not all inserted rows so far here, but the result by selecting must contain also that day with the column count is set to zero.
Can anyone help with this? Thank you in advance!between 2010-4-5 and 2010-4-8 Count recording_date 2 2010-4-5 0 2010-4-6 1 2010-4-7 9 2010-4-8
Kind regards!Hello
See if this helps:I create a dummy cursor that contains one row for each day of the last year - I then outer join the result of the query against the log_table.
Here are my RAW file
Select * from log_data07/05/2010 1, TEST
TEST 2 05/05/2010
02/05/2010 3, TEST
30/04/2010 4, TEST
TEST OF 5 30/04/2010
30/04/2010 6, TEST
7-30/04/2010 TEST
8 TEST 06/05/2010
9 TEST 06/05/2010
10 06/05/2010 TEST
11 06/05/2010 TEST
06/05/2010 12, TEST
13 TEST 06/05/2010
2010-05-06 14, TEST
15 06/05/2010 TEST
16 06/05/2010 TEST
2010-05-06 17, TESTAnd here's the query
with date_ranger as (select trunc (sysdate-) level datecol
from dual connect by level<= 365="">=>
RAW_DATA as)
Select recording_date, count (*) numrows in log_data
Group of recording_date)
Select datecol, date_ranger numrows, raw_data
where = date_ranger.datecol raw_data.recording_date (+)
and datecol sysdate-10-sysdate
order by 1And the result
1 28/04/2010
2 29/04/2010
30/04/2010 3, 4
4 01/05/2010
02/05/2010 5, 1
6 03/05/2010
7 04/05/2010
8 05/05/2010 1
9 06/05/10/2010What you want?
See you soon,.
Harry -
1st time scripter... needs help with conditional step 2
Never write the script in any form. JavaScript can be Cuniform as far as I know.
Really want to understand such things.
Download all guides... they make my head ache. Would like any suggestions on a good starting book. entry level stuff.
Should I go to learn Javascript, then it'll all be easier?
This is the purpose of the script that I want to write.
I have a folder folders containing main/artist name/backup / retouched / * this is the lie of the images *.
also / intact / * this is the lie of the images *.
I would like to write a script that sends Photoshop thanks to all subfolders looking for files.
Open the file.
Determine if the file is grayscale.
If this isn't the case, close the file.
If grayscale determine the longest side of the image and resize it to 300 DPI maintaining proportions making long side 10 inches.
Save the file in the folder '_8x10' file name added
Save the file in "' C: / getty /" add "_8x10" file name "
Close the file without saving changes
OTHER IMPORTANT FACTS
Emphasizing the need that the originals should not be harmed in any way.
99% of the files are .tiffs others would jpg - I can't ignore jpg files in order to remove a variable.
I worked on it for 2 days, trying to teach me, and it is not just by clicking. I can't pick it up quickly.
Here's what I wrote and tried to patch all of the other scripts on the web in the hope that I understood why I was picking up this code.
I'm short on time and would like advice on this.
Here is my code:
GrayscaleThenLandOrPortTo10Inches300dpi.jsx
Copyright 2012
Written by Brian Shupe steal shamelessly on the net
/*
Description:
This script finds the folder and all subfolders for images.
Check to see if they are grayscale
If so, he trims the long side at 10 inches at 300 dpi
*/
turn on double click of the
Macintosh Finder or Windows Explorer
#target photoshop
Make Photoshop the frontmost application
where we double clicked on the file
app.bringToFront ();
///////////////////////////
// SET-UP //
///////////////////////////
Close all open documents
so that {(app.documents.length)
app.activeDocument.close)
}
Create the dialog select parent folder
var imageFolder is Folder.selectDialog ("select a folder with images to treat");.
Set variables naming for easier coding
var doc = app.activeDocument;
set the units to inches
Save current preferences
var strtRulerUnits = app.preferences.rulerUnits;
var strtTypeUnits = app.preferences.typeUnits;
Adobe Photoshop CS4 use pixels and display without the value dialog boxes
app.preferences.rulerUnits = Units.INCHES
app.preferences.typeUnits = TypeUnits.INCHES
app.displayDialogs = DialogModes.NO
Recursively process all subfolders
If (image! = null) processFolder (imageFolder);
function processFolder (folder) {}
List of files of the var = folder.getFiles)
for (var i = 0; i < fileList.length; i ++) {}
var file = list of files [i];
}}
Check if the active document isn't in grayscale. If this is true do nothing
If (doc.mode! = DocumentMode.GRAYSCALE) {}
} else
Check if the document is higher than it is wide
If (doc.height > doc.width)
{
Perform this action if the IF statement is true. Action of sizes both height to 10 inches and 300 DPI
doAction ("Port", "Getty");
}
on the other
{
Perform this action if the IF statement is false. Action sizes two length of 10 inches and DPI to 300
doAction ("Land", "Getty");
}
Create a folder to contain a file duplicate
myFolder var = new Folder("c:/Getty/");
myFolder. Create();
saveFile = new file ("C: / Getty /' + imgName +"_"+"8 x 10")
var CurrentFolder = activeDocument.path;
var ParentFolder = decodeURI (activeDocument.path.parent);
saveFile = new file (parentFolder + ' /' + 'CONTAINER BACKUP' + ' /' + imgName + "_" + "8 x 10")
app.activeDocument.close (SaveOptions.DONOTSAVECHANGES)
I think that, right now, the problem is when it gets to the point where he seeks an image open... There are jumps to zero and it.
Anyone can see that for my clumsy attempt and course correct me?
would be happy to discuss tutoring services.
This is a full version that could help with all of the necessary steps...
#target photoshop app.bringToFront(); main(); //call the main function function main(){ var folders =[]; var topLevel = Folder.selectDialog("Please select top level folder"); if(topLevel == null) return; //if cancelled quit folders = FindAllFolders(topLevel, folders); folders.unshift(topLevel); var outputFolder = Folder("/c/Getty/"); //create output folder if it does not exist if(!outputFolder.exists) outputFolder.create(); for(var z in folders){// loop through all subfolders var fileList = folders[z].getFiles("*.tif"); //get a list of all tifs in this folder for(var a in fileList){//loop through all files in folder app.open(fileList[a]);//open file var doc = activeDocument; if(doc.mode != DocumentMode.GRAYSCALE){//if not greyscale close and get next doc. doc.close(SaveOptions.DONOTSAVECHANGES); continue; } if(doc.width > doc.height){//landscape //resize document, only one value is required otherwise it might distort the document. doc.resizeImage(new UnitValue(10,'in'), undefined, 300, ResampleMethod.BICUBIC); }else{//portrait doc.resizeImage(undefined, new UnitValue(10,'in'), 300, ResampleMethod.BICUBIC); }//end resize //get the name without the .tif extension var Name = app.activeDocument.name.replace(/\.[^\.]+$/, ''); //create the output file path and name var saveFile = File(outputFolder + "/" + Name + "_8x10.tif"); //save and close SaveTIFF(saveFile); doc.close(SaveOptions.DONOTSAVECHANGES); }//end filelist }//end folders }//end main function function FindAllFolders( srcFolderStr, destArray) { var fileFolderArray = Folder( srcFolderStr ).getFiles(); for ( var i = 0; i < fileFolderArray.length; i++ ) { var fileFoldObj = fileFolderArray[i]; if ( fileFoldObj instanceof File ) { } else { destArray.push( Folder(fileFoldObj) ); FindAllFolders( fileFoldObj.toString(), destArray ); } } return destArray; } function SaveTIFF(saveFile){ tiffSaveOptions = new TiffSaveOptions(); tiffSaveOptions.embedColorProfile = true; tiffSaveOptions.alphaChannels = true; tiffSaveOptions.layers = true; tiffSaveOptions.imageCompression = TIFFEncoding.TIFFLZW; activeDocument.saveAs(saveFile, tiffSaveOptions, true, Extension.LOWERCASE); }
-
Need help with a declaration of 'IfThenIfNot '.
Every year couple I need help with a script statement and these forums have been incredibly useful. Once more, I was hoping that someone out there had knowledge of something I am writing for a form, I need to automate:
In the jargon of Excel that I try to write to would state so @if (("Subtotal"+"InvestigativeFee"+"PlanReviewFee") > 1000, + 100, + (("Sous-total" + "Investigativ Manar" + "PlanReviewFee") *. 1))
What I have here is three form named subtotal, InvestigativeFee & PlanReviewFee fields. The formula in question says it's a 'technology assessment fee"of 10% on the total part of what above mentioned 3 fields but there is a maximum charge of $100 for this tax. The statement that I wrote above would have worked in Excel (not tested, but generally is the idea). I was hoping someone mastering JavaScript could help me with a statement that I needed to do this work.
Hope to hear from someone,
Warmly yours.
Steven L in Eugene OR
Try the following in the custom calculation of the fresh field of evaluation script:
Custom calculation script
(function () {}
Maximum package
var max_taf = 100;
Get the values of the field as numbers
var v1 = + getField("Subtotal").value;
var v2 = + getField("InvestigativeFee").value;
var v3 = + getField("PlanReviewFee").value;Calculation of tax
TAF var = (v1 + v2 + v3) / 10;
Set this field to royalty calculated value if less than maximum, otherwise the maximum value
Event.Value = (taf< 100)="" taf="" :="">
})();
Maybe you are looking for
-
I don't think I have that much. I had to delete all my schedule last year, but now get this error: Failed synchronization schedule Protocol error: too many files. (4403) If anyone can help with suggestion? Thank you... Bill
-
original title: default email How can I configure my hotmail e-mail account as account by default when you answer the internet links? For example when you answer the Craigslist ads it by default my real account of buddies and I can't access that acco
-
IPad wi - fi MAC address not "MAC address" according to the Linksys router
WRT55AG 2.0: Failed to save the MAC address of my new iPad wi - fi MAC filtering table. Upgrade to the latest firmware, but still does not work. When I try to record, I get a pop-up that says: "not a MAC Address. If I disable the MAC filtering, the
-
Remove Office Add-ins - Windows does not recognize my administrator status
Even if I'm already logged as an administrator, I get the message "You must be an administrator to remove these add-ins" when trying (in vain) remove an add-in
-
Could not find 'MAF Business objects of REST Web Service' in the Gallery
HelloI installed Jdev studio 12.1.3.0.0 and installed updates for the extension of the MAF. It shows screen-Extensions on Jdev Mobile Application Framework.I have windows 32-bit and using the version compatible jdev.But there is no option for the cre