Installation script for installing tables
I am trying to create a packaged application .(package include app, themes, images , shared components and underlying tables)
something similar to the lines of package application samples available here
http://www.oracle.com/technology/products/database/application_express/packaged_apps/packaged_apps.html
Please let me know if there is a way to create installation scripts for tables+sequences+triggers+data.
Appreciate it
These are MS Windows patches, say for server 2012.
this is a simple batch file am using for monthly patches. But now there are servers in staging area of DC which are required to patch with all missing patches from last 1year or so. We got all the patches in to a folder, and need to run against each server.
================================
SC QUERY state= all | findstr "DISPLAY_NAME | STATE" > C:\Services_Before_Reboot_Dec_14.txt
# will grab service beofore reboot
Windows8.1-KB2992611-x64.msu /quiet /norestart
Windows8.1-KB3008923-x64.msu /quiet /norestart
Windows8.1-KB3011780-x64.msu /quiet /norestart
Windows8.1-KB3013126-x64.msu /quiet /norestart
Pause
===================
Cheers, Ramakrishna Darla.
Similar Messages
-
XI 2.0 installation script for creating XI Sandbox Demo System
Does any have a Windows2000 XI 2.0 installation script designed to create minimal XI Sandbox? Brief installing instructions.
Hi Dan
There is no Installation Script for XI-2.0. The document you have to check is the XI 2.0 installation guide.
Regards
Prasad
SAP Netwaver RIG-XI
SAP Labs LLC, USA -
Cranpkg - script for installing R libraries
Hi everyone,
I have created a script for installing R libraries using pacman. You can download it at http://allan.mcrae.googlepages.com/cranpkg (currently v0.3.0).
For example, the "genetics" library is installed using
> cranpkg -i genetics
CRANPKG v0.2
Copyright (C) 2007 Allan McRae
Examining R installation...
Installing package genetics...
Downloading package information...
Version: 1.3.0
Dependancies: combinat gdata gtools MASS mvtnorm
Resolving dependancies...
Installing combinat...
Installing gdata...
Installing mvtnorm...
Downloading package source...
Building package...
Installing package...
Done
> pacman -Qs cran
local/cran-combinat 0.0.6-1
R library - combinat. Built with cranpkg
local/cran-gdata 2.3.1-1
R library - gdata. Built with cranpkg
local/cran-genetics 1.3.0-1
R library - genetics. Built with cranpkg
local/cran-gtools 2.4.0-1
R library - gtools. Built with cranpkg
local/cran-mvtnorm 0.8.1-1
R library - mvtnorm. Built with cranpkg
This should be fairly robust against failures and leave log files in /tmp/cranpkg if anything fails. Please let me know if you run into trouble with this.
There a a few variables that you may need to modify at the top of the script. For example, the mirror you wish to download from.
Wget is used by default for the downloading and package installation is done with a "sudo pacman" command.
Any problems/success please let me know.
Last edited by Allan (2007-12-31 04:51:27)Here is some information on cranpkg status at v0.2:
Installs and loads fine in R:
adegenet, allelic, ape, bayesSurv, classifly, coda, combinat, e1071, gdata, gee, genetics, glpk, gstat, gtools, HardyWeinberg, kinship, mcmc, mvtnorm, nortest, qtl, reshape, RGtk2, smoothSurv, sp, tree.
Installs but fails to load in R:
graph, rggobi
Thats greater than 90% success rate... The packages that fail to load have no files in them (pacman -Ql <pkg> returns nothing).
Update: graph requires R>=2.6.0 (latest) which hasn't made it to Arch yet. rggobi require external software called ggobi so fails. These errors are caught in v0.2.1.
Last edited by Allan (2007-10-20 15:13:57) -
YAIS - Yet Another Installation Script for Archlinux
I wrote this script today and placed it in AUR. It can show you the way and make it easier to install an archlinux system.
orschiro wrote:
https://aur.archlinux.org/packages/yais/
Can you provide some more information?
Your README is not very extensive:
yais
Yet another installation script (for archlinux)
I updated the README, and added a TODO to the git repo. I also rewrote the PKGBUILD. It will be OK now. -
Shell script for online table redefinition
Hi,
Could someone help me out in building a script for online table redefinition in AIX 11g, moving the table into a new table space.
ThanksYou are embarking upon a voyage in which you will expend a substantial effort reinventing the wheel.
Look at Oracle DBMS_REDEFINITION built-in package.
http://www.morganslibrary.org/reference/pkgs/dbms_redefinition.html
and never do something outside the database, in a proprietary language, that can be done far more efficiently inside the RDBMS in a platform independent language.
In other words, inside the database, I could code your entire project with error handling, in far less than an 15 minutes including testing.
With a simple DDL statement, issued at the command prompt in SQL*Plus ... I could do it in less than 15 seconds: Your choice.
ALTER TABLE <table_name> MOVE TABLESPACE <new_tablespace_name>; -
How to get SQL script for generating table, constraint, indexes?
I'd like to get from somewhere Oracle tool for generating simple SQL script for generating table, indexes, constraint (like Toad) and it has to be Oracle tool but not Designer.
Can someone give me some edvice?
Thanks!
m.I'd like to get from somewhere Oracle tool for
generating simple SQL script for generating table,
indexes, constraint (like Toad) and it has to be
Oracle tool but not Designer.
SQL Developer is similar to Toad and is an Oracle tool.
http://www.oracle.com/technology/products/database/sql_developer/index.html -
Hi everyone
How to make a script for build table:
col width 25mm
align decimal
align on close paren
Thanks
TeetanHi Teetan VK,
Merry Chrismas.
I'm not really an InDesign scripter.
But you can try the following code:
// TableCreate_simple.jsx
// regards pixxxelschubser
var aDoc = app.activeDocument;
// your width of every column
var w = Number(prompt("width of columns", 25));
var NrOfColumns = 3;
var aTextFrame = aDoc.textFrames.add({visibleBounds:[0, 0, 30, NrOfColumns*w + 1]});
var aTable = aTextFrame.insertionPoints[0].tables.add({columnCount:NrOfColumns,bodyRowCount:1});
for (i=0; i<aTable.columns.length; i++) {
aTable.columns[i].width = w;
// Paragraph sytyle with decimal aligning should already exists in your document
for (j = 0; j < aTable.cells.length; j++) {
aTable.cells[j].texts[0].appliedParagraphStyle = aDoc.paragraphStyles.item("AlignDecimal");
Be sure, that a paragraph style (named with "AlignDecimal") exists in your Document.
But what is:
Teetan VK schrieb:
… align on close paren … -
Generate script for filling table
Hi all,
I've got table at test Oracle server table1 with columns ID, BTYPE, MYDESCRIPTION. Rows of this table have been inserted manually. Now my need is to write script for creating table (structure + data). I think about writing something like
CREATE TABLE table 1
AS
SELECT 1 AS ID, 'TYPE1' AS BTYPE, 'SOME TEXT' AS MYDESCRIPTION
UNION ALL
SELECT 2 AS ID, 'TYPE2' AS BTYPE, 'SOME TEXT 2' AS MYDESCRIPTION
But rows are too many to type... Could you please suggest some way of generating script for creating table at working server using existing table at test server? The problem is I don't have an access to working server.
Thanks ahead.Use the view user_tab_cols
say
declare
cursor c1 is
select 'e_'||column_name ||' '||data_type||' ('||data_length||') ' col
from user_tab_cols
where table_name = 'DEPARTMENTS'
union
select 'd_'||column_name ||' '||data_type||' ('||data_length||') ' col
from user_tab_cols
where table_name = 'EMPLOYEES';
v1 varchar2(500);
begin
v1 := 'create table new_tabl (';
for i in c1 loop
v1 := v1||i.col||',';
end loop;
v1 := substr(v1,1,length(v1)-1);
dbms_output.put_line(v1||')');
end;
/i am using employees and departments table of hr schema.
now as both the tables have some column column so i have used e for employees and d for departments
just do one thing remove the length for date data type in o/p i dont know why it is not working.
this will give you structure for data use any sql stmt
Edited by: 810345 on Jun 9, 2011 9:58 PM -
Required to create a script for base table update using XMLSTORE package.
Hi can anybody provide me some help full suggestion on how to update base table using XMLSTORE package.
I created a simple script for Employee table and can able to do the basic operation like Insert and update on the table.
Query is as follow's
DECLARE
insCtx DBMS_XMLSTORE.ctxType;
rows NUMBER;
xmlDoc CLOB :=
'<ROWSET>
<ROW num="1">
<EMPLOYEE_ID>922</EMPLOYEE_ID>
<SALARY>1801</SALARY>
<HIRE_DATE>17-DEC-2007</HIRE_DATE>
<JOB_ID>ST_CLERK</JOB_ID>
<EMAIL>RAUSSJACK</EMAIL>
<LAST_NAME>JACK</LAST_NAME>
<DEPARTMENT_ID>20</DEPARTMENT_ID>
</ROW>
<ROW>
<EMPLOYEE_ID>923</EMPLOYEE_ID>
<SALARY>2001</SALARY>
<HIRE_DATE>31-DEC-2005</HIRE_DATE>
<JOB_ID>ST_CLERK</JOB_ID>
<EMAIL>PATHAK</EMAIL>
<LAST_NAME>PRATIK</LAST_NAME>
<DEPARTMENT_ID>20</DEPARTMENT_ID>
</ROW>
</ROWSET>';
BEGIN
insCtx := DBMS_XMLSTORE.newContext('EMPLOYEES'); -- Get saved context
DBMS_XMLSTORE.clearUpdateColumnList(insCtx); -- Clear the update settings
-- Set the columns to be updated as a list of values
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'EMPLOYEE_ID');
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'SALARY');
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'HIRE_DATE');
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'JOB_ID');
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'EMAIL');
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'LAST_NAME');
DBMS_XMLSTORE.setUpdateColumn(insCtx, 'DEPARTMENT_ID');
-- Insert the doc.
rows := DBMS_XMLSTORE.insertXML(insCtx, xmlDoc);
--COMMIT;
DBMS_OUTPUT.put_line(rows || ' rows inserted.');
-- Close the context
DBMS_XMLSTORE.closeContext(insCtx);
END;
SELECT employee_id, LAST_name FROM employees WHERE employee_id = 114;
DECLARE
updCtx DBMS_XMLSTORE.ctxType;
rows NUMBER;
xmlDoc CLOB :=
'<ROWSET>
<ROW>
<EMPLOYEE_ID>114</EMPLOYEE_ID>
<LAST_NAME>PRABHU</LAST_NAME>
</ROW>
</ROWSET>';
BEGIN
updCtx := DBMS_XMLSTORE.newContext('EMPLOYEES'); -- get the context
DBMS_XMLSTORE.clearUpdateColumnList(updCtx); -- clear update settings
-- Specify that column employee_id is a "key" to identify the row to update.
DBMS_XMLSTORE.setKeyColumn(updCtx, 'EMPLOYEE_ID');
rows := DBMS_XMLSTORE.updateXML(updCtx, xmlDoc); -- update the table
DBMS_XMLSTORE.closeContext(updCtx); -- close the context
commit;
END;
Nowi want little modification on this above query like as i am passing static XML tags and i want it to pick the dynamic XML from web and use the XMLSTORE for the update.
and also for complex XML having 2-3 levels how this query needs to be changed.As i am new to this Oracle utillity any help from xepert will be a great help for me.
ThanksNowi want little modification on this above query like as i am passing static XML tags and i want it to pick the dynamic XML from webFrom a Web Service?
You'll need UTL_HTTP or HttpUriType interface to send the request and receive the XML response.
Search in the forum, there are already a lot of useful examples available.
and also for complex XML having 2-3 levels how this query needs to be changed.DBMS_XMLStore is OK for readily processing a canonical XML format (/ROWSET/ROW/COLUMN structure or alike).
However, if you have to deal with a more complex structure, you either have to :
- use a target object table that matches the XML structure
- preprocess the input document using XSLT to transform it to canonical format
That's why DBMS_XMLStore is not appropriate for multilevel documents, especially if they contain nested repeating groups.
In this case, XMLTable is a more flexible way of parsing the XML and process it relationally at the same time.
Depending on the size of the document, performance may be improved with schema-based object-relational storage.
For more help, please post a new thread in the {forum:id=34} forum, with the following information :
- database version (select * from v$version)
- a sample XML document (the complex one)
- DDL of your target table
- mapping between XML elements and columns (ie which tag goes to which column?)
- an XML schema (if you have one) -
How to find out the script for the table using SQL
Hi,
Could any one tell me that how to find out the script for the table using SQL.
Thanks,
kamalKamal,
You can find the SQL query in Advanced tab of Answers
Thanks,
Balaa... -
Not able to push batch script for installing IIS all features using SCCM 2012 task sequence
Hey Guys, I am working for this from a long time but not able to make it work, I am using following batch script for installing IIS using SCCM 2012 task sequence:
Dism.exe /online /Enable-Feature /FeatureName:IIS-WebServerRole /FeatureName:IIS-WebServerRole /FeatureName:IIS-WebServer /FeatureName:IIS-ApplicationDevelopment /FeatureName:IIS-Security /FeatureName:IIS RequestFiltering /FeatureName:IIS-NetFxExtensibility
/FeatureName:WAS-WindowsActivationService /FeatureName:WAS-ProcessModel /FeatureName:WAS-NetFxEnvironment /FeatureName:WAS-ConfigurationAPI /FeatureName:NetFx3 /FeatureName:WCF-HTTP-Activation /FeatureName:WCF-NonHTTP-Activation /FeatureName:IIS-WebServerManagementTools
/FeatureName:IIS-ManagementConsole /FeatureName:IIS-ManagementScriptingTools /FeatureName:IISIIS6ManagementCompatibility /FeatureName:IIS-ManagementService /FeatureName:IIS-Metabase /FeatureName:IIS-WMICompatibility
When I run this script as admin by right click on it and select "run as a administrator" the script works fine but when I pushed the script as a software package or a step in OSD task sequence, nothing happens. I also tried
run command line option but no luck. Please help me with this.
Thanks,
VST1. When I used "run command line" option I found following errors in smsts.log:
Remediation failed. Code 8027000C TSManager 1/2/2014 2:32:12 PM 2720 (0x0AA0)
Remediation failed with error code 8027000C TSManager 1/2/2014 2:32:12 PM 2720 (0x0AA0)
Remediation failed. Code 8027000C TSManager 1/2/2014 2:34:16 PM 2092 (0x082C)
Remediation failed with error code 8027000C TSManager 1/2/2014 2:34:16 PM 2092 (0x082C)
Failed to run the action: Run Command Line.
Unknown error (Error: 800F080C; Source: Unknown) TSManager 1/2/2014 2:34:32 PM 2092 (0x082C)
Failed to delete directory 'C:\_SMSTaskSequence' TSManager 1/2/2014 2:34:33 PM 2092 (0x082C)
SetNamedSecurityInfo() failed. TSManager 1/2/2014 2:34:33 PM 2092 (0x082C)
SetObjectOwner() failed. 0x80070005. TSManager 1/2/2014 2:34:33 PM 2092 (0x082C)
RemoveFile() failed for C:\_SMSTaskSequence\TSEnv.dat. 0x80070005. TSManager 1/2/2014 2:34:33 PM 2092 (0x082C)
RemoveDirectoryW failed (0x80070091) for C:\_SMSTaskSequence TSManager 1/2/2014 2:34:33 PM 2092 (0x082C)
Failed to delete registry value HKLM\Software\Microsoft\SMS\Task Sequence\Package. Error code 0x80070002 TSManager 1/2/2014 2:34:33 PM 2092 (0x082C)
RegQueryValueExW failed for Software\Microsoft\SMS\Task Sequence, SMSTSEndProgram TSManager 1/2/2014 2:34:34 PM 2092 (0x082C)
GetTsRegValue() failed. 0x80070002. TSManager 1/2/2014 2:34:34 PM 2092 (0x082C)
ReleaseRequest failed with error code 0x80004005 TSManager 1/2/2014 2:34:34 PM 2092 (0x082C)
RegQueryValueExW failed for Software\Microsoft\SMS\Task Sequence, SMSTSEndProgram OSDSetupHook 1/2/2014 2:34:35 PM 360 (0x0168)
GetTsRegValue() failed. 0x80070002. OSDSetupHook 1/2/2014 2:34:35 PM 360 (0x0168)
2. We are not using MDT in our environment so I ant use add features and roles option.
3. The script is running fine when we run it manually. -
Write-Progress in PowerShell script for installing Missing Updates
Hi, I had a previous question here
https://social.technet.microsoft.com/Forums/windowsserver/en-US/88931488-3b2c-4c08-9ad3-6651ba9bbcef/action?threadDisplayName=progress-indicator-for-installing-missing-sccm-2012-r2-updates
But that method is not working as expected. The progress bar displays then continues to increment past 100 throwing an error each time.
I'm thinking I could use a foreach loop for the missing updates but I'm just lost when it comes to Powershell syntax.
For example:
# Get the number of missing updates
[System.Management.ManagementObject[]] $CMMissingUpdates = @(GWMI -ComputerName $server -query "SELECT * FROM CCM_SoftwareUpdate WHERE ComplianceState = '0'" -namespace "ROOT\ccm\ClientSDK") #End Get update count.
$result.UpdateCountBefore = "The number of missing updates is $($CMMissingUpdates.count)"
#Install missing updates.
#Begin example code, not tested.
Foreach ($update in $CMMissingUpdates)
$i++
If ($CMMissingUpdates.count) {
$CMInstallMissingUpdates = (GWMI -ComputerName $server -Namespace "root\ccm\clientsdk" -Class "CCM_SoftwareUpdatesManager" -List).InstallUpdates($CMMissingUpdates)
Do {
Start-Sleep -Seconds 15
[array]$CMInstallPendingUpdates = @(GWMI -ComputerName $server -query "SELECT * FROM CCM_SoftwareUpdate WHERE EvaluationState = 6 or EvaluationState = 7" -namespace "ROOT\ccm\ClientSDK")
#end my example code.
#The code below is working to install updates but Write-Progress isn't.
If ($CMMissingUpdates.count) {
#$result.UpdateCountBefore = "The number of missing updates is $($CMMissingUpdates.count)"
$CMInstallMissingUpdates = (GWMI -ComputerName $server -Namespace "root\ccm\clientsdk" -Class "CCM_SoftwareUpdatesManager" -List).InstallUpdates($CMMissingUpdates)
#Set the missing updates to variable for progress indicator.
$updates = $CMMissingUpdates.Count
$Increment = 100 / $updates
$Percent = 0
Do {
Start-Sleep -Seconds 15
[array]$CMInstallPendingUpdates = @(GWMI -ComputerName $server -query "SELECT * FROM CCM_SoftwareUpdate WHERE EvaluationState = 6 or EvaluationState = 7" -namespace "ROOT\ccm\ClientSDK")
#Not 100% sure $result.UpdateCountBefore is needed below.
$result.UpdateCountBefore = "The number of pending updates for installation is: $($CMInstallPendingUpdates.count)"
Write-Progress -Activity "Updates are installing..." -PercentComplete $Percent -Status "Working..."
$Percent = $Percent + $Increment
} While (($CMInstallPendingUpdates.count -ne 0) -and ((New-TimeSpan -Start $StartTime -End $(Get-Date)) -lt "00:45:00"))
Write-Progress -Activity "Updates Installed" -Status "Done" -Completed
} ELSE {
$result.UpdateCountAfter = "There are no missing updates."}
$resultThe increment should be 100 / (max number of items)
That will not exceed 100 through (max number of items ) iterations in a loop
Mathematically that can be written as
100 / (Max Number of items) * (max number of items ) iterations in a loop
= 100 * ( (Max Number of Item) / (Number Iterations in a loop) )
= 100 * 1 = 100
The (max number of items) and (Number of Iterations in a loop ) need to be based on the same number.
In the script, it is not based on the same number.
The maximum number of items is $CMMissingUpdates.Count
The number of iterations in the loop is based on the condition
($CMInstallPendingUpdates.count -ne 0)
Which causes the iterations of the loop to exceed $CMMissingUpdates.Count
Assuming the $CMInstallPendingUpdates.count is going down (is decremented) through the loop, then
$Increment = 100 /
$CMInstallPendingUpdates.count -
How do i get a script for a table
hai
i need sql query to create table script for already existing table.
can any body help me.
Edited by: 800324 on Feb 24, 2011 12:07 AMfor examle
SELECT DBMS_METADATA.GET_DDL('TABLE',u.table_name)
FROM USER_ALL_TABLES uEdited by: Mahir M. Quluzade on Feb 24, 2011 12:23 PM -
Where to dowload table script for demo table EMPLOYEE
Hello!
I'm reading the book "Oracle PL/SQL Programming, Fourth Edition"
By Steven Feuerstein.
And I can't find the script for the employee table ..
Where can I get it?
Regards
TobiasCopy this script in notepad and then save in .sql format and then run
rem
rem Header: hr_main.sql 09-jan-01
rem
rem Copyright (c) 2001, Oracle Corporation. All rights reserved.
rem
rem Owner : ahunold
rem
rem NAME
rem hr_main.sql - Main script for HR schema
rem
rem DESCRIPTON
rem HR (Human Resources) is the smallest and most simple one
rem of the Sample Schemas
rem
rem NOTES
rem Run as SYS or SYSTEM
rem
rem MODIFIED (MM/DD/YY)
rem ahunold 08/28/01 - roles
rem ahunold 07/13/01 - NLS Territory
rem ahunold 04/13/01 - parameter 5, notes, spool
rem ahunold 03/29/01 - spool
rem ahunold 03/12/01 - prompts
rem ahunold 03/07/01 - hr_analz.sql
rem ahunold 03/03/01 - HR simplification, REGIONS table
rem ngreenbe 06/01/00 - created
SET ECHO OFF
PROMPT
PROMPT specify password for HR as parameter 1:
DEFINE pass = &1
PROMPT
PROMPT specify default tablespeace for HR as parameter 2:
DEFINE tbs = &2
PROMPT
PROMPT specify temporary tablespace for HR as parameter 3:
DEFINE ttbs = &3
PROMPT
PROMPT specify password for SYS as parameter 4:
DEFINE pass_sys = &4
PROMPT
PROMPT specify log path as parameter 5:
DEFINE log_path = &5
PROMPT
-- The first dot in the spool command below is
-- the SQL*Plus concatenation character
DEFINE spool_file = &log_path.hr_main.log
SPOOL &spool_file
REM =======================================================
REM cleanup section
REM =======================================================
DROP USER hr CASCADE;
REM =======================================================
REM create user
REM three separate commands, so the create user command
REM will succeed regardless of the existence of the
REM DEMO and TEMP tablespaces
REM =======================================================
CREATE USER hr IDENTIFIED BY &pass;
ALTER USER hr DEFAULT TABLESPACE &tbs
QUOTA UNLIMITED ON &tbs;
ALTER USER hr TEMPORARY TABLESPACE &ttbs;
GRANT CONNECT TO hr;
GRANT RESOURCE TO hr;
REM =======================================================
REM grants from sys schema
REM =======================================================
CONNECT sys/&pass_sys AS SYSDBA;
GRANT execute ON sys.dbms_stats TO hr;
REM =======================================================
REM create hr schema objects
REM =======================================================
CONNECT hr/&pass
ALTER SESSION SET NLS_LANGUAGE=American;
ALTER SESSION SET NLS_TERRITORY=America;
-- create tables, sequences and constraint
@?/demo/schema/human_resources/hr_cre
-- populate tables
@?/demo/schema/human_resources/hr_popul
-- create indexes
@?/demo/schema/human_resources/hr_idx
-- create procedural objects
@?/demo/schema/human_resources/hr_code
-- add comments to tables and columns
@?/demo/schema/human_resources/hr_comnt
-- gather schema statistics
@?/demo/schema/human_resources/hr_analz
spool off -
Generating Insert Scripts for multiple tables
Hi,
I have 6 tables TABLA,TABLB,TABLC,TABLED,TABLEE,TABLEF
I want to generate Insert Scripts for the above 6 tables.
Is there any mechanism to do so so that i can generate the .sql files for the above 6 tables to another schema?
Any help will be needful for me.Hi,
May the below given function script help you...
CREATE OR REPLACE FUNCTION get_insert_script (v_table_name VARCHAR2)
RETURN VARCHAR2
AS
b_found BOOLEAN := FALSE;
v_tempa VARCHAR2 (8000);
v_tempb VARCHAR2 (8000);
v_tempc VARCHAR2 (255);
BEGIN
FOR tab_rec IN (SELECT table_name
FROM all_tables
WHERE table_name = UPPER (v_table_name))
LOOP
b_found := TRUE;
v_tempa := 'select ''insert into ' || tab_rec.table_name || ' (';
FOR col_rec IN (SELECT *
FROM cols
WHERE table_name = tab_rec.table_name
ORDER BY column_id)
LOOP
IF col_rec.column_id = 1
THEN
v_tempa := v_tempa || '''||chr(10)||''';
ELSE
v_tempa := v_tempa || ',''||chr(10)||''';
v_tempb := v_tempb || ',''||chr(10)||''';
END IF;
v_tempa := v_tempa || col_rec.column_name;
IF INSTR (col_rec.data_type, 'CHAR') > 0
THEN
v_tempc := '''''''''||' || col_rec.column_name || '||''''''''';
ELSIF INSTR (col_rec.data_type, 'DATE') > 0
THEN
v_tempc :=
'''to_date(''''''||to_char('
|| col_rec.column_name
|| ',''mm/dd/yyyy hh24:mi'')||'''''',''''mm/dd/yyyy hh24:mi'''')''';
ELSE
v_tempc := col_rec.column_name;
END IF;
v_tempb :=
v_tempb
|| '''||decode('
|| col_rec.column_name
|| ',Null,''Null'','
|| v_tempc
|| ')||''';
END LOOP;
v_tempa :=
v_tempa
|| ') values ('
|| v_tempb
|| ');'' from '
|| tab_rec.table_name
|| ';';
END LOOP;
IF NOT b_found
THEN
v_tempa := '- Table ' || v_table_name || ' not found';
ELSE
v_tempa := v_tempa || CHR (10) || 'select ''- commit;'' from dual;';
END IF;
RETURN v_tempa;
END;(copied and pasted from a commercial site)
*009*
Edited by: 009 on Jan 14, 2010 10:43 PM
(Function after debug)
Maybe you are looking for
-
Firefox 3.6.8 causing all JPEG images to be compressed like AOL 9.0
System Setup: Windows 7 Home Premium x64 NVIDIA GeForce 9500 GT (newest drivers installed) Aero is running, switched it off to troubleshoot. Problem persisted. Steps to Create the Problem: 1.) Updated to 3.6.8 from 3.5.11. 2.) Loaded up my website: h
-
Output control list BBP_PPF
Hiya. Can please somebody explain when our Buyers click on the the Output Control Purchase Order transaction in enterprise portal, they do not see the modern web style version but are seeing the traditionil dynpro version that is the SAP R3 stye? war
-
Changing name showing up on my iCloud emails
I created an iCloud email address thru my iPad Mini. It automatically used my Apple I'd for the name that shows up on sent emails. I want to change that name to my business name. How do I do that?
-
I am working on a mail form that is linked to my payroll system. It is working great but there has been a request that I add a mail to all recipients feature. However I am not to sure how I would go about doing this, I am hoping someone can help me a
-
GUI Status (or look-a-like) Within A Box
I would like to place buttons within a box, but I would like to see them at the top and within a framed area inside the box. A good example is how an ALV Grid's buttons look in relation to the grid. Does anyone know how to accomplish this. Graphica