Combine the two columns?
HI, the problem is this, I have two columns: start_date and end_dateInvite a: start date (for example 08/08/2008)
Invite two: End Date (for ouvertede 30/04/2009)
so these are two different columns, do you know how get all the data between these two dates.
If I use the "between the function" I can't get the dates between the same column,
The start date
The start date
but I need the end date...
I really appriciate to help
Thank you
Hello
Something like:
SELECT *
FROM
WHERE start_date BETWEEN TO_DATE('08/08/2008', 'mm/dd/yyyy') AND TO_DATE('04/30/2009', 'mm/dd/yyyy')
OR end_date BETWEEN TO_DATE('08/08/2008', 'mm/dd/yyyy') AND TO_DATE('04/30/2009', 'mm/dd/yyyy');
Kind regards
Tags: Database
Similar Questions
-
Combine the two columns of text
I have two columns of text (say that name is a column and the name is the other)
I would like to combine the two columns for the text of these two columns are in a column. (First name and last name in the same column)
Is this possible? If so is there a tutorial somewhere?
Hi Danielle,
The & (concatenation operator) is your friend.
Formula in D2 (fill down)
"B2 &" "& C2.
& joins elements into a single string.
"" inserts a space.
Kind regards
Ian.
-
Combine the two columns of the table
SELECT providerid, Sum OF appdev.usercounts
WHERE the counttime BETWEEN SYSDATE - 30/1440 AND SYSDATE-15/1440 GROUP BY ORDER BY providerid providerid
697 W
U 813
T 143
S 2
SELECT providerid, Sum OF appdev.usercounts
WHERE the counttime BETWEEN - 30/1440 AND (SYSDATE-1) - 15/1440 (SYSDATE-1) GROUP BY ORDER BY providerid providerid;
450 W
U 571
T 80
S 2
I want output like
W 697 450
U 813 571
143 80 T
2 2 S
Help, please
Thank you
Praveen'COUNT', which is the actual column name? It could become very confusing.
Not tested for obvious reasons, but it should be close:
SELECT providerid , sum( case when counttime between sysdate - 30/1440 and sysdate - 15/1440 then count end ) as cnt1 , sum( case when counttime between (sysdate-1) - 30/1440 and (sysdate-1) - 15/1440 then count end ) as cnt2 FROM appdev.usercounts WHERE ( counttime between sysdate - 30/1440 and sysdate - 15/1440 ) OR ( counttime between (sysdate-1) - 30/1440 and (sysdate-1) - 15/1440 ) GROUP BY providerid ORDER BY providerid ;
-
Paint or Windows Photo Gallery
I try to combine a picture of my sister with a picture of a poem beside it, how to combine the two into a single photo?
If you have the poem recorded in an image format,
the following freeware can create a side by side
Panorama.(FWIW... it's always a good idea to create a system)
Restore point before installing software or updates)Download IrfanView
http://MajorGeeks.com/IrfanView_d4253.html
(filename: iview433_setup.exe)
(uncheck if you don't want Google Chrome)Download plug-ins too...
IrfanView plugins
http://MajorGeeks.com/IrfanView_PlugIns_d4908.html
(filename: irfanview_plugins_433_setup.exe)When the program is installed... read more...
Open IrfanView and go... Image / create the Image of the Panorama...
(this will open the screen to "Create a panorama image")On the screen to "Create a panorama image"... left click on the add images"" button.
(Displays the 'Open' screen. Now, drill down to the
the folder that contains your saved Photos of veterinarians.Now... click left (highlighted), the two images, you want to join.
(you can select more than one if you hold down your Ctrl key)
The two images highlight... left click on the button 'open '.
(Or... you can add the images one at a time... which is always easier)Now, go back to the screen "Create the panorama image.
and the file names of the selected pictures need to be in the
Field "Input Images.Now with the names of two files in 'Images of entry' field...
You can left click on the button 'create Image '.(the positions left and right of these images can be swapped in)
selection of a file name and using the "mount image" / "Move."
Images down"buttons...)Now you should see a display of the combined image.
Reach... File / save as...Choose a backup location / enter a file name / choose a format...
On the left, click on the button "Save..." -
Hi, thanks for the review, any help is appreciated.
The problem.
I am creating a spreadsheet to download information to a database.
The database is very picky and all the blank cells cannot contain a zero but should be empty because some cells contain the URL of the image.
A '0' instead of a string with a .jpg extension will throw an error.
In general, I use an 'IF' statement to achieve this:
= IF (A1 = "", "", A1)
It works like a charm. However, I changed the map and now the cells have a 'VLOOPUP' function to draw the other worksheet data.
If the target cell has no data the host cell will express a '0 '. This will raise errors on the upload.
I tried to embed the two formulas without success. Is it possible to combine the two forms, or is there another solution to draw the other worksheet data and if the receiving cell has no data to express an empty cell / VIRGIN instead of a '0 '.
If you need an example let me know.
I hope it's clear.
I suspect this is related to MS Office Excel. If I'm not mistaken, please repost this in the MS Office category for the version that you are using the category at the top of the page tab -
using outer joins if the two column is null? Use only (+)
Hi all
create the table xxc_tr_num (tl_number number, tr_no number tl_no_id);
insert into xxc_tr_num values (123,100,222);
insert into xxc_tr_num values (124,100,333);
create the table xxc_od_tab (tl_number number, tl_id number);
insert into xxc_od_tab values (123,001);
insert into xxc_od_tab values (null, null);
create table xxc_oth_tab (name varchar2 (10), number of tl_id);
insert into xxc_oth_tab values('abc',,001);
insert into xxc_oth_tab values (null, null);
Wait it out put
tr_no tl_no_id name
100 222 abc
100 333
using outer joins if the two column is null? use only please of outer joins
And I tried to use outer joins on both tl_id column but not get values and I use have County (tr_no ) > 1
Rajesh123 wrote:
Thank you Kiss it is not possible to use having clause?
You need to understand the functioning of the group. If you will not be asked this question.
Check this box
SQL> select tr_no, 2 tl_no_id, 3 count(*) 4 from xxc_tr_num a, 5 xxc_od_tab b, 6 xxc_oth_tab c 7 where a.tl_number = b.tl_number(+) 8 and b.tl_id = c.tl_id(+) 9 group 10 by tr_no 11 , tl_no_id; TR_NO TL_NO_ID COUNT(*) ---------- ---------- ---------- 100 333 1 100 222 1
See what returns the count? You have grouped according to TR_NO and TL_NO_ID. You must take into consideration the TL_NO_ID just put COUNT (TR_NO) does not increase the NUMBER of the whole group. To get the NUMBER on the whole group, I used the analytical function and did. Like this, see the number of the analytical function here
SQL> select tr_no, 2 tl_no_id, 3 count(*), 4 count(*) over(partition by tr_no) 5 from xxc_tr_num a, 6 xxc_od_tab b, 7 xxc_oth_tab c 8 where a.tl_number = b.tl_number(+) 9 and b.tl_id = c.tl_id(+) 10 group 11 by tr_no 12 , tl_no_id; TR_NO TL_NO_ID COUNT(*) COUNT(*)OVER(PARTITIONBYTR_NO) ---------- ---------- ---------- ------------------------------ 100 222 1 2 100 333 1 2
So to answer your question, yes you can't do in the HAVING clause...
-
Hello, I've created a form with Adobe pro XI. I want to create a text field that combines the two fields (Field1 and Field2) text. How can I do?
If the third field does not need to be editable, you can use a calculation script customized to what is something like the following:
Custom calculation script
(function () {}
Get the field values as strings
var s1 = getField("Text1").valueAsString;
var S2 = getField("Text2").valueAsString;
Set the value of this field to the concatenation of two strings
Event.Value = s1 + s2;
})();
-
Hi allI have a script for indd that convert a table selected user in JPG format (1276 px width, height varies). Second script photoshop asking to select jpg file and then check if the height in pixels is less than 1018 pixel, can he expand canvas size (height) to 1018 px.
How can I combine the two script, tip, or how to start would be useful? The workflow must be:
- the user select table in the indd document
- export table in jpg format
- script you will be asked to select the file table jpg or if it is possible to automate this would be awesome.
- enlarge the height of the canvas to 1018 px
Thank you
Marie rosine
PS: I have already read the Java script tool guide pdf but unable to understand
Yes and the documentation is pretty self-explanatory.
However, here is an excerpt:
function callPhotoshop(file) { var bt = new BridgeTalk; bt.target = "photoshop"; bt.body = "function main (){ return confirm('Am I in Photoshop?'); }; main();"; bt.onResult = function(resObj) { var myResult = resObj.body; alert( myResult? "PS code was correctly executed" : "Something wrong happened" ); } bt.send(); } callPhotoshop();
HTH,
Loïc
-
Hello.
I use jdev 11.1.5
= > I had created a Vo in the adf with the table named GrlJrl
I need the sum of the two columns
My scenario
Da Ca
500 100
600 100
100 200
S 400 1200 (adding two field must be displayed in the user interface).
someone help me reach this goalchk this
Calculate the sum involved new VO -
How to combine the two fonts in a logo type?
I've created a customer logo ID, consisting of two fonts. The name of the customer is Trajan Pro. The logo must also include a "Registered" symbol (the circled R) after the name. Unfortunately, using Trajan Pro mode Exhibitor does not look good, especially scaling down and with a circle around the R. To work around this problem, I used the Arial font to create the® in a supplemental box, be able to fine tune its size and position. It's great for once, but I would like to be able to combine the two so that the name of the customer in Trajan Pro and the symbol "Recorded" in Arial can be re-scaling or repositionnes in unison and saved for future use. What is the best way to do it? Here is an article of the logo to demonstrate what I have:
Select the two text blocks and go to Type > vectorize. Group them. Now that you have drawn, no text. It is usually a good idea to save a logo in a separate file, which can be placed. Put the logo in its own file on one page of appropriate size. Save the file and export a PDF of print quality. Link to the PDF file when using the logo in other files.
-
calculate the sum of the two columns - display the result in the third column
Hello
I have a report and I want to calculate the sum of the two columns of the report and display the total in the third column.
For example: Sample_My_Report
Col1 Col2 (Col1 and Col2) Total
3-7-10
can someone help me with this question.
Thank you.Hello:
If your report is an IR you can use the menu "Tool" to add columns calculated at the State
CITY
-
The combination of two columns in a single
Hi guys,.
Is it possible for a query to combine two columns into one? For example, lets say I have the following query:
SELECT ID, FIRST_NAME, LAST_NAME
EMPLOYEES
I want the output to have two columns: one that contains the ID and the other containing name followed by a space followed by LAST_NAME. I know how to do this outside the query using coldfusion, but it save me a lot of work if there is some way that the query could do for me.Yes but the operand of concatenation varies somewhat from a database
management system to the other.In Oracle, it would look this IIRC.
SELECT ID, FIRST_NAME. ' ' || LAST_NAME AS FULL_NAME
EMPLOYEES -
combine the two queries analysis
Hi friends,
could you please help me to combine these two queries. The bottom one looks like, take too many resources.
FUNCTION XML_error_log ()P_i_xml IN XMLTYPE, p_i_event_key IN VARCHAR2,( )
RETURN VARCHAR2
IS
l_covered_product_header_id NUMBER ;
l_item_path VARCHAR2 (500);
xml_table XMLTYPE;
p_ret_code_o VARCHAR2 (5);
p_error_buff_o VARCHAR2 (2000);
l_user_id NUMBER (15) := fnd_global . user_id ;
l_implicit_product_name VARCHAR2 (40);
l_top_model_line_id oe_order_lines_all . top_model_line_id % TYPE;
main_error_check VARCHAR2 (100) := NULL;
main_error_check1 VARCHAR2 (100) := NULL;
l_status_log_status VARCHAR2 (1);
l_err_msg_log_status VARCHAR2 (4000);
p_o_status VARCHAR2 (100);
p_o_err_msg VARCHAR2 (100);
P_i_input_res_xml XMLTYPE;
BEGIN
p_o_status := 'S' ;
p_o_err_msg := NULL;
Dbms_output.put_line ()' Start... process_response_xml ');
FOR i
IN (SELECT x. code , x . gravity , x . Description
DE XMLTABLE ( )
xmlnamespaces (DEFAULT ' urn: xyz:ccw:config:common: data'()
, ' for $i in //error
Returns the element r {}
$i / code,.
$i / description.
$i / gravity
}'
By the WAY P_i_input_res_xml
COLUMNS
code VARCHAR2 (13) Path 'code'
, gravity VARCHAR2 (30) Path "gravity"
, Description VARCHAR2 (30) Path 'description'
) x )
LOOP
DBMS_OUTPUT.put_line ) ( )
' code : ' || i . code );
DBMS_OUTPUT.put_line ) ( )
' severity: ' || i . gravity );
DBMS_OUTPUT.put_line ) ( )
' description: ' || i . Description );
main_error_check := i . code of : main_error_check;
INSERT IN xxgco_config_validate ()event_status ERROR_CODE error_description ,error_severity creation_date event_key last_update_date( )
VALUES('E',i. code , i . Description , i . gravity SYSDATE, p_i_event_key , SYSDATE);
RETURN 'E' ;
END LOOP;
DBMS_OUTPUT.put_line ()' main_error_check:' : main_error_check);
DBMS_OUTPUT.put_line ()' COMPLETED:');
IF main_error_check IS NULL
THEN
FOR i
IN (SELECT x. code , x . gravity , x . Description , x . subcause
DE XMLTABLE ( )
xmlnamespaces (DEFAULT ' urn: xyz:ccw:config:common: data'()
, ' for $i in //message
Returns the element r {}
$i / code,.
$i / description.
$i / gravity,.
$i / subCause
}'
By the WAY P_i_input_res_xml
COLUMNS
code VARCHAR2 (13) Path 'code'
, gravity VARCHAR2 (30) Path "gravity"
, Description VARCHAR2 (30) Path 'description'
, subCause VARCHAR2 (50) Path "subCause"
) x )
LOOP
DBMS_OUTPUT.put_line ) ( )
"code:" || i . code );
DBMS_OUTPUT.put_line ) ( )
' severity: ' || i . gravity );
DBMS_OUTPUT.put_line ) ( )
' description: ' || i . Description );
DBMS_OUTPUT.put_line()' subCause:': i. subCause );
INSERT IN xxgco_config_validate ()event_status ERROR_CODE error_description ,error_severity error_cause creation_date event_key last_update_date( )
VALUES('E',i. code , i . Description , i . gravity , i . subcause SYSDATE, p_i_event_key , SYSDATE);
main_error_check1 := i . code of : main_error_check1;
END LOOP;
IF main_error_check1 IS NOT NULL
THEN
RETURN ('E');
ON THE OTHER
RETURN ('S');
END IF;
ON THE OTHER
-TODO Log main error Log
RETURN ('E');
END IF;
EXCEPTION
WHEN Others
THEN
p_o_err_msg :=
SUBSTR (
' Error in the response_XML_error_log FUNCTION:'
|| SUBSTR (SQLERRM, 1, 250)
|| ':'
|| DBMS_UTILITY.format_error_backtrace ,
1 ,
4000 );
RETURN 'E' ;
END XML_error_log ;
Thanks in advance
Ok.. This isn't a constructive debate...
-
question about how to combine the two scripts.
HelloI have a sql script that can display a table (or view) all the information, it works fine. I call it validate_table.sql, as below:
command prompt
accept invites owner "Enter table owner:
accept invites from TABLE_NAME "Enter object (table/View...) "name:"
column owner format a10 column 'owner '.
column format a30 topic 'Object name' object_name
column object_type format a15 direction "Type of object".
Status format a10 column titled "Status".
in the heading of column created format a20 "created."
the LAST_DDL_TIME format a20, heading 'LAST_DDL_TIME.
Select
owner
object_name
object_type
status
, to_char (created, "DD_MON_YY hh24:mi:ss") created
LAST_DDL_TIME,
Of
DBA_OBJECTS
where
object_name = upper ('& table_name') and owner = upper ('& owner');
command promptprompt -- ----------------------------------------------------------------------- ---
Guest - table/view structure-
prompt -- ----------------------------------------------------------------------- ---
command prompt
describe and owner... & table table_namecommand prompt
prompt -- ----------------------------------------------------------------------- ---
guest - list assigned user/subsidies-
prompt -- ----------------------------------------------------------------------- ---
command prompt
set pagesize 50000
set linesize 10000
set verify off
Set feedback off
column lvl format A4 direction "Lvl".
proprietary format of columns A14
format column in table_name A29
A38 dealer column format
column privilege A10 format
SELECT 'Role' lvl, t.table_name, t.grantee, t.owner, t.privilege
OF dba_tab_privs t
WHERE t.grantee IN (SELECT FROM dba_roles role WHERE = role t.grantee) and t.table_name = upper ('& table_name') and t.owner = upper ('& owner')
UNION
SELECT 'User' lvl t.table_name, t.grantee, t.owner, t.privilege
OF dba_tab_privs t
WHERE t.grantee IN (SELECT username FROM dba_users WHERE username = t.grantee) and t.table_name = upper ('& table_name') and t.owner = upper ('& owner')
UNION
SELECT 'Pub' lvl, t.table_name, t.grantee, t.owner, t.privilege
OF dba_tab_privs t
WHERE t.grantee = 'PUBLIC' and t.table_name = upper ('& table_name') and t.owner = upper ('& owner')
ORDER BY 1, 2, 3;command prompt
prompt -- ----------------------------------------------------------------------- ---
guest - list of synonyms created.
prompt -- ----------------------------------------------------------------------- ---
command prompt
proprietary format of columns A15
synonym_name A20 column format
A15 table_owner column format
format column in table_name A40
DB_link A40 column formatSelect the owner, synonym_name, table_owner, table_name, DB_link from DBA_synonyms where Table_name = upper ('& table_name') stopped by the owner;
command promptprompt -- ----------------------------------------------------------------------- ---
guest - list index created-
prompt -- ----------------------------------------------------------------------- ---
command prompt
Select
table-name
index_name
index_type
nom_tablespace
status
of DBA_indexes
WHERE table_name = upper ('& table_name') and owner = upper ('& owner')
order of table_name, index_name;
command promptprompt -- ----------------------------------------------------------------------- ---
guest - list of constraints-
prompt -- ----------------------------------------------------------------------- ---
command prompt
format column in table_name A15
format of column cons_type A15
cons_name A20 column format
check_cons A25 column format
VALIDATED A20 column format
column status A10 format
last_change A20 column formatSelect
table-name
(case constraint_type
When 'P', then 'Primary Key '.
When 'R' then 'Foreign Key'
When 'C' then 'check '.
When 'U' then 'single '.
When 'o' then 'read only display '.
When 'V' then 'check the view. "
When 'H' then 'Hash expression. "
When 'F' then 'REF column.
When the of ' then 'additional logging.
cons_type end)
constraint_name cons_name
condition_de_recherche check_cons
status
VALID
last_change
of dba_constraints
where owner = upper ('& owner')
and table_name = upper ('& table_name')
order of cons_type;I have another script that allows to display the newly created tables (table, table names) in the last 24 hours.
SET SERVEROUTPUT ON;
DECLARE
CURSOR tmp_cur IS
SELECT master, object_name
FROM dba_objects
WHERE object_type in ('TABLE', 'SEE') and the owner not in ('SYS', 'SYSTEM', 'GENERAL', "XDB", "OUTLN", "SYSMAN") and last_ddl_time > sysdate - 1;
tmp_rec tmp_cur % ROWTYPE;
BEGIN
FOR tmp_rec IN tmp_cur LOOP
DBMS_OUTPUT. PUT_LINE)
tmp_rec. Owner | ' ' || tmp_rec.object_name);
END LOOP;
END;
/
The gap of the first script (validate_table.sql) is that it can only check table one by one by manual entry, then how can I combine these two scripts, to make a scipt that can check all newly created tables (not a table) in the last 24 hours?
I thank very you much in advance!
Hello
If you already know how to find the owner and all the tables created table_name recently. One thing you can do is to change all the WHERE clauses in validate_table.sql, so instead of things like
where object_name = upper ('& table_name') and owner = upper('&owner');
you say
WHERE (owner, object_name) IN
(
SELECT master, object_name
FROM dba_objects
WHERE object_type in ('TABLE', 'SEE')
AND owner NOT IN ('SYS', 'SYSTEM', 'GENERAL', "XDB", "OUTLN", "SYSMAN")
AND last_ddl_time > SYSDATE - 1
)
;
Here is another approach:
Validate_table. SQL is quite handy as it is. You may want to run this script for tables, even when you know that they are not new. Divide into 2 scripts: one called ask_and_describe_table.sql, which looks like this:
-Ask_and_Describe_Table.sql
accept invites owner "Enter table owner:
accept invites from TABLE_NAME "Enter object (table/View...) "name:"
-You can use any name path instead of d:\some_dir below:
@d:\some_dir\describe_table & owner, table_name
and the other one called Describe_Table.sql, which starts like this:
-Describe_Table.sql
DEFINE owner = & 1
DEFINE table_name = & 2
column owner format a10 column 'owner '.
...
and continues with the same exact content as validate_table.sql.
Now, to write another script (I'll call it Describe_Recent_Tables.sql):
-Describe_Recent_Tables.sql - create and run Describe_Many_Tables.sql
-Turn OFF the devices designed to help people to read the output:
SET ECHO OFF
SET FEEDBACK OFF
SET PAGESIZE 0
VERRIFY OFF SET
-Create a Describe_Many_Tables.sql:
COIL d:\some_dir\describe_many_tables.sql
SELECT ' @d:\some_dir\describe_table '
|| owner
|| ' '
|| object_name
FROM dba_objects
WHERE object_type in ('TABLE', 'SEE')
AND owner NOT IN ('SYS', 'SYSTEM', 'GENERAL', "XDB", "OUTLN", "SYSMAN")
AND last_ddl_time > SYSDATE - 1;
SPOOL OFF
-Features lighting designed to help people to read the output:
SET ECHO ON
SET FEEDBACK ON
SET PAGESIZE 50
SET VERRIFY ON
-Describe_Many_Tables.sql performance
@d:\some_dir\describe_many_tables
I guess that all of your tables have standard names (for example, start with a letter, no spaces in the name,...), which don't require quotation marks. If they could, then the same basic approach will work, but the details are a little messier.
When you want to see the information on a single table or view, no matter how old it is, driven
Ask_and_Describe_Table
or, if you do not need to question the owner of the table and the name, something like
Describe_Table SCOTT EMP
(You can find that you really need not Ask_and_Describe_Table.sql).
When you want to do this for all the tables created in the last 24 hours:
Describe_Recent_Tables
-
Combine the two projects into one
I know it is a very popular question and I read many answers excellent previous answers. The two most popular procedures seem to be simple copy - paste and use clips of compounds with copy / paste. CPF has improved this process over the years and I ask the question again to get the benefit of current thinking. I have an iMac (mid-2011) OS X 10.11.4 and FCP worm 10.2.2. I have two separate events within the same library. There is a completed project, with all the transitions, effects and music, located within each discipline. Current ideas on how to combine these two projects into one would be greatly appreciated.
Thank you.
Copy and paste is the only method I know.
Open the project in the timeline first.
Open the second project in the timeline panel. Only one project appears at the same time.
Select an item in the timeline and press command + A to select all, then control + C to copy.
Use the project navigation arrows to return the first project:
Move the playhead to where copied clips must be glued and press command + V.
Al
Maybe you are looking for
-
I'm sure this question somewhere, but I was unable to quickly find an answer... anyone have this problem which is solved?
-
Add user Lib to palette - black mark
Hi all Tried to add this interesting series of VI to the palette of the user: https://decibel.ni.com/content/docs/DOC-10952 I find myself with a set of Black question marks: With the help of LV 2010 f2. How to fix? Thank you Battler.
-
Win Mail doesn't have a loop of recovery
Vista - updated w/Win Mail 6.0.6001.180000.Somehow my email DB has been updated with evil. Win Mail attempted to recover - not successful.Each launch Win mail is also launching a salvage attempt.Several folders are displayed - all empty and the first
-
Help Setup WPA2-Enterprise on WRT-160Nv2
I am trying to configure an Access Point configuration simple (without function of linksys router), but need WPA2-Enterprise. I connected a single ethernet cable to a LAN port and configured RIP, DHCP and WI - FI. Everything works perfectly if I use
-
Java Script of Smartphones blackBerry Please Help error!
I have a & AT T 8110 Pearl, here's what happened, I opened my browser to go to capitalone.com, I wanted to verify my account. I got on the site, clicked on Direct Banking and connection, this is when I received a notification, JavaScript : year Erro