Need help with date range searches for Table Sources in SES
Hi all,
I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
I am using SES 10.1.8.3 on Windows 32.
My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
TRACKNUM Varchar2
TITLE Varchar2
SUMMARY CLOB
SYMBOLCODE Varchar2
Timestamp Date
OBSDATE Date
GEOM SDO_GEOMETRY
I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
Schedule crawls and indexes entire REPORTS table.
In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 10-MAR-07, 22-SEP-07, 02-FEB-08, etc.)
And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
Thanks very much, in advance….
raford,
Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
thanks very much!
Similar Messages
-
Neen help with date range searches for Table Sources
Hi all,
I need help, please. I am trying to satisfy a Level 1 client requirement for the ability to search for records in crawled table sources by a date and/or date range. I have performed the following steps, and did not get accurate results from Advanced searching for date. Please help me understand what I am doing wrong, and/or if there is a way to define a date search attribute without creating a LOV for a date column. (My tables have 500,00 rows.)
I am using SES 10.1.8.3 on Windows 32.
My Oracle 10g Spatial Table is called REPORTS and this table has the following columns:
TRACKNUM Varchar2
TITLE Varchar2
SUMMARY CLOB
SYMBOLCODE Varchar2
Timestamp Date
OBSDATE Date
GEOM SDO_GEOMETRY
I set up the REPORTS table source in SES, using TRACKNUM as the Primary Key (unique and not null), and SUMMARY as the CONTENT Column. In the Table Column Mappings I defined TITLE as String and TITLE.
Under Global Settings > Search Attributes I defined a new Search Attribute (type Date) called DATE OCCURRED (DD-MON-YY).
Went back to REPORTS source previously defined and added a new Table Column Mapping - mapping OBSDATE to the newly defined DATE OCCURRED (DD-MON-YY) search attribute.
I then modified the Schedule for the REPORTS source Crawler Policy to “Process All Documents”.
Schedule crawls and indexes entire REPORTS table.
In SES Advanced Search page, I enter my search keyword, select Specific Source Group as REPORTS, select All Match, and used the pick list to select the DATE OCCURRED (DD-MON-YY) Attribute Name, operator of Greater than equal, and entered the Value 01-JAN-07. Then the second attribute name of DATE_OCCURRED (DD-MON-YY), less than equals, 10-JAN-07.
Search results gave me 38,000 documents, and the first 25 I looked at had dates NOT within the 01-JAN-07 / 10-JAN-07 range. (e.g. OBSDATE= 24-MAR-07, 22-SEP-), 02-FEB-08, etc.)
And, none of the results I opened had ANY dates within the SUMMARY CLOB…in case that’s what was being found in the search.
Can someone help me figure out how to allow my client to search for specific dated records in a db table using a single column for the date? This is a major requirement and they are anxiously awaiting my solution.
Thanks, in advance….raford,
Thanks very much for your reply. However, from what I've read in the SES Admin Document is that (I think) the date format DD/MM/YYYY pertains only to searches on "file system" sources (e.g. Word, Excel, Powerpoint, PDF, etc.). We have 3 file system sources among our 25 total sources. The remaining 22 sources are all TABLE or DATABASE sources. The DBA here has done a great job getting the data standardized using the typical/default Oracle DATE type format in our TABLE sources (DD-MON-YY). Our tables have anywhere from 1500 rows to 2 million rows.
I tested your theory that the dates we are entering are being changed to Strings behind the scenes and on the Advanced Page, searched for results using OBSDATE equals 01/02/2007 in an attempt to find data that I know for certain to be in the mapped OBSDATE table column as 01-FEB-07. My result set contained data that had an OBSDATE of 03-MAR-07 and none containing 01-FEB-07.
Here is the big issue...in order for my client to fulfill his primary mission, one of the top 5 requirements is that he/she be able to find specific table rows that are contain a specific date or range of dates.
thanks very much! -
I am printing a calendar and certain events will be helds on certain dates.
One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
When I query the database the date must be formatted dd-MMM-yy
I am able to get today's date by doing this:
java.util.Date today = new java.util.Date();
String formatString = "dd-MMM-yy";
SimpleDateFormat sdf = new SimpleDateFormat(formatString);
String today_str = sdf.format(today);
My code for printing the calendar: I left out some of the table formatting in the JSP page.
GregorianCalendar d = new GregorianCalendar();
int today = d.get(Calendar.DAY_OF_MONTH);
int month = d.get(Calendar.MONTH);
d.set(Calendar.DAY_OF_MONTH,1);
int weekday = d.get(Calendar.DAY_OF_WEEK);
for(int i = Calendar.SUNDAY; i < weekday; i++)
out.print("<td> </td>");
do {
int day = d.get(Calendar.DAY_OF_MONTH);
out.print("<td>" + day + "</td>");
String formatString = "dd-MMM-yy";
SimpleDateFormat sdf = new SimpleDateFormat(formatString);
//if(event exists on this day
// Get results
// print link for viewing
// if (after today) print link for edit
if(weekday == Calendar.SATURDAY)
out.println("</tr><tr valign=top>");
d.add(Calendar.DAY_OF_MONTH,1);
weekday = d.get(Calendar.DAY_OF_WEEK);
} while(d.get(Calendar.MONTH) == month);
if(weekday != Calendar.SUNDAY)
System.out.println();
The part I need help on is this:
//if(event exists on this day
// Get results
// print link for viewing
// if (after today) print link for edit
I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
All the function in the Date class that I think would do this have been deprecated.Need Help with Dates
Here is some information about dates:
There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
Hope that helps. -
Need help with a activation code for Adobe Acrobat X Standard for my PC, Don't have older Version of Adobe Acrobat 9, 8 or 7.
You don't need to install the older version, you only need the serial number from your original purchase. If you don't have them to hand, did you register? If so, they should be in your Adobe account. If not you really need to contact Adobe, though it isn't clear they will be able to do anything without some proof of purchase etc.
-
I think I need help with driver (software) settings for D110a
I think I need help with driver (software) settings for D110a all-in-one
Product: D110a all-in-one
OS: Windows XP Professional
Error messages: None
Changes before problem appeared: None--new installation
The quality of photo images (mostly JPG files) in printouts is awful even though the files display beautifully on the PC screen. I am using
IrfanView software for displaying/printing. As far as I can tell, IrfanView is not the problem.
When I print the same images on a Deskjet 5150 attached to a different PC also running XP Pro and IrfanView, the quality of the printouts is at
least acceptable, Some would probably say good or very good.
It's dificult to explain in words the problem with the printouts. A picture of really pretty vegetables (squashes, tomatoes, watermelon, etc) comes
out much too red. Moreover, the red, which appears shaded on the screen, seems to be all one shade in the D110a printouts.
Something similar happens to a view of a huge tree in full leaf. On screen, there are subtle variations in the "greenness" of the leaves. In the
printout, all green is the same shade. In the same printout, the trunk of the tree is all a single shade of grey. It isn;t even obvious that the
trunk is a round, solid object.
I liken the effect to audio that disappears entirely when you lower the volume and gets clipped into square waves in even moderately loud passages.
I don't know whether the D110a driver software permits adjusting the parameters that appear to be set incorrectly, and if adjustments are possible,
how I would identify which parameters to adjust, how I would access them, or how I would adjust them. I'm hoping that someone can help. Thanks.
I forgot to mention that I have used the diagnostic application and it tells me that there are no problems.
e-mail me at [email protected]brazzmonkey wrote:
Hi everyone,
I noticed the following message when network starts on my gateway
Warning: This functionality is deprecated.
Please refer to /etc/rc.conf on how to define a single wired
connection, or use a utility such as netcfg.
Then I realized the way network settings should be written in rc.conf has changed. But I can't figure out how this should be done.
Currently, my set up is the following (old way):
INTERFACES=(eth0 eth1)
eth0="dhcp"
eth1="eth1 192.168.0.10 netmask 255.255.255.0 broadcast 192.168.0.255"
ROUTES=(!gateway)
eth0 is on DHCP because the IP is dynamically assigned my ISP.
eth1 has a fix IP because it's on the LAN side.
No problem to use DHCP on eth0 with the new settings.
But for eth1, I don't know what I am supposed to write for gateway.
Wiki isn't clear on that one either, and it looks like many articles still refer to the old way.
Any guidance appreciated, thanks.
brazzmonkey,
you can't define 2 interfaces the old way (even though I saw some tricky workaround somewhere in the forums).
Use, f.e., netcfg:
Comment your old lines.
In /etc/rc.conf insert:
NETWORKS=(Eth0-dhcp Eth1-static)
DAEMONS=(..... !network @net-profiles ....)
In /etc/network.d create 2 files:
First one is named Eth0-dhcp.
Contents:
CONNECTION="ethernet"
DESCRIPTION="Whatever text"
INTERFACE=eth0
HOSTNAME="your hostname"
IP="dhcp"
DHCP_TIMEOUT=15
Second one is named Eth1-static.
Contents:
CONNECTION='ethernet'
DESCRIPTION='whatver'
INTERFACE='eth1'
HOSTNAME='hname'
IP='static'
ADDR='192.168.0.10'
GATEWAY='192.168.0.1' # your gateway IP
DNS=('192.168.0.1') # your DNS server
The names Eth0-dhcp and Eth1-static are not magic. They just must be the same in rc.conf and in /etc/network.d.
Hope it helps.
mektub
PS: netcfg must be installed.
Last edited by Mektub (2011-07-20 14:07:05) -
I need help with downgradeing my ios for my ipod touch 4th gen
i need help with downgradeing my ios for my ipod touch 4th gen
As has alwys been the case, you cannot go back.
Sorry -
Need Help with data type conversion
Hello People,
I am new to java, i need some help with data type conversion:
I have variable(string) storing IP Address
IPAddr="10.10.103.10"
I have to call a library function which passes IP Address and does something and returns me a value.
The problem I have is that external function call in this library excepts IP Address in form of a byte array.
Here is the syntax for the function I am calling through my program
int createDevice (byte[] ipAddress).
now my problem is I don't know how to convert the string IPAddr variable into a byte[] ipAddress to pass it through method.Class InetAddress has a method
byte[] getAddress() You can create an instance using the static method getByName() providing the IP address string as argument. -
[solved]Need help with a bash script for MOC conky artwork.
I need some help with a bash script for displaying artwork from MOC.
Music folders have a file called 'front.jpg' in them, so I need to pull the current directory from MOCP and then display the 'front.jpg' file in conky.
mocp -Q %file
gives me the current file playing, but I need the directory (perhaps some way to use only everything after the last '/'?)
A point in the right direction would be appreciated.
thanks, d
Last edited by dgz (2013-08-29 21:24:28)Xyne wrote:
You should also quote the variables and output in double quotes to make the code robust, e.g.
filename="$(mocp -Q %file)"
dirname="${filename%/*}"
cp "$dirname"/front.jpg ~/backup/art.jpg
Without the quotes, whitespace will break the code. Even if you don't expect whitespace in any of the paths, it's still good coding practice to include the quotes imo.
thanks for the tip.
here it is, anyhow:
#!/bin/bash
filename=$(mocp -Q %file)
dirname=${filename%/*}
cp ${dirname}/front.jpg ~/backup/art.jpg
then in conky:
$alignr${execi 30 ~/bin/artc}${image ~/backup/art.jpg -s 100x100 -p -3,60}
thanks for the help.
Last edited by dgz (2013-08-29 21:26:32) -
Need help with SQL Query (query for certain IDs in a table and then IDs not in result set)
OK. This is hard to explain but that may be my problem in constructing the query.
I have a table that has a list of jobs. The jobs information in this table, among other things, is a short description of the job itself (think "title" in phrase form), date, and ID.
So I can query the table to get all the jobs for a particular grouping of IDs (the only ones I am interested in) that ran successfully for a given time period. But what I want are all the jobs that did not succeed (or therefore are not present in the table) for this group of jobs and for a certain date range. But these are not the only job id's in the table.
To get the successful ones I do the following:
SELECT id,short_desc FROM my_table where
id IN('1230', '1231', '1232', '1239', '1244', '1245',
'1246', '1247', '1248', '1272', '1280', '1281', '1282',
'1283', '1284', '1285', '1286', '1249', '1250', '1251',
'1252', '1253', '1255', '1233', '1234', '1235', '1236',
'1237', '1238', '1256', '1257','1258', '1254', '1290','1310')
AND the_date > = SYSDATE - 23/24
AND to_char(the_date, 'DD-MON-YYYY') = TO_CHAR(CURRENT_DATE, 'DD-MON-YYYY')
I have tried to use another AND clause with NOT IN and the group or NOT EXISTS but that doesn't work as there are other jobs captured in this table with id's of course. I am only concerned with these id's:
IN('1230', '1231', '1232', '1239', '1244', '1245',
'1246', '1247', '1248', '1272', '1280', '1281', '1282',
'1283', '1284', '1285', '1286', '1249', '1250', '1251',
'1252', '1253', '1255', '1233', '1234', '1235', '1236',
'1237', '1238', '1256', '1257','1258', '1254', '1290','1310')
Someone said to use a temp table. I don't think I have permission and I haven't tried as I want to do this in one query if possible.
After thinking about this I am at a loss. I tried to do this in the front end but it just became too messy.You do not need a physical temp table. You need an in-line view:
WITH list as (
SELECT '1230' id FROM DUAL UNION ALL
SELECT '1231' FROM DUAL UNION ALL
SELECT '1232' FROM DUAL UNION ALL
SELECT '1239' FROM DUAL UNION ALL
SELECT '1244' FROM DUAL UNION ALL
SELECT '1245' FROM DUAL UNION ALL
SELECT '1246' FROM DUAL UNION ALL
SELECT '1247' FROM DUAL UNION ALL
SELECT '1248' FROM DUAL UNION ALL
SELECT '1272' FROM DUAL UNION ALL
SELECT '1280' FROM DUAL UNION ALL
SELECT '1281' FROM DUAL UNION ALL
SELECT '1282' FROM DUAL UNION ALL
SELECT '1283' FROM DUAL UNION ALL
SELECT '1284' FROM DUAL UNION ALL
SELECT '1285' FROM DUAL UNION ALL
SELECT '1286' FROM DUAL UNION ALL
SELECT '1249' FROM DUAL UNION ALL
SELECT '1250' FROM DUAL UNION ALL
SELECT '1251' FROM DUAL UNION ALL
SELECT '1252' FROM DUAL UNION ALL
SELECT '1253' FROM DUAL UNION ALL
SELECT '1255' FROM DUAL UNION ALL
SELECT '1233' FROM DUAL UNION ALL
SELECT '1234' FROM DUAL UNION ALL
SELECT '1235' FROM DUAL UNION ALL
SELECT '1236' FROM DUAL UNION ALL
SELECT '1237' FROM DUAL UNION ALL
SELECT '1238' FROM DUAL UNION ALL
SELECT '1256' FROM DUAL UNION ALL
SELECT '1257' FROM DUAL UNION ALL
SELECT '1258' FROM DUAL UNION ALL
SELECT '1254' FROM DUAL UNION ALL
SELECT '1290' FROM DUAL UNION ALL
SELECT '1310' FROM DUAL
SELECT l.id,
nvl(short_desc,'This job failed') short_desc
FROM my_table m
WHERE RIGTH JOIN
list
ON (
m.id = l.id
AND
the_date > = SYSDATE - 23/24
AND
the_date < TRUNC(SYSDATE) + 1
SY. -
Hi,
I have an Oracle form which allows users to enter :start_date_active(mandatory) and :end_date_active (can be null).
I need to check in form using SQL if there already exists a record for this date range or if there is any overlapping date ranges for the value entered and disallow user from entering that.
I have my query as follows:
SELECT (1)
FROM <table> xsv
WHERE 1=1
AND ( (:START_DATE_ACTIVE >= xsv.start_date_active) AND
(:START_DATE_ACTIVE <= nvl(xsv.end_date_active,'31-DEC-4712'))
OR
(:END_DATE_ACTIVE >= xsv.start_date_active) AND
(:END_DATE_ACTIVE <= nvl(xsv.end_date_active,'31-DEC-4712'))
But, this incorrectly allows me to enter over lapping date ranges when the :end_date_active is null.
It should work as follows :
eg.
start_date_active end_date_active
01-Apr-2009 allowed
01-Mar-2009 10-Mar-2009 allowed
01-feb-2009 Not allowed, as it overlaps with 1st record
10-feb-2009 05-Mar-2009 Not allowed, as it overlaps with 2nd record
05-Mar-2009 20-mar-2009 Not allowed, as it overlaps with 2nd record
and so on.
How do I modify my query to deal with null end dates ?
Many Thanks
ShankarHi, Shankar,
Whenever you have a question, it helps to post:
(1) The version of Oracle (and any other relevant software) you're using
(2) A little sample data (just enough to show what the problem is) from all the relevant tables
(3) The results you want from that data (You posted this. It would be better if it were formatted.)
(4) Your best attempt so far (formatted) (You posted this, but since it's unformated, it's very hard to read.)
(5) The full error message (if any), including line number
Executable SQL statements (like "CREATE TABLE AS ..." or "INSERT ..." statements) are best for (2).
Formatted tabular output is okay for (3). Type these 6 characters
{code}
(small letters only, inside curly brackets) before and after formatted text, to preserve spacing.
Use different names for the parameters and the columns. For example, if the column is called start_date_active, call the corresponding parameter :p_start_date_active. It will help to keep them straight.
In this statement, if the column end_date_active IS NULL, you're treating it as an impossibly late date:
(:END_DATE_ACTIVE <= nvl(xsv.end_date_active,'31-DEC-4712'))That's good. (You should really use TO_DATE ('31-DEC-4712', 'DD-MON-YYYY'), though.)
If it's possible for the parameter :end_date_active to be NULL, you should use NVL in the same way, to equate it with some appropriate date.
The correct way to see if the range a to b (a <= b) overlaps with x to y (x <= y) is:
WHERE b >= x
AND a <= yIf you want an expression that's TRUE when they do not overlap, then say
WHERE NOT ( b >= x
AND a <= y
)or, equivalently,
WHERE b < x
OR a > y -
Hi i need help with getting my homework for school
im in a nine week class that ends tommorw and need help go\etting my program working properly these are the requirements ofr the assignments:
Modify the Inventory Program by adding a button to the GUI that allows the user to move
to the first item, the previous item, the next item, and the last item in the inventory. If the
first item is displayed and the user clicks on the Previous button, the last item should
display. If the last item is displayed and the user clicks on the Next button, the first item
should display.
· Add a company logo to the GUI using Java graphics classes.
Modify the Inventory Program to include an Add button, a Delete button, and a Modifybutton on the GUI. These buttons should allow the user to perform the corresponding actions on the item name, the number of units in stock, and the price of each unit. An item added to the inventory should have an item number one more than the previous last item. Add a Save button to the GUI that saves the inventory to a C:\data\inventory.dat file. Use exception handling to create the directory and file if necessary. Add a search button to the GUI that allows the user to search for an item in the inventory by the product name. If the product is not found, the GUI should display an appropriate message. If the product is found, the GUI should display that products information in the GUI. Post final .class and .java files as an attachment.
this is what i have there are three java files im puttong in here
first is the panel frame
import java.awt.GridLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Component;
import javax.swing.SwingConstants;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JList;
import java.util.*;
import java.text.NumberFormat;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.net.URL;
import java.io.*;
import java.util.Scanner;
import javax.swing.JOptionPane;
import java.text.NumberFormat;
public class PanelFrame extends JFrame
private JPanel buttonJPanel; // panel to hold buttons
private JButton buttons[]; // array of buttons
private JLabel label1; // JLabel iventory number
private JLabel label2; // JLabel product name
private JLabel label3; // JLabel product price
private JLabel label4; // JLabel product in stock
private String p_ProductName; // private variable for the employee name.
private int p_UnitCount; // private variable for the hours worked.
private double p_UnitPrice; // private variable for the hourly wage.
private int p_ItemNumber; // private inventory number
//create inventory object
Inventory myInventory = new Inventory ();
// no-argument constructor
public PanelFrame()
super( "Panel Demo" );
//Add items to the inventory within the Invntory
myInventory.addItem(new productinfo(1,"Html a Begginers Guide",14,29.99));
myInventory.addItem(new productinfo(2,"Html 4 for Dummies",6,29.99));
myInventory.addItem(new productinfo(3,"Visio Step by Step",7,24.99));
myInventory.addItem(new productinfo(4,"APA Publication Manual",14,47.99));
myInventory.addItem(new productinfo(5,"The Gregg Reference Manual",14,37.56));
setLayout( new FlowLayout() ); // set frame layout
// JLabel constructor with a string argument
label1 = new JLabel( "Inventory Number:%s: %d\n ",p_ItemNumber );
label1.setToolTipText( "This is Inventory number" );
add( label1 ); // add label1 to JFrame
label2 = new JLabel( "\n\nProduct Name: %s: %s\n", p_ProductName);
label2.setToolTipText( "This is Product Name" );
add( label2 ); // add label1 to JFrame
label3 = new JLabel( "\n\nPrice : %s:$%.2f\n",p_UnitPrice );
label3.setToolTipText( "This is product Price");
add( label3 ); // add label1 to JFrame
label4 = new JLabel( "\n\nQuanity %s: %d\n",p_UnitCount);
label4.setToolTipText( "This is Quanity in stock: " );
add( label4 ); // add label1 to JFrame
buttons = new JButton[ 4 ]; // create buttons array
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout( new GridLayout( 1, buttons.length ) );
String names[] = { "First", "Previous", "Next", "Last" };
JButton buttons[] = new JButton[ names.length ];
// create and add buttons
for ( int count = 0; count < buttons.length; count++ )
buttons[ count ] = new JButton( names[ count ] );
buttonJPanel.add( buttons[ count ] ); // add button to panel
} // end for
// setup the logo for the GUI ...image needs to be in same directory as source code
URL url = this.getClass().getResource("book103.gif");
Image img = Toolkit.getDefaultToolkit().getImage(url);
// scale the image so that it'll fit in the GUI
Image scaledImage = img.getScaledInstance(100, 100, Image.SCALE_AREA_AVERAGING);
// create a JLabel with the image as the label's Icon
Icon logoIcon = new ImageIcon(scaledImage);
JLabel companyLogoLabel = new JLabel(logoIcon);
companyLogoLabel.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
// add the logo to the GUI
getContentPane().add(companyLogoLabel, BorderLayout.WEST);
add( buttonJPanel, BorderLayout.SOUTH ); // add panel to JFrame
} // end PanelFrame constructor
} // end class PanelFramethis is the original part again with the code tag added
import java.awt.GridLayout;
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Component;
import javax.swing.SwingConstants;
import javax.swing.Icon;
import javax.swing.JComboBox;
import javax.swing.JTextArea;
import javax.swing.JList;
import java.util.;
import java.text.NumberFormat;
import javax.swing.;
import java.awt.;
import java.awt.event.;
import java.net.URL;
import java.io.*;
import java.util.Scanner;
import javax.swing.JOptionPane;
import java.text.NumberFormat;
public class PanelFrame extends JFrame
private JPanel buttonJPanel; // panel to hold buttons
private JButton buttons[]; // array of buttons
private JLabel label1; // JLabel iventory number
private JLabel label2; // JLabel product name
private JLabel label3; // JLabel product price
private JLabel label4; // JLabel product in stock
private String p_ProductName; // private variable for the employee name.
private int p_UnitCount; // private variable for the hours worked.
private double p_UnitPrice; // private variable for the hourly wage.
private int p_ItemNumber; // private inventory number
//create inventory object
Inventory myInventory = new Inventory ();
// no-argument constructor
public PanelFrame()
super( "Panel Demo" );
//Add items to the inventory within the Invntory
myInventory.addItem(new productinfo(1,"Html a Begginers Guide",14,29.99));
myInventory.addItem(new productinfo(2,"Html 4 for Dummies",6,29.99));
myInventory.addItem(new productinfo(3,"Visio Step by Step",7,24.99));
myInventory.addItem(new productinfo(4,"APA Publication Manual",14,47.99));
myInventory.addItem(new productinfo(5,"The Gregg Reference Manual",14,37.56));
setLayout( new FlowLayout() ); // set frame layout
// JLabel constructor with a string argument
label1 = new JLabel( "Inventory Number:%s: %d\n ",p_ItemNumber );
label1.setToolTipText( "This is Inventory number" );
add( label1 ); // add label1 to JFrame
label2 = new JLabel( "\n\nProduct Name: %s: %s\n", p_ProductName);
label2.setToolTipText( "This is Product Name" );
add( label2 ); // add label1 to JFrame
label3 = new JLabel( "\n\nPrice : %s:$%.2f\n",p_UnitPrice );
label3.setToolTipText( "This is product Price");
add( label3 ); // add label1 to JFrame
label4 = new JLabel( "\n\nQuanity %s: %d\n",p_UnitCount);
label4.setToolTipText( "This is Quanity in stock: " );
add( label4 ); // add label1 to JFrame
buttons = new JButton[ 4 ]; // create buttons array
buttonJPanel = new JPanel(); // set up panel
buttonJPanel.setLayout( new GridLayout( 1, buttons.length ) );
String names[] = { "First", "Previous", "Next", "Last" };
JButton buttons[] = new JButton[ names.length ];
// create and add buttons
for ( int count = 0; count < buttons.length; count++ )
buttons[ count ] = new JButton( names[ count ] );
buttonJPanel.add( buttons[ count ] ); // add button to panel
} // end for
// setup the logo for the GUI ...image needs to be in same directory as source code
URL url = this.getClass().getResource("book103.gif");
Image img = Toolkit.getDefaultToolkit().getImage(url);
// scale the image so that it'll fit in the GUI
Image scaledImage = img.getScaledInstance(100, 100, Image.SCALE_AREA_AVERAGING);
// create a JLabel with the image as the label's Icon
Icon logoIcon = new ImageIcon(scaledImage);
JLabel companyLogoLabel = new JLabel(logoIcon);
companyLogoLabel.setBorder(BorderFactory.createEmptyBorder(3,3,3,3));
// add the logo to the GUI
getContentPane().add(companyLogoLabel, BorderLayout.WEST);
add( buttonJPanel, BorderLayout.SOUTH ); // add panel to JFrame
} // end PanelFrame constructor
} // end class PanelFrame -
Hi, I am doing a search on a table using a date column having index defined on it.
when I am using below query:[Here 26-OCT-2010 is the current date.]
SELECT *
FROM cs_incidents_all_b
WHERE incident_date BETWEEN TO_DATE ('25-OCT-2010 00:00:00',
'DD-MON-RRRR HH24:MI:SS'
AND TO_DATE ('26-OCT-2010 23:59:59',
'DD-MON-RRRR HH24:MI:SS'
Explain plan statistics is - Cost : 4, Bytes: 559, Cardinality:1
If I run the same query by changing the dates and with 1 day duration, the cost is increasing significantly:
SELECT *
FROM cs_incidents_all_b
WHERE incident_date BETWEEN TO_DATE ('01-OCT-2010 00:00:00',
'DD-MON-RRRR HH24:MI:SS'
AND TO_DATE ('02-OCT-2010 23:59:59',
'DD-MON-RRRR HH24:MI:SS'
Explain plan statistics is - Cost : 3,643, Bytes: 2,217,553, Cardinality:3,967
And if I increase the date range, the cost is becoming too high.
If anybody faced this proble previously, kindly help me to resolve.
Thanks in advance,
Sam.Tuning request
Take a look at the
When your query takes too long ...
HOW TO: Post a SQL statement tuning request - template posting -
I need help with a trigger mutating a table
I'll add the trigger I have written now at the bottom. Here is the problem that I have. We have employees and their families in an individual table.
A family is indicated by matching client, branch, and emp_id. An employee is indicated by individual_num = 1. All other numbers indicate family members. A person is determined to be terminated by having a date other than '2299/12/31' (It's a varchar(10) and very very wrong. Don't ask...) in the termination date column.
A family member can be terminated in the system independent of the rest of there family. However, if an employee is terminated then all active family members need the termination date set to the same date as the employee. If that termination date is then changed for the employee all family members with the same date need to have their dates updated.
I understand why this causes table mutation but I need a work around. Any ideas? Please...
CREATE OR REPLACE TRIGGER INDIV_EMP_TERM
after update on INDIVIDUAL
for each row
begin
if ( :new.INDIVIDUAL_NUM = 1 and :old.TERMINATION_DATE <> :new.TERMINATION_DATE ) then
if ( :old.TERMINATION_DATE = '2299/12/31' ) then
update INDIVIDUAL
set TERMINATION_DATE = :new.TERMINATION_DATE
where CLIENT = :new.CLIENT
and BRANCH = :new.BRANCH
and EMP_ID = :new.EMP_ID
and INDIVIDUAL_NUM <> 1
and TERMINATION_DATE = '2299/12/31';
else
update INDIVIDUAL
set TERMINATION_DATE = :new.TERMINATION_DATE
where CLIENT = :new.CLIENT
and BRANCH = :new.BRANCH
and EMP_ID = :new.EMP_ID
and INDIVIDUAL_NUM <> 1
and TERMINATION_DATE = :old.TERMINATION_DATE;
end if;
end if;
end;Try your code like this below .It will help you to eliminate the mutating error
create or replace PACKAGE test_update IS
type row_type is table of rowid index by binary_integer;
v_row row_type ;
v_index binary_integer ;
v_num integer := 0 ;
flag integer := 1 ;
END;
create or replace trigger test_up
before update
on test123
begin
select USR_ID
into test_update.v_num
from test123 ;
dbms_output.put_line ( 'before update '||test_update.v_num );
test_update.v_index := 0;
end ;
create or replace trigger test_up_after
after update
on test123
begin
dbms_output.put_line ( test_update.v_index );
test_update.flag := 0 ;
for i in 1 .. test_update.v_index loop
update test123
set UPD_BY = nvl(test_update.v_num ,0),
UPD_DATE = sysdate
where rowid = test_update.v_row(i) ;
end loop ;
test_update.flag := 1 ;
test_update.v_index := 0;
end ;
create or replace trigger test_1
after update on test123
for each row
begin
-- dbms_output.put_line ( 'after update test flag '||test_update.flag );
if test_update.flag = 1 then
test_update.v_index := test_update.v_index + 1 ;
test_update.v_row(test_update.v_index) := :old.rowid ;
end if ;
end ; -
Need help with disappearing header row in tables
Hey guys.
I'm working on a large document with tables (annual report). I have set up table styles with header and body cell styles. When I apply the table style to a table, then convert the first row to header row, the entire header row disappears...!
If I leave the row as body row and just apply the header cell style to it, it won't disappear. The row will only disappear if I convert it to header row in Indesign.
I checked the Word doc I imported the text from, the first row of the tables is just normal body row.
I dunno where to look so I have no idea how to fix this problem. It happens to all the tables. I was supplied this file. I don't particularly want to recreate the file. The original file was created in Creative Clouds and exported to idml for me as I have CS6.
Has anyone experienced the same problem or know what's the solution? I really need help.
Thanks in advance.It may be on the Table Options dailog box on the section of Headers and Footers> Header: Repeat Header the Skip First is check on.
-
I am trying to import data characters from a tab delimited file into a table in labview. After I import the strings, I want to be able to select individual strings from the table and put into another table. I want the item that I am selecting to appear in a text box labeled 'selected step'. After I put all of the selected data in the new table, I want to be able to save that table in another tab delimited file (spreadsheet). This is what I have so far. Any help given will be GREATLY appreciated.
Attachments:
Selector.zip 30 KBHi,
Here are modifications to your vi to do what you are describing. It helps, when trying to work through issues like these on this forum to not start a new thread with each iteration of your question. Those of us that are trying to help can follow it better if you just "Reply" to your previous thread with the new, related question. If the question is for a totally new issue then a new thread is best, but when you are working through the details of essentially the same problem it really helps us follow it if you stay in one thread, and that usually means faster answers.
We also like it if, when an answer helps, you give us a rating (the more stars the better) as it is about all we get out of it!
P.M.
Putnam
Certified LabVIEW Developer
Senior Test Engineer
Currently using LV 6.1-LabVIEW 2012, RT8.5
LabVIEW Champion
Attachments:
SelectorV2.zip 30 KB
Maybe you are looking for
-
Attachement of word doc in sales order
Hii, I have one query that i want create contract,for the proof of the contract my cleint have word doc., Now they want to add it in my contract so any time it can check that approval word doc. Pls give suggestion on that.
-
Can't switch email back?
I have my phone protected under the Geek Squad replacement warranty. In order to send your phone in, you need to turn off Find My iPhone. Since my screen was broken to the point where it couldn't be used, I had to use iCloud.com. The verification ema
-
Make photo into high resolution
Hey everyone. I'm trying to edit a photo in dimension and quality to make it high resolution. Can this be done on iPhoto?
-
HT5361 Where on my hard drive are my Mac OS 10.9 Mail Client emails stored?
Where on my hard drive are my Mac OS 10.9 Mail Client emails stored?
-
Cancelled my order and trying to replace but credit card gets declined???
Hi, I placed my order for a macbook air on Friday night so there wasn't any progress as it is the weekend now. I decided to opt for another model so cancelled it. I received the cancellation confirmation email. I then placed another order but the cre