What cast is required to run this code ?
public class tempClass {
public static void main(String[] args) {
Object object = new Object();
double goodBoy[] = new double[10];
double badBoy[][] = new double[1][10];
goodBoy[0] = 1.0;
goodBoy[1] = 2.0;
goodBoy[2] = 3.0;
goodBoy[3] = 4.0;
goodBoy[4] = 5.0;
goodBoy[5] = 6.0;
goodBoy[6] = 7.0;
goodBoy[7] = 8.0;
goodBoy[8] = 9.0;
goodBoy[9] = 10.0;
object = goodBoy;
badBoy = object; //what cast is required here ?
System.out.println(badBoy[0][1]);
}
you also might consider this, which seems like it might meet the original intent better:
public static void main(String[] args) {
double goodBoy[] = new double[10];
double badBoy[][] = new double[1][10];
goodBoy[0] = 1.0;
goodBoy[1] = 2.0;
goodBoy[2] = 3.0;
goodBoy[3] = 4.0;
goodBoy[4] = 5.0;
goodBoy[5] = 6.0;
goodBoy[6] = 7.0;
goodBoy[7] = 8.0;
goodBoy[8] = 9.0;
goodBoy[9] = 10.0;
badBoy[0] = goodBoy;
System.out.println(badBoy[0][1]);
}
Similar Messages
-
Error: JavaFX runtime components are missing, and are required to run this
I tried to build the application using javafx ant build, generated jar file. But when I run the jar file, issue:
Error: JavaFX runtime components are missing, and are required to run this application.
The javafx-class-path: libs/h2.jar libs/jfxrt.jar libs/log4j.jar
Running the JAR file using:
java -jar app.jar
What could it be?Which version of iTunes?
When you go to Programs control panel you can see as well as uninstall the current version.
I always uninstall Bonjour, MobileMe etc and itunes will ask if I want to reinstall those (no thanks).
itunes and many apps keep an installer cache so they can do a repair-reinstall without a full install again.
I'd install Microsoft Security Essentials 2.0 which is free and excellent.
Programs don't affect data. But if you don't have backups, you are likely past due.
If you have any doubts about the integrity of your system, if you have had to do a hard power down and likely do have issues, you should / could / might want to do chkdsk on your hard drive (hard drive properties tools scan for errors). -
After updating to OS X Mountain Lion, there is a password locked pdf document in the Downloads Stack. Does anyone know what password is required to access this file?
Hello, if your install disk is locked (I assume with FileVault) there is no way to change the password. If it weren't locked there were at least two solutions. As far as I know, the only solutions now are:
- contact your dad
- erase and reinstall the OS X clean
Let us know. -
What is the program can run this flash
hi all, I download some flash from this funny site
http://www.funny-pictures.com/
but i can't run it in my computer , means my computer not my
browser , i run it only into flash programs as flash editor or
macromedia flash 6 (open it and click file menu and choce open and
search it), I want to open it directly , just click it to open
without any programIf you know the job name, than you can find out the associated program name.
Go to SM37.
Select your job from the list
Select "Step" ... here it will show you the program name
Put cursor on the program name and Go to > Variant to know what was the input to run this job.
Regards,
Naimesh Patel -
How can i run this code correctly?
hello, everybody:
when i run the code, i found that it dons't work,so ,i hope somebody can help me!
the Ball class is this :
package {
import flash.display.Sprite;
[SWF(width = "550", height = "400")]
public class Ball extends Sprite {
private var radius:Number;
private var color:uint;
private var vx:Number;
private var vy:Number;
public function Ball(radius:Number=40, color:uint=0xff9900,
vx:Number =0, vy:Number =0) {
this.radius= radius;
this.color = color;
this.vx = vx;
this.vy = vy;
init();
private function init():void {
graphics.beginFill(color);
graphics.drawCircle(0,0,radius);
graphics.endFill();
and the Chain class code is :
package {
import flash.display.Sprite;
import flash.events.Event;
[SWF(width = "550", height = "400")]
public class Chain extends Sprite {
private var ball0:Ball;
private var ball1:Ball;
private var ball2:Ball;
private var spring:Number = 0.1;
private var friction:Number = 0.8;
private var gravity:Number = 5;
//private var vx:Number =0;
//private var vy:Number = 0;
public function Chain() {
init();
public function init():void {
ball0 = new Ball(20);
addChild(ball0);
ball1 = new Ball(20);
addChild(ball1);
ball2 = new Ball(20);
addChild(ball2);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
private function onEnterFrame(event:Event):void {
moveBall(ball0, mouseX, mouseY);
moveBall(ball1, ball0.x, ball0.y);
moveBall(ball2, ball1.x, ball1.y);
graphics.clear();
graphics.lineStyle(1);
graphics.moveTo(mouseX, mouseY);
graphics.lineTo(ball0.x, ball0.y);
graphics.lineTo(ball1.x, ball1.y);
graphics.lineTo(ball2.x, ball2.y);
private function moveBall(ball:Ball,
targetX:Number,
targetY:Number):void {
ball.vx += (targetX - ball.x) * spring;
ball.vy += (targetY - ball.y) * spring;
ball.vy += gravity;
ball.vx *= friction;
ball.vy *= friction;
ball.x += vx;
ball.y += vy;
thanks every body's help!ok, thanks for your reply ! I run this code in the Flex builder 3!and the Ball class and the Chain class are all in the same AS project!
and i changed the ball.pv property as public in the Ball class, and the Chain class has no wrong syntactic analysis,but the AS code don't run.so this is the problem.
2010-04-21
Fang
发件人: Ned Murphy <[email protected]>
发送时间: 2010-04-20 23:01
主 题: how can i run this code correctly?
收件人: fang alvin <[email protected]>
I don't see that the Ball class has a pv property, or that you even try to access a pv property in the Chain class. All of the properties in your Ball class are declared as private, so you probably cannot access them directly. They would need to be public. Also, I still don't see where you import Ball in the chain class such that it can use it. -
I was just trying to restore my iPhone3G from recovery mode, but always received error code 1015. What shell I do to avoid this code?
Your phone is probably jailbroke
-
What software is required for running Flex?
For flash to run on a webserver, we just need to place the .swf file on to the web server. No install required at the web server.
How about Flex? do we need to install a specific webserver? is there a server side coding or to run a ISAPI filter for windows? Insights would be appreciated?
Also for a developer what will be required to start of Flex development? Do we need to buy software from Adobe? or is it just a Scripting language that we can run on any windows pc?
thanks,
ninja-e
Software Development Services
Web Design
Web DevelopmentThere is no special server required. You simply drop the compiled swf file onto whatever server you are running.
Think of Flex as the client-side UI. Generally you communicate with some sort of server-side code through standard services such as SOAP or REST. It can does this directly or you can route through JavaScript for another layer of maintainability (so you don't necessarily have to recompile if something on the server-side changes).
The Flex SDK is a free, opensource project:
http://opensource.adobe.com/wiki/display/flexsdk/Flex+SDK
Adobe of course offers their own pay IDE for it which is Flash Builder 4 (formerly Flex Builder). It is an Eclipse-based standalone or plugin. However, it is of course not required and you can easily get by without it.You can use any text editor, but in terms of a free the strongest option is FlashDevelop which is opensource and runs on .NET. There are free plugins for Eclipse and NetBeans, but they are very weak.
http://www.flashdevelop.org -
What the he** is wrong with this code?
Hi,
I have 2 tables. Primary table "resease" and secondary table (containing the foreign key) "kunden".
Selecting a release (dropdownlist), will show you the corresponding entry of kunden (datatable).
I added buttons to the datatable for deleting certain rows. This all works fine so far.
But as you are going to delte the last entry of table kunden, I want to delte the corresponding entry of the table release as well. And by trying to do so, I get an exception telling in line "dataTable1Model.commit();"
"java.sql.SQLException: Lock time out; try later."
The exception disappears by deleting the inner try-catch block.
So what is wrong with this code?
Thank,
Mark.
PS: If you need the database-schema or anything else, let me know....
public String delete_action() {
try {
//returns -1, so I can't use it
int rowCount = dataTable1Model.getRowCount();
//get affected row
com.sun.jsfcl.data.DataCache.Row row =
dataTable1Model.getDataCache().get(dataTable1Model.getRowIndex());
row.setDeleted(true);
try {
//New RowSet for getting FK of affected line
JdbcRowSetXImpl pkRowSet = new JdbcRowSetXImpl();
pkRowSet.setDataSourceName("java:comp/env/jdbc/AVT");
pkRowSet.setCommand("SELECT fk_idrelease FROM kunden " +
"where fk_idrelease = ?");
//Convert Row into string
String myRow = row.toString();
//Getting the index of the first "=" (it's before the FK)
int index = myRow.indexOf("=")+1;
//Getting the number (FK) out of the string an casting it to int
int fk = Integer.parseInt(myRow.substring(index,(index+1)));
//Saving the FK in SessionBean1, so I can use it a parameter of
//the setObject(int, Object)-method
getSessionBean1().setFk(fk);
//this will give me a RowSet of all lines containing the FK of
//the affected row
pkRowSet.setObject(1, getSessionBean1().getFk());
pkRowSet.execute();
pkRowSet.last();
int numRow = pkRowSet.getRow();
//If the numRow (numbers of rows) is 1, go to cascade_delte
//and delte the entry with primary key as well
if (numRow == 1) {
cascade_delete(); //not implemented yet
}catch (Exception ex) {
error("Error counting affected rows: " + ex);
dataTable1Model.commit();
dataTable1Model.execute();
info("Deleting row OK!");
}catch (Exception e) {
log("Page 1: Row delete exception: ", e);
error("Error during deleting: " + e);
} // end try catch
return null;
}just a guess - perhaps call pkRowSet.close() at the end of your try/catch?
v -
What roles are required to run the export import?
Hi,
I want some info on roles are required to run the export import.
I have done the following in sys user:
GRANT EXP_FULL_DATABASE TO IMP_TEST
GRANT IMP_FULL_DATABASE TO IMP_TEST
But Doing the above command the IMP_TEST will get all priviles (also the system tables)
Is there any mechanism to restrict the user to export and import only the tables not anything?
Thanks and RegadrsHi!
If you create a user like this
CREATE USER imp_test identified by password;then the user will be able to import or export only its own schema. If you grant the exp_full_database and imp_full_database roles to this user like you did then the use will be able to export or import the hole database (with SYS schema). But as far as I know you can't set any more restrictions to the user.
yours sincerely
Florian W. -
What is the protocol used in this code?
FileInputStream in = new FileInputStream("\\10.0.0.2\sharedFolder\data.txt");
by above line, we can read a file data.txt from remote computer (ip:10.0.0.2).
What is the protocol used in this input stream?
Thanksenglefly wrote:
FileInputStream in = new FileInputStream("\\10.0.0.2\sharedFolder\data.txt");
by above line, we can read a file data.txt from remote computer (ip:10.0.0.2).Not really, because you didn't escape your backslashes, but assuming you correct that,
What is the protocol used in this input stream?I think SMB.
EDIT: Too slow, shoulda refreshed :-)
Edited by: paul.miner on Jul 31, 2008 12:34 AM -
What are the requirements to run a Swing application?
I'm trying to send a simple swing application to a friend that has Mac OSX, but the buttons don't show up.
Do people actually need the Java SDK in order for swing apps to work? Or is plain java enough? (He has normal java, because we play minecraft sometimes)
Anyway, my buttons are not showing up on his computer, not even when I use the cross platform look at feelHere is the code I'm using, it's an application that makes the user select a folder and stuff will happen to it.
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class SomeGUI extends JFrame implements ActionListener, Runnable
public JButton exit;
public JButton run;
JPanel panel;
JFileChooser chooser;
String returnpath;
JLabel progress;
public SomeGUI()
try
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
catch (ClassNotFoundException ex)
Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
catch (InstantiationException ex)
Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
catch (IllegalAccessException ex)
Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
catch (UnsupportedLookAndFeelException ex)
Logger.getLogger(SomeGUI.class.getName()).log(Level.SEVERE, null, ex);
setTitle("BenkyoAdd");
setSize(206,100);
setResizable(false);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLocationRelativeTo(null);
setVisible(true);
panel = new JPanel();
getContentPane().add(panel);
panel.setLayout(null);
run = new JButton("Run");
run.setFocusable(false);
run.setBounds(0,0,100,30);
panel.add(run);
run.addActionListener(this);
progress = new JLabel("Please click run");
progress.setFont(new Font("lol",Font.PLAIN,14));
progress.setBounds(10, 30, 200, 50);
panel.add(progress);
exit = new JButton("Exit");
exit.setFocusable(true);
exit.setBounds(100, 0, 100, 30);
panel.add(exit);
exit.addActionListener(this);
chooser = new JFileChooser();
chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
public void actionPerformed(ActionEvent e)
if(e.getSource().equals(exit))
System.exit(0);
if(e.getSource().equals(run))
progress.setText("Select a folder...");
chooser.showOpenDialog(panel);
this.returnpath = chooser.getSelectedFile().getAbsolutePath();
exit.setEnabled(false);
run.setEnabled(false);
progress.setText("Copying to output folder...");
new Thread(this).start();
public static void main(String args[])
new SomeGUI();
public void run()
new Changer(this, this.returnpath);
exit.setEnabled(true);
exit.requestFocusInWindow();
progress.setText("Done! You can now exit!");
} -
What setup is require to run a consumption-based planning
Dear all,
I know there is a two way to run Consumption-Based Planning in standard SAP:
1 - Forecast-based Planning, and
2 - Re-order point Planning.
My question is what is the configuration setup and material master value maintenance require for the above two procedures?
Thanks
TuffyIn Material Master
MRP 1 view choose the
MRP type
VB - Manual reorder point or
VM - automatic reorder point
Reorder point
Regards -
The following code is used to run a report in tom cat. When I run this code
Hi
When I try to run the following SQL code doesn't work. Can someone pls tell me why?
SELECT
SR.ID AS SRID,
-- SR.DATECREATED AS SR_DATE_CREATED,
-- JOB_END.JOB_END_DT AS SR_FIELD_WORK_COMP,
AQ.OBJECTID AS SH_ID,
CASE
WHEN Q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738) THEN '1'
WHEN Q.ID IN (30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747) THEN '2'
WHEN Q.ID IN (30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760) THEN '3'
WHEN Q.ID IN (30780, 30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769) THEN '4'
WHEN Q.ID IN (30782, 30770, 30771, 30772, 30773, 30774, 30775, 30776, 30777, 30778) THEN '5'
ELSE
'' END AS QUESTIONNAIRE,
MAX(CASE WHEN Q.ID IN ( 30750, 30479, 30752, 30780, 30782) THEN ANSWER ELSE '' END) AS PIT, --Pit1
MAX(CASE WHEN Q.ID IN ( 30730, 30739, 30753, 30761, 30770) THEN ANSWER ELSE '' END) AS PITID, --Pit ID
MAX(CASE WHEN Q.ID IN ( 30731, 30740, 30754, 30762, 30771) THEN ANSWER ELSE '' END) AS PROBLEM, --Problem
MAX(CASE WHEN Q.ID IN ( 30732, 30741, 30755, 30763, 30772) THEN ANSWER ELSE '' END) AS CAUSE, --Cause
MAX(CASE WHEN Q.ID IN ( 30733, 30742, 30783, 30764, 30773) THEN ANSWER ELSE '' END) AS CAUSE_DETAILS, --Detail of cause
MAX(CASE WHEN Q.ID IN ( 30734, 30743, 30756, 30765, 30774) THEN ANSWER ELSE '' END) AS ACTION_TO_RESOLVE, --Action to resolve
MAX(CASE WHEN Q.ID IN ( 30735, 30744, 30757, 30766, 30775) THEN ANSWER ELSE '' END) AS VV_REPLACED, --VV replaced
MAX(CASE WHEN Q.ID IN ( 30736, 30745, 30758, 30767, 30776) THEN ANSWER ELSE '' END) AS SERIAL_NUMBER, --Serial number
MAX(CASE WHEN Q.ID IN ( 30737, 30746, 30759, 30768, 30777) THEN ANSWER ELSE '' END) AS VALVE_MODEL, --Valve model
MAX(CASE WHEN Q.ID IN ( 30738, 30747, 30760, 30769, 30778) THEN ANSWER ELSE '' END) AS COMMENTS --Comments
FROM
FOCUSAMS.EW_ANSWERED_QUESTIONNAIRE AQ
INNER JOIN FOCUSAMS.EW_ANSWERS A ON A.ANSWEREDQID = AQ.ID
INNER JOIN FOCUSAMS.EW_QUESTIONS Q ON A.QUESTIONID = Q.ID
INNER JOIN FOCUSAMS.EW_STATUS_HIST SH ON SH.ID = AQ.OBJECTID
INNER JOIN FOCUSAMS.EW_CASE SR ON SR.ID = SH.CASEID
-- Get the latest Field Work Complete Date/time
LEFT JOIN
SELECT
CASEID, MAX(ACTUALDATETIME) AS JOB_END_DT
FROM
FOCUSAMS.EW_STATUS_HIST H1
WHERE
NEWSTATUSID = 17
AND REPLICATIONSTATUS = 0
GROUP BY
H1.CASEID
) JOB_END ON JOB_END.CASEID = SR.ID
WHERE
AQ.REPLICATIONSTATUS = 0
AND AQ.QUESTIONNAIREID = 30096
AND A.REPLICATIONSTATUS = 0
AND Q.REPLICATIONSTATUS = 0
AND Q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738, 30748
, 30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747, 30751, 30752
, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760, 30779, 30780, 30761
, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769, 30781, 30782, 30770, 30771
, 30772, 30773, 30774, 30775, 30776, 30777, 30778)
AND A.DATEUPDATED =
SELECT MAX(A2.DATEUPDATED)
FROM FOCUSAMS.EW_ANSWERED_QUESTIONNAIRE AQ2
INNER JOIN FOCUSAMS.EW_ANSWERS A2 ON A2.ANSWEREDQID = AQ2.ID
WHERE AQ2.OBJECTID = AQ.OBJECTID
AND A2.QUESTIONID = Q.ID
AND SR.DATECREATED > (TO_DATE(TO_CHAR(:sDate, 'DD/MM/YYYY HH:MI:SS AM'), 'DD/MM/YYYY HH:MI:SS AM'))
AND JOB_END.JOB_END_DT < (TO_DATE(TO_CHAR(:eDate, 'DD/MM/YYYY HH:MI:SS AM'), 'DD/MM/YYYY HH:MI:SS AM')) + 1
AND ((SR.ID = :SRID) OR (:SRID IS NULL))
GROUP BY
AQ.OBJECTID,
CASE
WHEN Q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738) THEN '1'
WHEN Q.ID IN (30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747) THEN '2'
WHEN Q.ID IN (30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760) THEN '3'
WHEN Q.ID IN (30780, 30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769) THEN '4'
WHEN Q.ID IN (30782, 30770, 30771, 30772, 30773, 30774, 30775, 30776, 30777, 30778) THEN '5'
ELSE'' END,
SR.ID
HAVING
(:PitID IS NULL)
OR TRIM(:PitID) = TRIM(MAX(CASE WHEN Q.ID IN ( 30730, 30739, 30753, 30761, 30770) THEN ANSWER ELSE '' END))
ORDER BY
SR.ID,
CASE
WHEN Q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738) THEN '1'
WHEN Q.ID IN (30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747) THEN '2'
WHEN Q.ID IN (30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760) THEN '3'
WHEN Q.ID IN (30780, 30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769) THEN '4'
WHEN Q.ID IN (30782, 30770, 30771, 30772, 30773, 30774, 30775, 30776, 30777, 30778) THEN '5'
ELSE
'' END
Thanks
Nhi, i formatted your code using TOAD, and it is OKAY - the syntax should be correct. It could be, your environment does not support some features (like INNER JOIN - you must change with older syntax ). Try to debug incrementally by removing some conditions and then add one by one.
/* Formatted on 2012/06/13 11:25 (Formatter Plus v4.8.8) */
SELECT sr.ID AS srid,
-- SR.DATECREATED AS SR_DATE_CREATED,
-- JOB_END.JOB_END_DT AS SR_FIELD_WORK_COMP,
aq.objectid AS sh_id,
CASE
WHEN q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738)
THEN '1'
WHEN q.ID IN (30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747)
THEN '2'
WHEN q.ID IN (30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760)
THEN '3'
WHEN q.ID IN (30780, 30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769)
THEN '4'
WHEN q.ID IN (30782, 30770, 30771, 30772, 30773, 30774, 30775, 30776, 30777, 30778)
THEN '5'
ELSE ''
END AS questionnaire,
MAX (CASE
WHEN q.ID IN (30750, 30479, 30752, 30780, 30782)
THEN answer
ELSE ''
END) AS pit, --Pit1
MAX (CASE
WHEN q.ID IN (30730, 30739, 30753, 30761, 30770)
THEN answer
ELSE ''
END) AS pitid, --Pit ID
MAX (CASE
WHEN q.ID IN (30731, 30740, 30754, 30762, 30771)
THEN answer
ELSE ''
END) AS problem, --Problem
MAX (CASE
WHEN q.ID IN (30732, 30741, 30755, 30763, 30772)
THEN answer
ELSE ''
END) AS cause, --Cause
MAX (CASE
WHEN q.ID IN (30733, 30742, 30783, 30764, 30773)
THEN answer
ELSE ''
END) AS cause_details, --Detail of cause
MAX (CASE
WHEN q.ID IN (30734, 30743, 30756, 30765, 30774)
THEN answer
ELSE ''
END) AS action_to_resolve, --Action to resolve
MAX (CASE
WHEN q.ID IN (30735, 30744, 30757, 30766, 30775)
THEN answer
ELSE ''
END) AS vv_replaced, --VV replaced
MAX (CASE
WHEN q.ID IN (30736, 30745, 30758, 30767, 30776)
THEN answer
ELSE ''
END) AS serial_number, --Serial number
MAX (CASE
WHEN q.ID IN (30737, 30746, 30759, 30768, 30777)
THEN answer
ELSE ''
END) AS valve_model, --Valve model
MAX (CASE
WHEN q.ID IN (30738, 30747, 30760, 30769, 30778)
THEN answer
ELSE ''
END) AS comments --Comments
FROM focusams.ew_answered_questionnaire aq INNER JOIN focusams.ew_answers a ON a.answeredqid = aq.ID
INNER JOIN focusams.ew_questions q ON a.questionid = q.ID
INNER JOIN focusams.ew_status_hist sh ON sh.ID = aq.objectid
INNER JOIN focusams.ew_case sr ON sr.ID = sh.caseid
-- Get the latest Field Work Complete Date/time
LEFT JOIN
(SELECT caseid, MAX (actualdatetime) AS job_end_dt
FROM focusams.ew_status_hist h1
WHERE newstatusid = 17 AND replicationstatus = 0
GROUP BY h1.caseid) job_end ON job_end.caseid = sr.ID
WHERE aq.replicationstatus = 0
AND aq.questionnaireid = 30096
AND a.replicationstatus = 0
AND q.replicationstatus = 0
AND q.ID IN
(30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738, 30748, 30749, 30739, 30740, 30741, 30742, 30743,
30744, 30745, 30746, 30747, 30751, 30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760, 30779, 30780,
30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769, 30781, 30782, 30770, 30771, 30772, 30773, 30774, 30775,
30776, 30777, 30778)
AND a.dateupdated = (SELECT MAX (a2.dateupdated)
FROM focusams.ew_answered_questionnaire aq2 INNER JOIN focusams.ew_answers a2 ON a2.answeredqid = aq2.ID
WHERE aq2.objectid = aq.objectid AND a2.questionid = q.ID)
AND sr.datecreated > (TO_DATE (TO_CHAR (:sdate, 'DD/MM/YYYY HH:MI:SS AM'), 'DD/MM/YYYY HH:MI:SS AM'))
AND job_end.job_end_dt < (TO_DATE (TO_CHAR (:edate, 'DD/MM/YYYY HH:MI:SS AM'), 'DD/MM/YYYY HH:MI:SS AM')) + 1
AND ((sr.ID = :srid) OR (:srid IS NULL))
GROUP BY aq.objectid,
CASE
WHEN q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738)
THEN '1'
WHEN q.ID IN (30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747)
THEN '2'
WHEN q.ID IN (30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760)
THEN '3'
WHEN q.ID IN (30780, 30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769)
THEN '4'
WHEN q.ID IN (30782, 30770, 30771, 30772, 30773, 30774, 30775, 30776, 30777, 30778)
THEN '5'
ELSE ''
END,
sr.ID
HAVING (:pitid IS NULL) OR TRIM (:pitid) = TRIM (MAX (CASE
WHEN q.ID IN (30730, 30739, 30753, 30761, 30770)
THEN answer
ELSE ''
END))
ORDER BY sr.ID,
CASE
WHEN q.ID IN (30750, 30730, 30731, 30732, 30733, 30734, 30735, 30736, 30737, 30738)
THEN '1'
WHEN q.ID IN (30749, 30739, 30740, 30741, 30742, 30743, 30744, 30745, 30746, 30747)
THEN '2'
WHEN q.ID IN (30752, 30753, 30754, 30755, 30783, 30756, 30757, 30758, 30759, 30760)
THEN '3'
WHEN q.ID IN (30780, 30761, 30762, 30763, 30764, 30765, 30766, 30767, 30768, 30769)
THEN '4'
WHEN q.ID IN (30782, 30770, 30771, 30772, 30773, 30774, 30775, 30776, 30777, 30778)
THEN '5'
ELSE ''
ENDEdited by: ʃʃp on Jun 12, 2012 9:36 PM -
What privs r required to run Alter table truncate partition update indexes?
I rebuilt the indexes on the table. Know my problem is that when I truncate a partition on the table the unique index whic consist of the primary key fields becomes unusable which causes my to have to rebuild it after each truncate. I tried to runm the following statement from the master schema on but get
an insufficient privs error when I use "update indexes":
Alter table schema_name.table_name truncate partition partition_name storage update indexes;
What priv does master need to perform statement successfully when there's data in it?
Does using 'update indexes' needs extra priveleges?
Thanks in Advance
GaganHi Its Oracle 10.2.0.4 64 Bit on HP UX.
I dont have the exact error as I got this much information only from the end user....It will be couple of hours more then he will be available again
ok so for Truncate we need 'Drop any' privs but to use clause 'update indexes' alongwith do we need some extra privelege?
Thanks again
Gagan -
What ports are required to run facetime from iPad2 ?
My iPad 2 works fine, but trying to use Facetime with an iPhone in or outside the house fails with no error message.
This seems to do with ports of a firewall, but don't know the adequate details.Try it locally on the server itself.
You just need to create a shared directory backup oon the server on C:\ drive.
\\127.0.0.1\C$\backup
This should work.
Link to port utilization guide:
http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/configuration/guide/uccx70prtuti.pdf
Regards,
Chuck
Please rate helpful posts and identify correct answers.
Maybe you are looking for
-
EMI Calculation for calculating the cost of the equipment or material sold
Hi gurus... Its a typical CS scenario... here.. Client is selling a product to the customer. The customer makes a contract with the client has he will pay in EMI option. So the total cost of one EMI will calculate as : product cost + Interest for the
-
V.02 vs Rejected Items in sales order
Hi All, I dont want a sales order to be displayed in V.02 - incomplete sales orders list when all the items are rejected in it. Is there a possibility for this functionality ? I checked all the controls and this seems to me as not possible. Can someb
-
Error running child packages from parent package - Error 0xC0011008
Hey... I am running a parent SSIS package (running sp2, 9.0.3042) that calls several child packages. On our development server, we now cannot run this because we get 1 or more of these errors: "Error 0x80004003 while preparing to load the package. In
-
Since I upgraded to 10.5.8, Mail.app does not appear to be checking automatically for new mail. Regardless of how I set the preference (Every 1 Minute, Every 5 Minutes) it never checks for new mail, and I always have to click on "Get Mail". I've veri
-
ISE TCP Dump not working?
I have and Standalone installation running version 1.1.2.145. The feature of TCP Dump appears to not be working. Every time I open it indicates Status: Loading .... but nothing happen after serveral minutes ... If I click the Delete button a confirma