Date string issue
HI All,
I have a basic query
SELECT grn_d
FROM GRN WHERE ROWNUM < 2The output of the above query is "5/15/1991 12:00:00 AM"
But when i am running the following block
DECLARE
grn_d_1 DATE;
BEGIN
SELECT grn_d INTO grn_d_1
FROM GRN WHERE ROWNUM < 2;
dbms_output.put_line(grn_d_1);
END;
The output is in 15-MAY-91 this format , how to get the result in the same format i.e. MM/DD/YYYY.
This might help you to understand. Check my comments and run it.
DECLARE
v_d1 DATE;
v_d2 DATE;
v_d3 DATE;
v_cha VARCHAR2(20000);
-- v_vha VARCHAR2(20000); -- commented due to duplicate variable intialisation
str VARCHAR2(20000); -- Added new
BEGIN
v_d1:= to_date('01-JUN-15','DD-MON-YY');
v_d2 :=to_date('15-FEB-14','DD-MON-YY');
v_cha := 'SELECT least(:1, :2) FROM DUAL';
--v_vha := ''''||v_d1||''','''||v_d2||'''';
--EXECUTE IMMEDIATE v_cha INTO v_d3 USING v_vha; -- cant declare like this after USING clause a comma separated string variable
EXECUTE IMMEDIATE v_cha INTO v_d3 USING v_d1,v_d2;
dbms_output.PUT_LINE('v_d3 - 1 '||to_char(v_d3, 'dd-MON-yyyy'));
dbms_output.PUT_LINE('v_d3 - 2 '||to_char(v_d3,'MM/DD/YYYY'));
dbms_output.PUT_LINE('v_d3 - 3 '||v_d3);
dbms_output.PUT_LINE('--------------------------------');
dbms_output.PUT_LINE('-- If you not sure about no of bind variables then dont use USING clause, make it a one string to be executed dynamically --');
str := 'SELECT least(to_date('''||v_d1||'''),to_date('''||v_d2||''')) FROM DUAL'; -- Due to implicit conversion, here you have use to_date while preparing a stmt
EXECUTE IMMEDIATE str INTO v_d3; -- while executing dynamically it'll consider date as date not string due to to_date function
dbms_output.PUT_LINE('v_d3 - 1 '||to_char(v_d3, 'dd-MON-yyyy'));
dbms_output.PUT_LINE('v_d3 - 2 '||to_char(v_d3,'MM/DD/YYYY'));
dbms_output.PUT_LINE('v_d3 - 3 '||v_d3);
END;
OP :-
v_d3 - 1 15-FEB-2014
v_d3 - 2 02/15/2014
v_d3 - 3 15-FEB-14
-- If you are not sure about no of bind variables then dont use USING clause, make
it a one string to be executed dynamically --
v_d3 - 1 15-FEB-2014
v_d3 - 2 02/15/2014
v_d3 - 3 15-FEB-14
PL/SQL procedure successfully completed.Thanks!
Similar Messages
-
Reading a flattened LabVIEW data string from a CSV file in C#?
We're recording a large amount of data into a CSV file to make it easily accessible from the C# end. I've a header with all the variable names then I write all the data (doubles) as flattened LabVIEW binary strings using flatten to string (little endian) to keep the size down. We are having issues converting these strings back to doubles on the C# end.
At the C# end we can read the LabVIEW repesentation of the DBL but have tried the BitConverter.ToDouble library function to convert it without luck. We use this method to convert the same flattened data coming over a TCP connection without any problems. I'm not writing the C# part of the program and have little experience with it, but if anyone could shed some light, it would be greatly appreciated.
Regards,
AndrewIt is all written as single values. It looks like we have found a method if we remove the header which contains the variable name as a string so the data is in a csv containing just the binary data strings. It looks like we'll go with this as the data will always be written in the same order so can be indexed by the C# program without the need for headers.
Thanks. -
How to convert server specific date string into client specific date object
Hi developers,
I have a very complex issue to convert the server date string format "EEE MMM dd HH:mm:ss z yyyy" into java.util.Date object and find the difference of the client machine date to represent the elapsed time
The problem is the server time zone and client time zone are not unique and when I try to covert the server date which is in string format to date format using SimpleDateFormat class , I got the server time as 3:30 hours appended to it. The server time zone is in IST and Client time zone format is GMT+5:30 , the appended time of 3:30 hours created the confusion in calculating the elapsed time between the server started time and client requested time
I went through all the sites but none of them were useful
If any help to solve the above issue is appriciated
please send the response with the same subject line
Advance ThanksWhy don't you just subtract from the server time the 3:30 hours (consult api of java.util.date) before comparing with the client date? Hard to see where's the problem...
-
Hi all,
Has anyone seen the following error please or has a troubleshooting hint: -
"[NT AUTHORITY\SYSTEM (15/10/2012 18:35:12) - Service request cancelled due to an error.
Error Code: 10000
Error Description: Failed to create lease requisition.
Fault code: soap:Server
Fault string: Service Form Field: 'WarningDate2' has Date format issue.
Fault details: REQ_0024Service Form Field: 'WarningDate2' has Date format issue.
CIAC = 3.01
Date and Time format on the CCP, CPO, vmware and SQL servers all Italian (dd/mm/yy)
This only happens when we add a Lease Time on the request.
Do they all have to be set to the US format for this to work?
If this is a regional setting thing, do I have to change the format on all of the servers (CIAC components)?
Cheers
mdThis test program might help...
import java.util.*;
import java.text.*;
public class ExpandYear
public static void main(String[] args) throws ParseException
SimpleDateFormat sdf_2dyear = new SimpleDateFormat("MM/dd/yy");
SimpleDateFormat sdf_4dyear = new SimpleDateFormat("MM/dd/yyyy");
String test1 = "3/21/00";
System.out.println("test1: " + test1 + " to : " +
sdf_4dyear.format(sdf_2dyear.parse(test1)));
String test2 = "4/9/99";
System.out.println("test2: " + test2 + " to : " +
sdf_4dyear.format(sdf_2dyear.parse(test2))); -
Windows 8.1 Data reordering issue with Intel Adaptors
According to Intel, there is a data reordering issue with their adaptors and probably this dumb WIDI software. This is from Intel site. they say some are fixed, "A future Windows 8 fix will address this issue for other Intel wireless adapters." I
have one Nope, still broke. I get drops all the time. Brand new Toshiba laptop I7 16 gigs of ram and a SSD and a 2 gig Vid card. Would be nice to be able to play games but I get dropped all the time. Now would Microsoft quit hiding
about this, and fix the darn thing. Also i'm a system admin for 13 years. I have build over 1000 PCs and servers. I know bad software. Please fix this. PLEASE. Its not going to just go away and its not just Toshiba, I have seen other companies with the
same problem. If there is a Fix PLEASE POST IT. Or even a workaround I have tried everything.
http://www.intel.com/support/wireless/wlan/sb/CS-034535.htm
Hi,
Have your first tried the software fix under this link for your network adapter?
http://www.intel.com/support/wireless/wtech/proset-ws/sb/CS-034041.htm
Please Note: The third-party product discussed here is manufactured by a company that is independent of Microsoft. We make no warranty, implied or otherwise, regarding this product's performance or reliability.
Also, you can try to check if there is any driver update under Device manager from manufacture's website.
Kate Li
TechNet Community Support
Yep didn't work. Still get drops all the time, had to run a Cat 5E cable to my laptop from my modem, because I have Atheros Gigabyte Lan adaptor. Works Great. The Wireless still drops all the time. Has Microsoft let out the patch to fix this or is it coming in
April in the 8.1 patch that's coming. Funny thing is all for Widi, I don't even use widi, I got the software to do that from Samsung works better on my TV. Intel and Microsoft need to get this fixed. because their driving off gamers and that's the
people that make sure they buy Microsoft so they can play games. With the wireless link dead and a great laptop worthless what's the point. Ive been in IT for 13 years building PCs and Servers how I knew how to run a 60 FT Cat 5e line thru
a 2 story house and terminate it. Most people don't. Fix the problem. -
Data Load Issue "Request is in obsolete version of DataSource"
Hello,
I am getting a very strange data load issue in production, I am able to load the data upto PSA, but when I am running the DTP to load the data into 0EMPLOYEE ( Master data Object) getting bellow msg
Request REQU_1IGEUD6M8EZH8V65JTENZGQHD not extracted; request is in obsolete version of DataSource
The request REQU_1IGEUD6M8EZH8V65JTENZGQHD was loaded into the PSA table when the DataSource had a different structure to the current one. Incompatible changes have been made to the DataSource since then and the request cannot be extracted with the DTP anymore.
I have taken the follwoing action
1. Replicated the data source
2. Deleted all request from PSA
2. Activated the data source using (RSDS_DATASOURCE_ACTIVATE_ALL)
3. Re transported the datasource , transformation, DTP
Still getting the same issue
If you have any idea please reply asap.
SamitHi
Generate your datasource in R/3 then replicate and activate the transfer rules.
Regards,
Chandu. -
Hi,
Im very new to streams and having a doubt regarding ORA-01403 issue happening while replication. Need you kind help on this regard. Thanks in advance.
Oracle version : 10.0.3.0
1.Suppose there are 10 LCRs in a Txn and one of the LCR caused ORA-01403 and none of the LCRs get executed.
We can read the data of this LCR and manually update the record in the Destination database.
Eventhough this is done, while re-executing the transaction, im getting the same ORA-01403 on the same LCR.
What could be the possible reason.
Since, this is a large scale system with thousands of transactions, it is not possible to handle the No data found issues occuring in the system.
I have written a PL/SQL block which can generate Update statements with the old data available in LCR, so that i can re-execute the Transaction again.
The PL/SQL block is given below. Could you please check if there are any issues in this while generating the UPDATE statements. Thank you
/* Formatted on 2008/10/23 14:46 (Formatter Plus v4.8.7) */
--Script for generating the Update scripts for the Message which caused the 'NO DATA FOUND' error.
DECLARE
RES NUMBER; --No:of errors to be resolved
RET NUMBER; --A number variable to hold the return value from getObject
I NUMBER; --Index for the loop
J NUMBER; --Index for the loop
K NUMBER; --Index for the loop
PK_COUNT NUMBER; --To Hold the no:of PK columns for a Table
LCR ANYDATA; --To Hold the Logical Change Record
TYP VARCHAR2 (61); --To Hold the Type of a Column
ROWLCR SYS.LCR$_ROW_RECORD; --To Hold the LCR caused the error in a Txn.
OLDLIST SYS.LCR$_ROW_LIST; --To Hold the Old data of the Record which was tried to Update/Delete
NEWLIST SYS.LCR$_ROW_LIST;
UPD_QRY VARCHAR2 (5000);
EQUALS VARCHAR2 (5) := ' = ';
DATA1 VARCHAR2 (2000);
NUM1 NUMBER;
DATE1 TIMESTAMP ( 0 );
TIMESTAMP1 TIMESTAMP ( 3 );
ISCOMMA BOOLEAN;
TYPE TAB_LCR IS TABLE OF ANYDATA
INDEX BY BINARY_INTEGER;
TYPE PK_COLS IS TABLE OF VARCHAR2 (50)
INDEX BY BINARY_INTEGER;
LCR_TABLE TAB_LCR;
PK_TABLE PK_COLS;
BEGIN
I := 1;
SELECT COUNT ( 1)
INTO RES
FROM DBA_APPLY_ERROR;
FOR TXN_ID IN
(SELECT MESSAGE_NUMBER,
LOCAL_TRANSACTION_ID
FROM DBA_APPLY_ERROR
WHERE LOCAL_TRANSACTION_ID =
'2.85.42516'
ORDER BY ERROR_CREATION_TIME)
LOOP
SELECT DBMS_APPLY_ADM.GET_ERROR_MESSAGE
(TXN_ID.MESSAGE_NUMBER,
TXN_ID.LOCAL_TRANSACTION_ID
INTO LCR
FROM DUAL;
LCR_TABLE (I) := LCR;
I := I + 1;
END LOOP;
I := 0;
K := 0;
dbms_output.put_line('size >'||lcr_table.count);
FOR K IN 1 .. RES
LOOP
ROWLCR := NULL;
RET :=
LCR_TABLE (K).GETOBJECT
(ROWLCR);
--dbms_output.put_line(rowlcr.GET_OBJECT_NAME);
PK_COUNT := 0;
--Finding the PK columns of the Table
SELECT COUNT ( 1)
INTO PK_COUNT
FROM ALL_CONS_COLUMNS COL,
ALL_CONSTRAINTS CON
WHERE COL.TABLE_NAME =
CON.TABLE_NAME
AND COL.CONSTRAINT_NAME =
CON.CONSTRAINT_NAME
AND CON.CONSTRAINT_TYPE = 'P'
AND CON.TABLE_NAME =
ROWLCR.GET_OBJECT_NAME;
dbms_output.put_line('Count of PK Columns >'||pk_count);
DEL_QRY := NULL;
DEL_QRY :=
'DELETE FROM '
|| ROWLCR.GET_OBJECT_NAME
|| ' WHERE ';
INS_QRY := NULL;
INS_QRY :=
'INSERT INTO '
|| ROWLCR.GET_OBJECT_NAME
|| ' ( ';
UPD_QRY := NULL;
UPD_QRY :=
'UPDATE '
|| ROWLCR.GET_OBJECT_NAME
|| ' SET ';
OLDLIST :=
ROWLCR.GET_VALUES ('old');
-- Generate Update Query
NEWLIST :=
ROWLCR.GET_VALUES ('old');
ISCOMMA := FALSE;
FOR J IN 1 .. NEWLIST.COUNT
LOOP
IF NEWLIST (J) IS NOT NULL
THEN
IF J <
NEWLIST.COUNT
THEN
IF ISCOMMA =
TRUE
THEN
UPD_QRY :=
UPD_QRY
|| ',';
END IF;
END IF;
ISCOMMA := FALSE;
TYP :=
NEWLIST
(J).DATA.GETTYPENAME;
IF (TYP =
'SYS.VARCHAR2'
THEN
RET :=
NEWLIST
(J
).DATA.GETVARCHAR2
(DATA1
IF DATA1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| EQUALS;
UPD_QRY :=
UPD_QRY
|| ' '
|| ''''
|| SUBSTR
(DATA1,
0,
253
|| '''';
ISCOMMA :=
TRUE;
END IF;
ELSIF (TYP =
'SYS.NUMBER'
THEN
RET :=
NEWLIST
(J
).DATA.GETNUMBER
(NUM1
IF NUM1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| EQUALS;
UPD_QRY :=
UPD_QRY
|| ' '
|| NUM1;
ISCOMMA :=
TRUE;
END IF;
ELSIF (TYP =
'SYS.DATE'
THEN
RET :=
NEWLIST
(J
).DATA.GETDATE
(DATE1
IF DATE1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| EQUALS;
UPD_QRY :=
UPD_QRY
|| ' '
|| 'TO_Date( '
|| ''''
|| DATE1
|| ''''
|| ', '''
|| 'DD/MON/YYYY HH:MI:SS AM'')';
ISCOMMA :=
TRUE;
END IF;
ELSIF (TYP =
'SYS.TIMESTAMP'
THEN
RET :=
NEWLIST
(J
).DATA.GETTIMESTAMP
(TIMESTAMP1
IF TIMESTAMP1 IS NOT NULL
THEN
UPD_QRY :=
UPD_QRY
|| ' '
|| ''''
|| TIMESTAMP1
|| '''';
ISCOMMA :=
TRUE;
END IF;
END IF;
END IF;
END LOOP;
--Setting the where Condition
UPD_QRY := UPD_QRY || ' WHERE ';
FOR I IN 1 .. PK_COUNT
LOOP
SELECT COLUMN_NAME
INTO PK_TABLE (I)
FROM ALL_CONS_COLUMNS COL,
ALL_CONSTRAINTS CON
WHERE COL.TABLE_NAME =
CON.TABLE_NAME
AND COL.CONSTRAINT_NAME =
CON.CONSTRAINT_NAME
AND CON.CONSTRAINT_TYPE =
'P'
AND POSITION = I
AND CON.TABLE_NAME =
ROWLCR.GET_OBJECT_NAME;
FOR J IN
1 .. NEWLIST.COUNT
LOOP
IF NEWLIST (J) IS NOT NULL
THEN
IF NEWLIST
(J
).COLUMN_NAME =
PK_TABLE
(I
THEN
UPD_QRY :=
UPD_QRY
|| ' '
|| NEWLIST
(J
).COLUMN_NAME;
UPD_QRY :=
UPD_QRY
|| ' '
|| EQUALS;
TYP :=
NEWLIST
(J
).DATA.GETTYPENAME;
IF (TYP =
'SYS.VARCHAR2'
THEN
RET :=
NEWLIST
(J
).DATA.GETVARCHAR2
(DATA1
UPD_QRY :=
UPD_QRY
|| ' '
|| ''''
|| SUBSTR
(DATA1,
0,
253
|| '''';
ELSIF (TYP =
'SYS.NUMBER'
THEN
RET :=
NEWLIST
(J
).DATA.GETNUMBER
(NUM1
UPD_QRY :=
UPD_QRY
|| ' '
|| NUM1;
END IF;
IF I <
PK_COUNT
THEN
UPD_QRY :=
UPD_QRY
|| ' AND ';
END IF;
END IF;
END IF;
END LOOP;
END LOOP;
UPD_QRY := UPD_QRY || ';';
DBMS_OUTPUT.PUT_LINE (UPD_QRY);
--Generate Update Query - End
END LOOP;
END;Thanks for you replies HTH and Dipali.
I would like to make some points clear from my side based on the issue i have raised.
1.The No Data Found error is happening on a table for which supplemental logging is enabled.
2.As per my understanding, the "Apply" process is comparing the existing data in the destination database with the "Old" data in the LCR.
Once there is a mismatch between these 2, ORA-01403 is thrown. (Please tell me whether my understanding is correct or not)
3.This mismatch can be on date field or even on the timestamp millisecond as well.
Now, the point im really wondering about :
Some how a mismatch got generated in the destination database (Not sure about the reason) and ORA-01403 is thrown.
If we could update the Destination database with the "Old" data from LCR, this mismatch should be resolved isnt it?
Reply to you Dipali :
If nothing is working out, im planning to put a conflict handler for all tables with "OVERWRITE" option. With the following script
--Generate script for applying Conflict Handler for the Tables for which Supplymentary Logging is enabled
declare
count1 number;
query varchar2(500) := null;
begin
for tables in (
select table_name from user_tables where table_name IN ("NAMES OF TABLES FOR WHICH SUPPLEMENTAL LOGGING IS ENABLED")
loop
count1 := 0;
dbms_output.put_line('DECLARE');
dbms_output.put_line('cols DBMS_UTILITY.NAME_ARRAY;');
dbms_output.put_line('BEGIN');
select max(position) into count1
from all_cons_columns col, all_constraints con
where col.table_name = con.table_name
and col.constraint_name = con.constraint_name
and con.constraint_type = 'P'
and con.table_name = tables.table_name;
for i in 1..count1
loop
query := null;
select 'cols(' || position || ')' || ' := ' || '''' || column_name || ''';'
into query
from all_cons_columns col, all_constraints con
where col.table_name = con.table_name
and col.constraint_name = con.constraint_name
and con.constraint_type = 'P'
and con.table_name = tables.table_name
and position = i;
dbms_output.put_line(query);
end loop;
dbms_output.put_line('DBMS_APPLY_ADM.SET_UPDATE_CONFLICT_HANDLER(');
dbms_output.put_line('object_name => ''ICOOWR.' || tables.table_name|| ''',');
dbms_output.put_line('method_name => ''OVERWRITE'',');
dbms_output.put_line('resolution_column => ''COLM_NAME'',');
dbms_output.put_line('column_list => cols);');
dbms_output.put_line('END;');
dbms_output.put_line('/');
dbms_output.put_line('');
end loop;
end;
Reply to u HTH :
Our Destination database is a replica of the source and no triggers are running on any of these tables.
This is not the first time im facing this issue. Earlier, we had to take big outage times and clear the Replica database and apply the dump from the source...
Now i cant think about that situation. -
4G LTE data reception issue in area of work building
Hi, I'm having a data reception issue in a certain area at work. The signal indicator at the upper right of the homescreen shows "4GLTE" but this is clearly inaccurate since I am not able to navigate to websites or send/receive multimedia messages. If I move ~30 feet east in the building, the reception is restored. Two people with iPhone 5 devices have the same issue. However, the Verizon iPhone 5 allows you to turn off LTE. Once this was done and the signal fell back to 3G, reception was restored, albeit with slower speeds, but at least reception wasn't completely blocked. I understand 4G is not available in all areas, but in this case, the phone is not automatically switching to 3G and there is no workaround because there is no option to turn off LTE on the Z10. In the "Settings" -> "Network Connections" -> "Mobile Network" -> "Network Technology" dropdown, the only values are:
UMTS/GSM (when I switch to this, no networks are found)
Global (the current selection)
LTE/CDMA
This is a big problem for me because for 8+ hours in the day I can't receive MMS messages or navigate to websites.Hi, Nate650,
Sorry to hear about your problem with 4G. First, let me ask, have you updated your Z10 to the latest official software version? I had a similar problem with my Z10. After about an hour on the phone with CS, we figured out it was a problem with the tower near me. The problem was fixed by VZW and I have not had connection issues. You are right, though, about the Z10 falling back to 3G. Mine did before the update but not since.
Doc -
Logical Standby Data Consistency issues
Hi all,
We have been running a logical standby instance for about three weeks now. Both our primary and logical are 11g (11.1.0.7) databases running on Sun Solaris.
We have off-loaded our Discoverer reporting to the logical standby.
About three days ago, we started getting the following error message (initially for three tables, but from this morning on a whole lot more)
ORA-26787: The row with key (<coulmn>) = (<value>) does not exist in table <schema>.<table>
This error implies that we have data consistency issues between our primary and logical standby databases, but we find that hard to believe
because the "data guard" status is set to "standby", implying that schemas' being replicated by data guard are not available for user modification.
any assistance in this regard would be greatly appreciated.
thanks
MelIt is a bug : Bug 10302680 . Apply the corresponding Patch 10302680 to your standby db.
-
How to get material's last posting date of issuing to production order?
Hi,
In my scenario, I need to get material's last posting date of issuing to production order (e.g. mov. typ. 261).
I tried to select the material documents whose movement type is 261, and restrict the posting date from month to month each time, until the first material document is selected.
But this method seems quite inefficient.
What kind of algorithm is more effient to do this?
Thanks
WesleyHi,
select max( budat )
from mkpf
into gv_budat
where mblnr in ( select mblnr
from aufm
where aufnr = gv_aufnr "(Prod. Order)
and matnr = gv_matnr "(Issued Material)
and bwart = '261' ).
Edited by: Azeem Ahmed Matte on Mar 12, 2010 12:33 PM -
How to get the previous state of my data after issuing coomit method
How to get the previous state of some date after issuing commit method in entity bean (It should not use any offline storage )
>
Is there any way to get the state apart from using
offline storage ?As I said the caller keeps a copy in memory.
Naturally if it is no longer in memory then that is a problem.
>
and also what do you mean by auditlog?
You keep track of every change to the database by keeping the old data. There are three ways:
1. Each table has a version number/delete flag for each record. A record is never updated nor deleted. Instead a new record is created with a new version number and with the new data.
2. Each table has a duplicate table which has all of the same columns. When the first table is modified the old data is moved to the duplicate table.
3. A single table is used which has columns for 'table', 'field', 'data' and 'activity' (update, delete). When a change is made in any table then this table is updated. This is generally of limited useability due to the difficulty in recovering the data.
All of the above can have a user id, timestamp, and/or additional information which is relevant to the data being changed.
Note that ALL of this is persisted storage.
I am not sure what this really has to do with "offline storage" unless you are using that term to refer to backed up data which is not readily available. -
I am selecting data from a Progress database using the Data Direct Open Edge 10.1.B driver. The target table stores the date values as varchar in this format "22-OCT-14" In the select statement I can use Progress statements or T-SQL to transform
the varchar to a date - but cannot do the same in the WHERE clause
Select po_number, cast(po_date as date) as [po_date] from [po_table]
(no problem - the [po_date] field stored as "22-OCT-14" is returned as "2014-10-22 00:00:00"
but when I include the cast in the where clause I get the error described in the title
Select [po_number], [po_date] from [po_table WHERE cast([po_date] as date)<= '10/22/2014' - NO GOOD
I have tried very many combinations of the date string format , different functions and sub-queries but cannot find an answerThe sql strings I posted are working examples - I've tried the ISO format you included - any number of date formats will work when the target field is a "Date" field - but trying any kind of transform statment to processa date stored
as a varchar in the WHERE CLAUSE throws the erro
Storing dates in a varchar column is a bad idea on any platform. Apparently there are strings in that column which cannot be converted to dates.
On SQL Server you could have found this with
SELECT po_date FROM po_table WHERE isdate(po_date) = 1
What you should use on Progress, I have no idea.
Erland Sommarskog, SQL Server MVP, [email protected] -
I am running the following select statement into Oracle SQL Developer.
Select I_NOTE_DESIGS.END_DATE AS ENDDATE
However in my results the date hows as 01-APR-29.
I was wondering if there is a way to convert this over to another date string ie: I would like the date in this column to show 2029-04-01. I am not bothered if the time comes out at the end, as I have a program which can delete that.
Regards,
Jon Ditchfield>
Hi Jon, and welcome to the forums.
I was wondering if there is a way to convert this over to another date
string ie: I would like the date in this column to show 2029-04-01.
I am not bothered if the time comes out at the end, as I have a program which can delete that.select to_char(to_date('01-APR-29', 'dd-MON-YY'), 'yyyy-mm-dd') from dual;
select to_char(to_date('01-APR-29', 'dd-MON-YY'), 'yyyy-mm-dd hh:mm:ss') from dual;
Please be sure to read the forum FAQ. Also, read the "sticky" thread by BluShadow at the
top of the list of posts on the forum home page.
Always give your version of Oracle - the answer can vary greatly with version - although
not in this case.
These forums are a great resource - you will get the maximum benefit from them
if you follow the guidelines.
HTH,
Paul...
Jon Ditchfield -
How do I find the frequency of numbers in a group of data strings?
I have a set of data strings and I want to find the frequency of each number occuring in a data string. How do I do this?
Here are the strings.
28-29-43-51-53 7
02-08-30-36-48 31
09-10-27-36-42 11
20-24-31-33-36 44
16-29-48-52-54 5
06-15-29-39-51 36
01-16-18-25-27 3
09-30-39-42-47 37The first part is to "break out" the values from your strings. Columns B thru G take care of this:
I assumed allvalues as 2 digits...
B2=VALUE(MID($A2, 3*(COLUMN()-2)+1, 2))
select B2 and fill to the right until column G
then select B2 thru G2 and fill down as needed.
For compactness of THIS presentation I added two additional columns for getting the Frequency... columns I and J.
Column I contains an counting value and J contains the frquency of the corresponding value in I (of the same row).
put a "1" in I2, a "2" in I3, then select both I1and I2, then grab (click and hold the little circle at the bottom right of the selection), and drag down until the value is the max number you expect (I assumed it was 99).
J2=COUNTIF(B:G, "="&I2)
select J2 and fill down -
Has anyone found a solution for iPhone 5 data leak issues?
Up until about a week ago I was using a 3GS and the data leak issues seemed to be fixed with the newest iOS 6 update. However, I recently got an iPhone 5 and I've noticed it uses around 1 MB per hour no matter what I'm actually doing on the phone. I actually went to sleep last night, turning of cellular data AND wifi and it STILL used about 4 MB of data!! What is up with this?? I am a pretty conservative user of data when not on wifi, but I'm only 2 days in to my bill cycle and already on pace to go over my 2 GB limit by the end of the month. Please help! I do not want to switch my plan and play more! I am on AT&T by the way.
Have you tried these basic troubleshooting steps?
Restart / Reset
http://support.apple.com/en-us/HT201559
Restore from backup
Restore as new
http://support.apple.com/en-us/HT201252
If no joy, make an appointment with the Apple genius bar for an evaluation.
Maybe you are looking for
-
Error during Goods Receipt:Check table XMCHB: Entry 'Material no.', 'Plant
Dear All, I am trying to post Goods Receipt for a Stock Transport Order. The error message appears as " Check table XMCHB: entry 'material no.' 'plant', '____' , 'batch no.' does not exist. (message no. M7001) The Supplying plant stock from which Goo
-
How do I find what's included in the $9.00 monthly plan.
I just purchased the $9.00 monthly plan for both features but now I am confused about what is included with my plan. Most likely because there are so many things to try or purchase when I first logged on. Thank you for your help!
-
Can't find my imovie in itunes
I "shared" my imovie to itunes, imovie reports that it was "shared," yet this movie is not in my itunes movie folder. any suggestions?
-
Observable and ActionListener.. help
Is there anyway to pause update method and continue after I click the �Add Student� button? The update method is called automatically when my observable object is changed, so I can�t display previous observable information via the button�s ActionList
-
I have a stuck power button on my iPod touch 4g any ideas how much it would cost for a apple genius to fix it? Thanks!