Help: how to make this WHERE CLAUSE?
Hi,
SELECT * FROM TAB_A
WHERE
FLG IN (DECODE(C_FLG, 0, 'C', 1, '''A'', ''I'''));
What I really want to achieve is:
If C_FLG is 0 then the where clause becomes
WHERE FLG IN ('C')
If C_FLG is 1 then the where clause becomes
WHERE FLG IN ('A', 'I')
Any suggestions?
Thank you in advance.
Jimmy
How about:
WHERE (C_FLG = 0 AND FLG = 'C') OR (C_FLG = 1 AND FLG IN ('A','I'))
Similar Messages
-
VPD - How to make the where clause a correlated query
Hi,
My VPD function has the following where clause:
where_clause:= ' project_id in (select object_id from pa_project_classes p'||
' where p.class_category='||''''||l_cat||''''||
' and p.CLASS_CODE='||''''||l_class||''''||
' and p.OBJECT_TYPE=''PA_PROJECTS'''||
The problem is that the subquery is not using the unique key defined on the table pa_project_classes. What I need is something as follows:
where_clause:= ' project_id in (select object_id from pa_project_classes p'||
' where p.class_category='||''''||l_cat||''''||
' and p.CLASS_CODE='||''''||l_class||''''||
' and p.OBJECT_TYPE=''PA_PROJECTS'''||
' and p.object_id=mainquery.project_id ||
The problem is that since the table pa_project_classes also has a column project_id, I have to prefix the column name by the alias of the main query like 'mainquery.project_id'. However this seems impossible as main query is not unknown .
I would be grateful if you could suggest any workaround or solution.
ThanksJust have a look over these two statements if it solves your problem
one time where clause
Set_Block_Property('BLOCK_NAME',ONETIME_WHERE,your form item);
dynamic where clause
set_block_property('BLOCK_NAME'default_where, your form itme)
you can where clause at run time from any procedure or some triggers -
How to make this work with Firefox, HELP!
Downloading for Real-player, after watching the full movie, I click download and it has to reread the movie from the internet. When using explorer, after downloading the movie, it reads it from memory, which makes it a fast download. How to make this work with Firefox, I like not to use Microsoft products, and I really like Firefox 7.0.1!!!! HELP!
-> click '''Firefox''' button and click '''Options''' (OR File Menu -> Options)
* Advanced panel -> Network tab
* place Checkmark on '''Override Automatic Cache Management''' -> under '''Limit Cache''' specify a large size of space
* Remove Checkmark from '''Tell me when websites asks to store data for offline use'''
* click OK on Options window
* Restart Firefox
Check and tell if ts working. -
How to make this in Adobe Photoshop CS5? PLEASE Help!
Hey guys, i reallllllllly want to know how to make this image in adobe photoshop.... the cone around the forecast track. Can you guys please show me how to do this? Id greatly appreciate it!
There's a lot implied here, but you're not going to get around having to do the following in general:
Use an unmarked map as a background.
Draw shapes on layer(s) above the background and make them partially transparent.
Obviously the key is to draw shapes that express the "cone of uncertainty" exactly as you want it to look, and with a minimum of fuss.
I'd suggest drawing shapes with Path tools, then filling the shapes, applying a stroke (for the edge border), and using masking to hide parts you don't want to show (or which overlap with the other parts you're drawing).
Are you needing to do this over and over or just once?
-Noel -
How to make this logo effect? Help please!
How to make this effect? I'm new in illustrator.
It looks like 3 discs with a 2d image applied to them. I would try the 3d revolve tool to create one, then duplicate it for the other two.
-
hi for all, i need a help to put an image and make a JFrame for ChatLogin similar to yahoo messenger chat login frame, my problem is i don't know how to arrange the instruction and how to make the image named "Face.jpg" in the upper position like keep smiling in yahoo messenger and the other labels and text Field down of this image.so plz any one help me to make this done becuse i need to know where is the problem and what should i do. thanks
import MarChat.*;
import java.awt.*;
import java.awt.BorderLayout;
import java.security.*;
import java.sql.*;
import javax.swing.*;
import java.awt.event.*;
import java.io.*;
import java.util.Date;
public class LoginFrame extends JFrame implements ActionListener,Serializable,MessengerConstants
String _username=null,_password=null,_server=null;
JLabel label1,label2,label3,label4,NewAcc,ForgPassLab;
JTextField user,server,port;
JPasswordField password;
JButton ok;
ImageIcon icon;
private LoginFrame frame;
private byte[] DigPass;
private byte[] ReturnPass;
javax.swing.JButton quit, register,check;
Container container,container1;
Panel topPanel,centerPanel;
private Socket s;
public static MainFrame MainF;
private Socket socket;
private Thread thread;
private DataInputStream dis;
private DataOutputStream dos;
// public Socket s =null;
public LoginFrame(JFrame frame)
super("SIMSM Login Windows");
initial();
public LoginFrame()
super("SIMSM Login Windows");
initial();
public void initial()
Image iconImage = Toolkit.getDefaultToolkit().getImage("C:/SIMSM/Client/My/src/images/messengerImage.gif");
this.setIconImage(iconImage);
/*********Top Panel*********************/
/* ImageIcon imageI = new ImageIcon("C:/SIMSM/client/My/src/images/Face.jpg");
JLabel imageLabel = new JLabel(imageI);
topPanel = new Panel(new BorderLayout());
topPanel.add("North",imageLabel);*/
/**********Center Panel******************/
// centerPanel = new Panel(null);
container = this.getContentPane();
container.setLayout(new BorderLayout());
container.setBackground(Color.ORANGE);
topPanel = new Panel(new BorderLayout());
ImageIcon imageI = new ImageIcon("C:/SIMSM/client/My/src/images/Face.jpg");
JLabel imageLabel = new JLabel(imageI);
topPanel.add("North",imageLabel);
container.add("North",topPanel); // "North",topPanel);
//container.setBackground(Color.ORANGE);
label1= new JLabel(" Login name :");
label1.setForeground(Color.BLUE);
label1.setBounds(10,200,80,20);
user= new JTextField();
user.setBounds(100,200,130,20);
label2= new JLabel(" Password :");
label2.setForeground(Color.BLUE);
label2.setBounds(10,230,80,20);
password=new JPasswordField();
password.setBounds(100,230,130,20);
label3= new JLabel(" Server :");
label3.setForeground(Color.BLUE);
label3.setBounds(10,260,80,20);
server= new JTextField("192.168.0.1");
server.setBounds(100,260,130,20);
label4= new JLabel(" Port :");
label4.setForeground(Color.BLUE);
label4.setBounds(10,290,80,20);
port=new JTextField(2979+"");
port.setBounds(100,290,130,20);
port.setEditable(false);
ok=new JButton("Login");
ok.setBackground(Color.RED);
ok.setForeground(Color.YELLOW);
ok.setBounds(40,350,80,20);
quit = new JButton("Quit");
quit.setBackground(Color.RED);
quit.setForeground(Color.YELLOW);
quit.setBounds(150,350,80,20);
NewAcc = new JLabel("Get a new SIMSM ID......");
NewAcc.setBounds(80,390,200,20);
NewAcc.setForeground(Color.BLUE);
register = new JButton("Register");
register.setBackground(Color.RED);
register.setForeground(Color.YELLOW);
register.setBounds(100,420,90,20);
ForgPassLab = new JLabel("If You Forget Your ID/Password ?");
ForgPassLab.setBounds(60,480,200,20);
ForgPassLab.setForeground(Color.BLUE);
check = new JButton("Check it...");
check.setBackground(Color.RED);
check.setForeground(Color.YELLOW);
check.setBounds(100,500,90,20);
container.add(label1);
container.add(user);
container.add(label2);
container.add(password);
container.add(label3);
container.add(server);
container.add(label4);
container.add(NewAcc);
container.add(ForgPassLab);
container.add(port);
container.add(ok);
container.add(quit);
container.add(register);
container.add(check);
ok.addActionListener(this);
quit.addActionListener(this);
register.addActionListener(this);
check.addActionListener(this);
this.setSize(290,580);
this.setResizable(true);
this.setLocation(500,150);
this.setVisible(true);
} // end initial method
private void initDialogBox(JFrame frame)
public void actionPerformed(ActionEvent event)
if (event.getSource() == register)
RegFrame r = new RegFrame(); //call class register
// if press Quit Bouttom
if (event.getSource()== quit)
if(JOptionPane.showConfirmDialog(this,
"Are you sure to Exit SIMS chat system?",
"Exit SIMSM ",
JOptionPane.YES_NO_OPTION,
JOptionPane.WARNING_MESSAGE,
new ImageIcon(exitIcon))== JOptionPane.YES_OPTION)
{System.exit(0);}
if(event.getSource()== ok)
String UserId= user.getText();
char[] pass = password.getPassword();
String Spass = new String(pass);
try {
//sentAuthentication(UserId,Spass,s.getOutputStream());
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
} catch (IOException ex) {
ex.printStackTrace();
try {
DataInputStream in = new DataInputStream(s.getInputStream());
String mess = in.readUTF();
// in.close();
/* if(mess.equalsIgnoreCase("wrong password re-type it!"))
password.setText("");
else
if(mess.equalsIgnoreCase("wrong ID and Password Try to register"))
user.setText("");
password.setText("");
else*/
// doLogin(UserId,Spass);
System.err.println("Client Log in");
this.setVisible(false);
} catch (Exception ex) {
ex.printStackTrace();
} //end if
if (event.getSource() == check)
SignInProb chekPro = new SignInProb();
public static void main(String args[])
LoginFrame logD = new LoginFrame();
logD.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} //end class LoginEdited by: master2007 on Mar 8, 2008 12:05 PMs difficult to read all those lessons because i dont have an internet connection in my homeSearch around the tutorial pages, there's a download link somewhere. You can download the whole set and read offline. **
i read most of themGood for you.
so anyone can help me with my layout plz.Well it's difficult to cover your entire learning needs on a forum -- I'm sure you realize that.
db
** 34 MB, download from
{color:0000ff}http://java.sun.com/docs/books/tutorial/information/download.html{color}
Edited by: Darryl.Burke -
I am converting our BO Universe to OBIEE. There exist in the Universe an object which select COUNT(DISTINCT inventory_item_id) and has a WHERE CLAUSE that gives a date range.
Going to OBIEE, how can I apply this WHERE CLAUSE to the object only? I can't find a place where to set this up. What I found was the WHERE CLAUSE box in the content tab of the table source. I wouldn't like to place it here because this WHERE CLAUSE should only fire when this object is selected by the user in his report.
I would appreciate your help very much.
Thank you.Hi,
I created a report filter instead and saved it. I noticed one thing when I tested this. It took a while for the report to be generated. Is there a way I could do improve on the performance? This is what I placed in the report filter:
CURRENT_DATE >= IFNULL("- Price List Lines"."Item Start Date" , CURRENT_DATE ) AND CURRENT_DATE < IFNULL("- Price List Lines"."Item End Date", TIMESTAMPADD( SQL_TSI_DAY , CURRENT_DATE , 1))
Thank you. -
Something keeps trying to download on my mac and I don't know what it is. It is not in the apple store and just comes out nowhere and request for my password to download something and I don't know what it is. How to make this stop? It pops up every single day.
Erica,
I can, with 99.99% certainty, tell you that you are absolutely right in not wanting to download or install this "Helper," whatever it is (but we can be equally certain it would not "help" anything).
I cannot comment as to Oglethorpe's recommendation of 'adwaremedic'; I am unfamiliar with it. His links to the Apple discussion and support pages warrant your time and attention.
It might be really simple -- Trying looking in your Downloads folder, trash anything that you don't know with certainty is something you want to keep, and then Secure Empty your Trash. Then remove the AdBlock extension, LastPass, and Web of Trust extensions to Safari and re-boot. If the issue goes away, still be extraordinarily careful in the future.
Unfortunately, it's probably not going to be that simple to get rid of, in which case I'd then try the line by line editing in HT203987.
I have no further suggestions (other than a complete wipe and re-install...but that's a pain because trying to restore from Time Machine would simply ... restore the Mal).
For the rest of us, please post when you find a solution.
Best.
BPW
(Also, try to edit your second post -- black out your last name on the screenshot and re-post it for others) -
How to avoid repeat where clause in oracle sql
Hi,
Please find my query below, I need a help to avoid duplication of **where** clause in my query.
In my below query, **JOIN** condition is same for both the queries and **WHERE** condition also same except this clause "and code.code_name="transaction_1"
In **IF ** condition only credit and debit is swapped on both queries, due to this **Credit and Debit** and this where clause "and code.code_name="transaction_1" I am duplicating the query. Can you please give some solution to avoid this duplication. I am using oracle 11g
select DAY as business_date,sum(amount) as AMOUNT, type_amnt as amount_type,test_code as code_seg
from
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'credit'
ELSE 'debit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_1"
UNION ALL
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'debit'
ELSE 'credit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_2"
group by DAY, test_code,type_amnt
Thanksuser10624672 wrote:
Hi,
Please find my query below, I need a help to avoid duplication of **where** clause in my query.
In my below query, **JOIN** condition is same for both the queries and **WHERE** condition also same except this clause "and code.code_name="transaction_1"
In **IF ** condition only credit and debit is swapped on both queries, due to this **Credit and Debit** and this where clause "and code.code_name="transaction_1" I am duplicating the query. Can you please give some solution to avoid this duplication. I am using oracle 11g
select DAY as business_date,sum(amount) as AMOUNT, type_amnt as amount_type,test_code as code_seg
from
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'credit'
ELSE 'debit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_1"
UNION ALL
select table1_alias.date as DAY,code.code_numb as test_code,
CASE
WHEN qnty_item > 0 THEN 'debit'
ELSE 'credit'
END as type_amnt,
"25.55" as amount
from
code_table code,
table1 table1_alias
join table2 table2_alias on table1_alias.id = table2_alias.id
where
table1_alias.state="OK"
and table1_alias.type="R"
and code.code_type="Movie"
and code.code_name="transaction_2"
group by DAY, test_code,type_amnt
ThanksA very brief glance and it looks to me like the only difference between the 2 queries are
and code.code_name="transaction_1"In the first portion and
and code.code_name="transaction_2"So if that's all that is difference, you'd just want to use a single query (no union's) with
and code.code_name in ('transaction_1', 'transaction_2')Cheers, -
How to make this work flow?
Hi,
In a target database such like MySQl, I define a colum role to store the roels in SIM. Then, I want to make a post-workflow that set the account with related role which is defined in the DB after reconciliation and move those accounts from this DB to a specified organzation.
How to make this workflow?
If anyone know about this, kindly help me...
thanks..Just a thought... Are you able to run this as activesync? If you use activesync you could just use a form or metaview to merge (or replace) your role value with waveset.roles and set the org for accounts that correlate.
-Rob -
Anyone knows how to make this code to netbeans??
anyone knows how to make this code to netbeans?? i just want to convert it into netbeans... im not really advance with this software... anyway..just reply if you have any idea...or steps how to build it... etc.... thanks guys...
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
import java.awt.event.*;
import java.util.regex.*;
public class FilterTable {
public static void main(String args[]) {
Runnable runner = new Runnable() {
public void run() {
JFrame frame = new JFrame("Sorting JTable");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Object rows[][] = {
{"AMZN", "Amazon", 41.28},
{"EBAY", "eBay", 41.57},
{"GOOG", "Google", 388.33},
{"MSFT", "Microsoft", 26.56},
{"NOK", "Nokia Corp", 17.13},
{"ORCL", "Oracle Corp.", 12.52},
{"SUNW", "Sun Microsystems", 3.86},
{"TWX", "Time Warner", 17.66},
{"VOD", "Vodafone Group", 26.02},
{"YHOO", "Yahoo!", 37.69}
Object columns[] = {"Symbol", "Name", "Price"};
TableModel model =
new DefaultTableModel(rows, columns) {
public Class getColumnClass(int column) {
Class returnValue;
if ((column >= 0) && (column < getColumnCount())) {
returnValue = getValueAt(0, column).getClass();
} else {
returnValue = Object.class;
return returnValue;
JTable table = new JTable(model);
final TableRowSorter<TableModel> sorter =
new TableRowSorter<TableModel>(model);
table.setRowSorter(sorter);
JScrollPane pane = new JScrollPane(table);
frame.add(pane, BorderLayout.CENTER);
JPanel panel = new JPanel(new BorderLayout());
JLabel label = new JLabel("Filter");
panel.add(label, BorderLayout.WEST);
final JTextField filterText =
new JTextField("SUN");
panel.add(filterText, BorderLayout.CENTER);
frame.add(panel, BorderLayout.NORTH);
JButton button = new JButton("Filter");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String text = filterText.getText();
if (text.length() == 0) {
sorter.setRowFilter(null);
} else {
try {
sorter.setRowFilter(
RowFilter.regexFilter(text));
} catch (PatternSyntaxException pse) {
System.err.println("Bad regex pattern");
frame.add(button, BorderLayout.SOUTH);
frame.setSize(300, 250);
frame.setVisible(true);
EventQueue.invokeLater(runner);
}its okay onmosh.....what we need to
this...forum....is to have a good......relationship
of programmers......and to start with .....we need to
have a good attitude........right.....???.....no
matter how good you are in programming but if you did
not posses the right kind of attitude....everything
is useless.....in the first place....all we
want....is just to ask...some....help....but
conflicts......but unluckily......we did not expect
that there are members in here which......not
good...to follow.....just as suggestion for those
people not having the right kind of attidude...why
can't you do in a very nice message sharing in a very
nice....way....why we need to put some
stupid....stuff...words.....can't you live with out
******* ****....its not.....lastly especially you
have your children right now and people around...that
somehow......idiolize...you even me....is one of
them......but showing but attitude....is not
good......tnx....hope you'll take it this....in the
positive side.....be optimistic...guys....the
world..is not yours....all of us will just past
away....always..remember that one.....treasure..our
stay in this....temporary home.....which...is
world....Whoa. That post seems to be killing my brain.
URK
Join........us..........do not be..........afraid....... -
How to make this in Flash Builder?
I am looking to make an Android app and one of the functionalities is somehting like in the video.
I am new to Flash Builder and looking for some help to make it.
Anyone has a tutrial or has any idea how to make this?
Android SQLite App Development with Flash Builder and Flex - YouTubeI'll give you the short answer, Flash Catalyst is built on top of the Flex Framework and it's libraries. When you launch or load a FC swf, it will contact the Adobe servers to check the status of various libraries. Since you are loading this into a standard Flash Professional created swf, you are by passing some of the fallbacks that exist.
If the movieClip that you are creating is just a filler image, and you are just centering the FC swf, then I also recommend using CSS to display the filler and some HTML/CSS to center the content.
Hope this helps a little.
If you did the loading of the FC swf from a Flash Builder based project, you should not have the issue, since it is a Flex based SWF, the framework checks are already handled for you.
Chris -
How do make this query ?
CREATE TABLE CLIENT (
CLIENTID NUMBER PRIMARY KEY,
NAME VARCHAR2(40)
CREATE TABLE SALESMAN (
SALESMANID NUMBER PRIMARY KEY,
NAME VARCHAR2(40),
ALL_CLIENTS NUMBER -- ACCESS ALL CLIENTS IF VALUE IS 1
CREATE TABLE CLIENTSALESMAN (
SALESMANID NUMBER,
CLIENTID NUMBER
INSERT INTO CLIENT VALUES(1,'Bob');
INSERT INTO CLIENT VALUES(2,'Jhon');
INSERT INTO CLIENT VALUES(3,'Robert');
INSERT INTO CLIENT VALUES(4,'Clarck');
INSERT INTO SALESMAN VALUES (1,'Christina',0);
INSERT INTO SALESMAN VALUES (2,'Doug',1); -- access all clients
INSERT INTO CLIENTSALESMAN VALUES (1,1);
INSERT INTO CLIENTSALESMAN VALUES (1,2);
How do you return all the clients of a salesman ? same that SALESMAN.ALL = 1 OR SALESMAN.ALL = 0.
the salesman.all is 1 then he access all clients no need insert in CLIENTSALESMAN. If SALESMAN.ALL = 0 he
access clientsalesman.
Does somebody some suggestion how i make this ?
thanks !1 select *
2 from (select a.name SALESMAN, b.name CLIENT
3 from salesman a, client b, clientsalesman
4 where a.SALESMANID = c.SALESMANID
5 and b.CLIENTID = c.CLIENTID
6 union
7 select a.name SALESMAN, b.name CLIENT
8 from salesman a, client b
9 where a.ALL_CLIENTS = 1)
10* where salesman = '&1'
SQL> /
Enter value for 1: Christina
old 10: where salesman = '&1'
new 10: where salesman = 'Christina'
Christina Bob
Christina Jhon
SQL> /
Enter value for 1: Doug
old 10: where salesman = '&1'
new 10: where salesman = 'Doug'
Doug Bob
Doug Clarck
Doug Jhon
Doug RobertNicolas. -
Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with 6.0.1(10A523)version. Please help how to solve this problem. Thanks.
Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore. -
I bought a composite AV cable with 30 pin connector at a proper apple store for my ipad 2 which no longer works now i have updated to ios7 - please advise how to make this work ?
I have the same problem.
Two similar discussions:
https://discussions.apple.com/message/23081658#23081658
https://discussions.apple.com/message/23281391#23281391
I have not yet seen any official response to the question: "Is the Apple AV Composite cable fully supported with 30pin connector devices upgraded with iOS7 - specifically ? - eg. iPad 2, iPhone 4, iPhone 4s"
If it is not currently supported is that then due to a bug / oversight and in that case is it something that will be fixed in the near future?
Please let us know what feedback you got from asking Apple support.
Maybe you are looking for
-
I have 2 problems with monitorig. 1. My BPM performs 2 synch call (JDBC Adapter) 2 asynch (Mail and File) but End-To-End doesn't show Mail and JDBC Adapter rectangles in instance and process view. For Mail message (instance view) it shows - Success
-
Facebook says Flash is out of date?
Facebook says Flash is out of date? Adobe says Mavericks not supported. Download of Flashplayer works but i won't install. Help
-
I updated my iphone to the new version and now it tells me to connect to itunes which I did and it's not doing anything else, what do I need to do?
-
Template page doesn't update the css file location
I've been using Dreamweaver for years; been using templates for years but can't figure why this now happening. I create a new page from a template (that I've used for years) and everything on the page (including image and other links) is fine and upd
-
Como faço uma copia frente e verso?