Convert a CSV column value before loading
Hello
I have a timestamp value in the CSV file as 23/10/2013-02:26
I load the CSV into a table with the column DATE data type.
I'm new to APEX and am not sure how to set up the Transformation rules.
Can anyone help?
Thank you.
You're silently casting a string to a number (and not a date).
Try this:
declare l_input_from_csv varchar2(20) := '9/4/2013 1:54:23 AM'; l_date date; begin l_date := to_date( l_input_from_csv, 'MM/DD/YYYY HH12:MI:SS AM'); return l_date; end;
HOWEVER - I think that APEX will convert the date data type return type string data (which is not what you want).
Assuming you are using the data loader in your application:
The first page/step of the application process for the separator file, etc.
The second page/step asks you to assign the column in the TABLE to CSV column (*.)
--including any "special formatting" that must take place.
-It's on THIS page you will add to the FORMAT string appropriate to the appropriate text box. (empty the area below the drop-down list)
-based on my experience, APEX will run the command to_date() using this "format string" you.
The third page/step is a verification step
The 4th page/step shows you what has been done.
MK
Tags: Database
Similar Questions
-
A column value a comma, which leads to a column different while export to CSV file
Hi all
I have a few columns that will be built in the CSV file. The problem is in one of the column value of a comma in there. Thus, it creates a separate column two in CSv file.
For example:
Name of the column: description.
Value: Bumpers, cushion
But then that export in CSV file, it gives me bumper as a column and seat cushion in the second column.
I'm using Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
Appreciate your help.
Thank you
Suresh
Hello
REPLACE (str
, '"'
, '"'
)
Returns a copy of the string str, but with all the ' "" ' changed substrigs in ' ' ' "
This assumes that your front-end is not treat & like variable substitution marker. If it is so, and -is your SQL * more escape character, then you can say
REPLACE (str
, '\"'
, '"'
)
-
Convert the column values into buckets
Hello
Please help me to convert the column values into buckets.
I have the values of the columns in the following way.
Age of Orderdate * 9 10 12 14 15 18 19 20 21 22 26 27 28 29 33 34 40 45 * and so on
But the requirement is the column values should be displayed in form
Age by order date * 15 1 2 3 4 5 6 7 8 9 10 11 - 16-20 21-25, 26-30 30 + *.
Please someone give me the solution.
Thanks in advance.
Hervé RamaHi Richard,
Just to double check, you have Setup buckets for 1, 2, 3, 4, 5, 6, 7 and 8 individually (each with a fair value). The problem is that you simply do not have all data fall into buckets above, correct?
If this is the case, it looks like has been answered your original question. If so, the label would assign 'Proper' points by clicking on the button label correct next to the appropriate response and open a new thread with your new question. The reason why I say this is it will help other people who have a similar bucket question to your solution, without complicating the issue with subsequent questions.
If you can post a separate thread, I'd be more than happy to help you with your secondary problem.
Best regards
-Joe
-
Table with list of value to load on another value of the column that is never changed by the user
Nice day!
I work with JDeveloper 11.1.2.4.
I have a Table of the ADF that has 4 lines. Each row has a column with a unique value. The plan should include a LOV column in the row show a different list of values based on a single column value. I have install the list of values, use a display with a variable binding criterion. When you create the data LOV source, I Specifies the name of a single column for the value of the bind variable. However, it seems that the LOV changes none selecting different lines.
Is there a good way to handle this? I did LOVs of person in charge in the past, but this isn't quite the same as the user can view only the value that depends on the LOV on.
Any suggestions are greatly appreciated!
BradWHey, it's always a case of use of the dependent list of values. If the attribute that you bind the bind variable view criteria at part of the view object then the value LOV to be examined accordingly. I did a quick test case and I see my lists filtered by an attribute in line (I used the HR schema and posted employees as candidates managerId. The employee list is filtered so that it only shows the employees in the same Department that the employee I want to put a new managerId on) Frank
-
convert the column values to a single line...
I have to return the column values to a single line separated by commas.
If the nulls in the column just ignore without a comma.
Here is one for example. There are three values and two NULL values in the table
Help, pleaseSQL> select ID from temp_fa; ID ----- 1 2 3 5 6 rows selected. I am expecting an output as 1,2,3,5
There is always more than one title in the Oracle world ;)
You can use the TRIM, for example (same configuration as your example):hoek&XE> create table t as select level col from dual connect by level <= 6; Tabel is aangemaakt. hoek&XE> update t set col = null where col in (1,3,5); 3 rijen zijn bijgewerkt. hoek&XE> select * from t; COL ---------- 2 4 6 6 rijen zijn geselecteerd. hoek&XE> select ltrim(sys_connect_by_path(col, ','), ',') output 2 from ( select col 3 , row_number() over (order by col) rn 4 from t 5 ) 6 where connect_by_isleaf=1 7 start with rn=1 8 connect by rn = prior rn+1; OUTPUT ------------------------------------------------------------------------------------------------------------- 2,4,6,,, 1 rij is geselecteerd. hoek&XE> select trim ( both ',' from sys_connect_by_path(col, ',')) output 2 from ( select col 3 , row_number() over (order by col) rn 4 from t 5 ) 6 where connect_by_isleaf=1 7 start with rn=1 8 connect by rn = prior rn+1; OUTPUT ------------------------------------------------------------------------------------------------------------- 2,4,6 1 rij is geselecteerd.
-
How can I determine the type of image to be used before loading an image?
I'm developing an application using VB 2005 which measures two 8-bit or 16-bit image files. When I saw the picture, I find that I have to set the type of image the image buffer before playback of the image in it. For example, if I read a 16-bit image in a buffer of 8 bits, the image is truncated. I guess I could read the image in a 16-bit buffer and retype it if the pixel values are less than 255.
Is there a better way to do it? Can I determine the number of bits of an image before loading in a buffer?
Thank you!
Hi Steverino,
Olivia is incorrect... VDM has a function called GetFileInfo which does just what you want. It only reads the header of the image but does not load the entire image in memory. It will give you various properties such as the bit depth.
I think that on the new .NET support, there can exist here: NationalInstruments.Vision.Analysis.Algorithms.GetFileInformation.
Thanks to the ICB and our legacy of .NET support, it's probably a similar name.
Eric
-
Transpose the unique column values online
Hi all
How to transpose the values of one column in a row,
COL
1
2
3
4
5
6
7
8
and I want to convert this column into the line as follows:
Line (each in a separate column value). Number of values is not constant.
1,2,3,4,5,6,7,8
Solution without converting them to XML:
WITH row_values
AS (SELECT DISTINCT property_name,
column_order
OF v_rd_property_definition
WHERE lp_id = 5171
ORDER BY column_order)
SELECT Regexp_substr(Wm_concat(property_name), "[^,] +' 1, 1") AS col1,.
Regexp_substr (Wm_concat(property_name), "[^,] +' 1, 2"). AS col2.
Regexp_substr (Wm_concat(property_name), "[^,] +' 1, 3") AS col3.
Regexp_substr (Wm_concat(property_name), "[^,] +' 1, 4") AS col4,.
Regexp_substr (Wm_concat(property_name), "[^,] +' 1, 5") AS col5,.
Regexp_substr (Wm_concat(property_name), "[^,] +' 1, 6") AS col6,.
Regexp_substr (Wm_concat(property_name), "[^,] +' 1, 7") AS col7
OF row_values;
-
two column values in a single column
Hi guys,.
I have a requirement that i want to be viewing the two column values in a single as column... values year & product will be exposed in a unique column values
Kind regards
Sree
Karthickumar Pillaiyarsamy yours is a database, in OBIEE is similar with some limitations...
Sree! you have 2 ways to do this: by using the CONCAT function or the | operator, examples here are 2 concatenating year, a space and production:
"Time". "" T05 annually name | ' ' || ' 'Products ' '. Product P1.
CONCAT ("Time". "T05 per year of name', CONCAT (" ","Products".)" P1 product"))
CONCAT in OBIEE accept only 2 params, so you if want to add a space between the 2 items, you must nest your function call.
In case your year column is a number, you can convert it to a string using CAST ("your column" as VARCHAR (10)).
-
Editing of duplicates in the csv columns
Hi all
This is a csv file that I need to handle:
VM, VI-SVC-VM009,0000e0, 0000e0
VM, VI-SVC-VM008,0000ea, 0000ea
VM, VI-SVC-VM007, 0000e9, 0000f1
VM, VI-SVC-VM005, 0000e7, 0000f4
VM, VI-SVC-VM004, 0000f6, 0000fa, 0000e6
VM, VI-SVC-VM003, 0000f5, 0000e5
VM, VI-SVC-VM002, 0000f0, 0000df
VM, VI-SVC-VM001, 0000ef, 0000de
VM, vi-SVC-vc3,0000e4, 0000e4
VM, NAS_OF, 0000f9, 0000f3
VM, CentOS with Prelert
VM, CentOS Desktop - Prelert,0000f6, 0000f6
LDEV, SVC PROD Cluster01, 0000fa, 0 x 29
LDEV, SVC PROD Cluster01, 0000f9, 0 x 15
LDEV, SVC PROD Cluster01, 0000f6, 0 x 14
LDEV, SVC PROD Cluster01, 0000f5, 0 x 13
LDEV, SVC PROD Cluster01, 0000f4, 0x0dAs you can see, there are several different columns with various inputs of length (about 3 rows, some 4, n). Some of the entries above:
VM, VI-SVC-VM009,0000e0, 0000e0
VM, VI-SVC-VM008,0000ea, 0000eaHave the same entries. I need a script that will read the columns, look for an entry of duplicate column and remove the second double (almost like a get-unique, but with columns). The ideas people?
Best,
Rob.
Hi Rob,
You can still use the Get-Unique cmdlet to solve this problem by converting the first columns in rows using the Split method. Then, using Get-Unique. And finally convert the lines into columns using the Join method.
Get-Content -Path VMs.csv | ForEach-Object { [string]::Join(',',($_.Split(',') | Get-Unique)) } | Out-File -FilePath VmsNew.csv
-
Change column values become the row values
Hi, how to make the column values become row values as below, please advise and thanks. SELECT sc.configuration, sc.item_type, st.producttype, st.productfamily, sc.multidrive, sp.internalproductname FROM seaeng_productmodel sp , seaeng_stmodel st, seaeng_ccitemnumber sc WHERE sc.productmodelnumber = sp.productmodelnumber AND sp.stmodelnumber = st.stmodelnumber and sc.ccitemnumber = '9NH2D4-575' Output CONFIGURATION ITEM_TYPE PRODUCTTYPE PRODUCTFAMILY MULTIDRIVE INTERNALPRODUCTNAME CUST UNIQUE CC DRIVE FREEAGENT GO 5400.1 FAMILY N SLIPSTREAM Expected to be converted as below, COLUMN NAME COLUMN VALUE CONFIGURATION CUST UNIQUE ITEM_TYPE CC PRODUCTYPE DRIVE PRODUCTFAMILY FREEAGENT GO 5400.1 FAMILY MULTIDRIVE N INTERNALPRODUCTNAME SLIPSTREAM
You mean like this?
SQL> select * from emp where empno = 7788; EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO ---------- ---------- --------- ---------- ------------------- ---------- ---------- ---------- 7788 SCOTT ANALYST 7566 19/04/1987 00:00:00 3000 20 SQL> ed Wrote file afiedt.buf 1 select decode(rn,1,'EmpNo',2,'EName',3,'Job',4,'Mgr',5,'HireDate',6,'Sal',7,'Comm','DeptNo') as column_name 2 ,decode(rn,1,to_char(EmpNo),2,EName,3,Job,4,to_char(Mgr),5,to_char(HireDate,'DD/MM/YYYY'),6,to_char(Sal),7,to_char(Comm),to_char(DeptNo)) as column_value 3 from emp, (select rownum rn from dual connect by rownum <= 8) 4* where empno = 7788 SQL> / COLUMN_N COLUMN_VALUE -------- ---------------------------------------- EmpNo 7788 EName SCOTT Job ANALYST Mgr 7566 HireDate 19/04/1987 Sal 3000 Comm DeptNo 20 8 rows selected. SQL>
-
Start CalcScript befor, loading data
How can I start CalcScript befor load data?
I want clear slice in cube befor load data.
Example:
I export the data with the period Jan, Feb, so I have to erase data Essbase cube only fo period Jan, Feb. In the case when I export data for the period from March, I want to erase data with period Mar.
I don't want to use maxl because in a maxl script I have to specify the user name and password.
Thank you very much.
--
GeloHello
The best way is to duplicate the KM - 'IKM SQL for Hyperion Essbase (DATA)'
Modify the command 'Load data into essbase' kmUpdate
SQL = "" "select <%=od...
".to
sql = ""
now you can create an interface, the value staging as 'Table SUNOPSIS MEMORY ENGINE' and multi-line, data store loading essbase to the target, the value of KM that you just updated. "." < br / > then use calc script options, in order to have an interface that doesn't have a source and can run scripts Calc.
Ok? FIX :)
Cheers
John < br / > http://john-goodwin.blogspot.com/
-
How to complete the list of values when loading screen
Hi all
I have a list of values based on another field (ANOTHER_FIELD).
for example
Select the value d, r
from table_name
where id =: ANOTHER_FIELD;
ANOTHER_FIELD has a default value.
But when the screen is opened to the list of values does not have the default value and the values list is empty.
Just when it is filled with submission of the form, the list of values.
Please tell me how can I complete the list of values when loading screen.
Thank you!Hello
It depends on how you have defined the default value for ANOTHER_FIELD.
I always set my default settings using a calculation, that runs before header, on the element that defines the value using a static assignment, but to ensure that the calculation is dependent on the order of the day being NULL - try this
Andy
-
Is it possible to edit photos on a media on my iMac SDHC card before loading on my iMac
Is it possible to edit photos on a SDHC card using my iMac, before loading the pictures changed on the iMac?
Yes but it depends on no doubt what application you use photo editing I guess. I use Adobe Photoshop Elements and I can edit directly on the map of the camera if I want and download images to the iMac or elsewhere. I just did as a test on the card from the camera, but normally I upload the images on my desktop first and then go from there.
Rick
-
delay 10s ~ when clicking on links before loading starts
I have a delay of 10 seconds after clicking on links before loading starts. On some sites, it's worse than on others, the worst being on reddit.com. I tried to reset firefox but that did not help. Thanks in advance for any help.
Hello
Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that disables some settings and disables most Add-ons (extensions and themes).
(If you are using an additional theme, place you in default theme.)
If Firefox is open, you can restart in Mode without failure of Firefox in the Help menu by clicking on the restart with the disabled... modules menu item:
If Firefox is not running, you can start Firefox in Mode safe mode as follows:
- On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
- On Mac: Hold the option key during the startup of Firefox.
- On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
(you may need to specify the installation path of Firefox for example/usr/lib/firefox)
Once you get the pop-up, simply select "" boot mode safe. "
If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. Please follow the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.
To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.
When find you what is causing your problems, please let us know. This might help others with the same problem.
Thank you.
-
Windows XP has entered a loop, it stops just before "loading personal settings" then restarts so far again and again.
It won't let me choose a mode which worked well, it is stuck on "Start windows normally" for 20 seconds.
Hello
Restore the system from the recovery console and check.
Maybe you are looking for
-
Thunderbird not to remember a password by e-mail
All of a sudden today Thunderbird requires that I got my password by e-mail before it can connect and send an email. I checked the "Remember password" box and restarted Thunderbird, but again, it will ask for the password. I checked in the security s
-
I tried to download and install firefox several times. I used different links to do the download. Whenever he downloads to 99% and then stops. When I click "resume" I get the message: Firefox Setup 28.0 exe signature is invalid or damaged.
-
Qosmio X 770: latest drivers nVidia 285.62 WHQL (non-beta) now available
http://www.GeForce.com/drivers/results/39066peace
-
Import of VCR via camcorder: so close!
Hello knowledgeable helpful people! I have many VHS tapes personal I'll scan. I think I have everything I need, so I don't want to buy the Elgato stuff and still less a dedicated combo VCR/DVD-R. I just need help for iMovie to capture the incoming
-
My keyboard is half dead?
Hello I have a problem.The left side of my keyboard does not respond, keys that don't work are the caps, 1, q, tab, esc lock and the w key is sometimes buggy. (I had to type the keys does not respond using a virtual keyboard which is annoying)This pr