Hide columns with sql
I am creating a table where there is a column for the particular row to be hidden. What do I do to make that particular row to stay hidden?
Ex:
ID Name Hide
1 joe N
2 john N
Now after I edit the data of joe to Hide=Y I want the table to display:
ID Name Hide
2 john N
anyone know what statements i need to do? thanks
Here is one way. You could create a view for the table.
SQL> select * from mytable1;
ID NAME H
1 joe N
2 john N
2 harry Y
SQL> create view myview as
2 select * from mytable1
3 where hide = 'N';
View created.
SQL> select * from myview;
ID NAME H
1 joe N
2 john N
Similar Messages
-
Rows to be displayed as Columns with SQL
I have a select statment
SQL> SELECT T.CODE,T.DESCRIPTION from tmp t;
CODE DESCRIPTION
1 1-1
1 1-2
1 1-3
1 1-4
I want with SQL not SQL*PLUS nor Cursors to see the output of my SQL statment as
1 1-1 1-2 1-3 1-4
Please HelpYou could try something like that :
SQL> with tbl as
2 (select 1 code, '1-1' descr from dual union all
3 select 1 code, '1-2' descr from dual union all
4 select 1 code, '1-3' descr from dual union all
5 select 1 code, '1-4' descr from dual) -- end of data sample
6 select code, max(sys_connect_by_path(descr,' ')) keep (dense_rank last order by length(sys_connect_by_path(descr,' '))) descr
7 from tbl
8 connect by code = prior code and descr > prior descr
9 group by code
10 /
CODE
DESCR
1
1-1 1-2 1-3 1-4Nicolas. -
How to load selected column with sql loader
Hi all
I want to load only few columns from a datafile not all columns and i don't know how to do from SQL LDR.
I know we can use position but the data is not fixed length.
I'm working with Oracle 11g and Linux OS.
Here is an example of my data file and table.
Data file is and the field is separated by | :
3418483|VOU|20120609090114|555208363|0|2858185502059|1000|0||
3418484|SR|20120609090124|551261956|0|4146314127759|200000|0||
SQL> desc TBL1
Name Null? Type
CTYPE VARCHAR2(5)
BDATE DATE
PARTNUM VARCHAR2(60)
SERIALNO NUMBER
FVALUE NUMBER
I want to have:
SQL> select * from TBL1
CTYPE BDATE PARTNUM SERIALNO FVALUE
VOU 09/06/2012 555208363 2858185502059 1000
SR 09/06/2012 551261956 4146314127759 200000Thank you.look at FILLER
http://www.orafaq.com/wiki/SQL*Loader_FAQ#Can_one_skip_certain_columns_while_loading_data.3F
--add sample
num1 FILLER,
ctype,
bdate "to_date(:bdate, 'YYYYMMDDHH24MISS')",
PARTNUM,
num2 FILLER,
SERIALNO,
FVALUE,
num3 FILLER
)Edited by: AlexAnd on Jun 9, 2012 4:29 AM -
Hide columns with internal ID's in af:table using af:panelcollection
Hi,
I use a af:table within a af:panelcollection based on view object.
The default menu of panelcollection "View --> Columns --> Show more columns ..." allow the end-user to add all columns of the view object.
The view object contains internal ID's (which I need to have in the VO) I never want to show to the end-user.
Is there a declerative way to avoid this (e. g.: Hide menu item "Show more columns ..." or set attribute of VO to "very hidden")
regards
PeterHi,
since you don't want to show the columns, what about removing them from the table (from the structure window). Is this an option or not possible ?
Frank -
Updating Object Type Columns with SQL
Please note that is a re-post from a different forum. I thought I would try this forum as reading through it, it made more sense to post here. Problem:
I am trying to update a column inside a Nested Table Type in my Table.
This is what I got from some documentation I found from Oracle.
UPDATE TABLE(SELECT PROGRAMS FROM TB_ITEM_MASTER WHERE ITEM_NO_ID =1748) IM
SET IM.PROGRAM_ID = 1;
WHERE IM.ITEM_NO_ID = 1748;
Where PROGRAM_ID is a field from the nested table (ITEMS_IN_PROGRAMS_NT) and ITEM_NO_ID is the Primary Key in my TB_ITEM_MASTER table. When I run this it gives me an error of:
ORA-22908: REFERENCE TO NULL TABLE VALUE
I assume this is because PROGRAM_ID is currently NULL, and when it pulls the record back, I am pulling a NULL value. Currently all the values will be NULL in the table, but I would like to create a UPDATE Statement that I will call that will update that value, from NULL to whatever ID.
Here are my def'n's of all my objects for this problem:
--Object Type def'n
CREATE OR REPLACE TYPE ITEMS_IN_PROGRAMS_TY AS OBJECT(
PROGRAM_ID NUMBER(38));
--Object Type def'n for Nested Table
CREATE OR REPLACE TYPE ITEMS_IN_PROGRAMS_NT
AS TABLE OF ITEMS_IN_PROGRAMS_TY;
--Table def'n
CREATE TABLE TB_ITEM_MASTER
(ITEM_NO_ID NUMBER(38) NOT NULL,
ITEM_NO VARCHAR2(75) NOT NULL,
NOMENCLATURE VARCHAR2(100) NULL,
PROGRAMS DMISDBA.ITEMS_IN_PROGRAMS_NT NULL);
Can someone please help me....I am pulling my hair out on this problem!!! All I want to do is update the column inside a Nested Table. This can not be that hard!!!Save your hair...
SQL> CREATE OR REPLACE TYPE items_in_programs_ty AS OBJECT(
2 program_id NUMBER(38));
3 /
Type created.
SQL> CREATE OR REPLACE TYPE items_in_programs_nt
2 AS TABLE OF items_in_programs_ty;
3 /
Type created.
SQL> CREATE TABLE tb_item_master
2 (item_no_id number(38) not null,
3 item_no varchar2(75) not null,
4 nomenclature varchar2(100) null,
5 programs items_in_programs_nt )
6 NESTED TABLE programs STORE AS nested_programs
7 /
Table created.
SQL>
SQL> INSERT INTO tb_item_master (item_no_id, item_no, nomenclature)
2 VALUES (1748, 'APC/1748', 'Gizmo')
3 /
1 row created.
SQL> UPDATE tb_item_master tmi
2 SET tmi.programs = items_in_programs_nt(items_in_programs_ty( 1))
3 WHERE tmi.item_no = 'APC/1748'
4 /
1 row updated.
SQL>
SQL> Cheers, APC -
Hi my name is vishal
For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using iTextSharp.text;
using iTextSharp.text.pdf;
using System.Diagnostics;
using System.IO;
namespace DRRS_CSharp
public partial class frmPDF : Form
public frmPDF()
InitializeComponent();
private void button1_Click(object sender, EventArgs e)
Document doc = new Document(PageSize.A4.Rotate());
var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
doc.SetMargins(50, 50, 50, 50);
doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
doc.Open();
PdfPTable table = new PdfPTable(6);
table.TotalWidth =530f;
table.LockedWidth = true;
PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
cell.Colspan = 6;
cell.HorizontalAlignment = 0;
table.AddCell(cell);
Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
para.Alignment = Element.ALIGN_CENTER;
iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
png.ScaleToFit(105f, 105f);
png.Alignment = Element.ALIGN_RIGHT;
SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
conn.Open();
SqlDataReader dr;
dr = cmd.ExecuteReader();
table.AddCell("Reprocessing Date");
table.AddCell("Patient Name");
table.AddCell("Dialyzer(Manufacturer,Size)");
table.AddCell("No.of Reuse");
table.AddCell("Verification");
table.AddCell("DialyzerID");
while (dr.Read())
table.AddCell(dr[2].ToString());
table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
table.AddCell("@count".ToString());
table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
table.AddCell(dr[0].ToString());
dr.Close();
table.SpacingBefore = 15f;
doc.Add(para);
doc.Add(png);
doc.Add(table);
doc.Close();
System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
this.Close();
The above code executes well with no problem at all!
As you can see the file to which i create and save and open my pdf report is
AssignedDialyzer.pdf.
The column headers of table in pdf report from c# windows forms using iTextSharp are
"Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
"DialyzerID".
However the problem i am facing is after execution and opening of document is my
column headers in table in pdf report from
c# and datas in it all appear in bold.
I have browsed through net regarding to solve this problem but with no success.
What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
vb6,adodb with ms access using iTextSharp?
I have approached Sound Forge.Net for help but with no success.
I hope anyone/someone truly understands what i am trying to ask!
I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
I hope i get a reply in terms of solving this problem.
vishalHi,
About iTextSharp component issue , I think this case is off-topic in here.
I suggest you consulting to compenent provider.
http://sourceforge.net/projects/itextsharp/
Regards,
Marvin
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
Sql query slowness due to rank and columns with null values:
Sql query slowness due to rank and columns with null values:
I have the following table in database with around 10 millions records:
Declaration:
create table PropertyOwners (
[Key] int not null primary key,
PropertyKey int not null,
BoughtDate DateTime,
OwnerKey int null,
GroupKey int null
go
[Key] is primary key and combination of PropertyKey, BoughtDate, OwnerKey and GroupKey is unique.
With the following index:
CREATE NONCLUSTERED INDEX [IX_PropertyOwners] ON [dbo].[PropertyOwners]
[PropertyKey] ASC,
[BoughtDate] DESC,
[OwnerKey] DESC,
[GroupKey] DESC
go
Description of the case:
For single BoughtDate one property can belong to multiple owners or single group, for single record there can either be OwnerKey or GroupKey but not both so one of them will be null for each record. I am trying to retrieve the data from the table using
following query for the OwnerKey. If there are same property rows for owners and group at the same time than the rows having OwnerKey with be preferred, that is why I am using "OwnerKey desc" in Rank function.
declare @ownerKey int = 40000
select PropertyKey, BoughtDate, OwnerKey, GroupKey
from (
select PropertyKey, BoughtDate, OwnerKey, GroupKey,
RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
from PropertyOwners
) as result
where result.[Rank]=1 and result.[OwnerKey]=@ownerKey
It is taking 2-3 seconds to get the records which is too slow, similar time it is taking as I try to get the records using the GroupKey. But when I tried to get the records for the PropertyKey with the same query, it is executing in 10 milliseconds.
May be the slowness is due to as OwnerKey/GroupKey in the table can be null and sql server in unable to index it. I have also tried to use the Indexed view to pre ranked them but I can't use it in my query as Rank function is not supported in indexed
view.
Please note this table is updated once a day and using Sql Server 2008 R2. Any help will be greatly appreciated.create table #result (PropertyKey int not null, BoughtDate datetime, OwnerKey int null, GroupKey int null, [Rank] int not null)Create index idx ON #result(OwnerKey ,rnk)
insert into #result(PropertyKey, BoughtDate, OwnerKey, GroupKey, [Rank])
select PropertyKey, BoughtDate, OwnerKey, GroupKey,
RANK() over (partition by PropertyKey order by BoughtDate desc, OwnerKey desc, GroupKey desc) as [Rank]
from PropertyOwners
go
declare @ownerKey int = 1
select PropertyKey, BoughtDate, OwnerKey, GroupKey
from #result as result
where result.[Rank]=1
and result.[OwnerKey]=@ownerKey
go
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
IDM with SQL server Error: Cannot find columns for the table...
Hi all,
I am Configuring IDM with SQL Server repository and ran into this error.
'Cannot find columns for the table 'object'
.....jdbc...[SQL Server]Invalid object name 'object'
Can anybody please help me!!
GYes, permissions are very important. I ran into a similar problem because I didn't have the correct permissions. Make sure the user has the following permissions:
CREATE ANY TABLE
ALTER ANY TABLE
DROP ANY TABLE
CREATE ANY PROCEDURE
EXECUTE ANY PROCEDURE
DROP ANY PROCEDURE
Also, make sure there is enough space in the default tablespace of that user.
HTH
~Suvesh -
I am linking my question from Stack Overflow here. The link: http://stackoverflow.com/questions/27943913/sql-azure-query-with-row-number-executes-slow-if-columns-with-nvarchar-of-bi
Appreciate your help!
GorgiHi,
Thanks for posting here.
I suggest you to check this link and optimize your query on sql azure.
http://www.sqlusa.com/articles/query-optimization/
http://sqlblog.com/blogs/paul_white/archive/2011/02/23/Advanced-TSQL-Tuning-Why-Internals-Knowledge-Matters.aspx
Also check this blog which had similar issue.
https://social.msdn.microsoft.com/Forums/en-US/c1da08b4-265d-4ec8-a252-8d7090234e3e/simple-select-query-takes-long-time-to-execute-with-nvarchar-columns?forum=transactsql
Girish Prajwal -
Hide Matrix column With Parameter
Hi
I,m trying to hide matrix columns with parameters. If i for example have one matrix column with for example tre metrix values (Jan, Feb, and Mar). I have an expression with the values Jan, Feb, Mar with witch i would like to decide which
columns to show in the matrix column. In cases when i have a real column i use code as below in the column. But now that this three columns basically exists in one matrix column i dont know how to solve it. Anybody that has a soluiton on this preferably
some example code on the example.
IIF(INSTR(JOIN(Parameters!ColumnChoser.Value,
","),"Jan")>0,False,True)
Best regards Arne
Arne OlssonWhy not restrict data to only show the months you passed. Matrix creates columns based on data available so what you need is a filter like this in query below
WHERE ','+ @MonthList + ',' LIKE '%,' + MonthName + ',%'
assuming @MonthList as parameter through which you pass Jan,Feb etc and MonthName is column of the table containing corresponding month names used as matrix column group.
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
can anyone suggest me how to insert values to sharepoint list column of datatype (person/group datatype). Also, Does sharepoint list allows nulls as a value?
please help.
Thanks
RaghavendraHi Raghavendra,
Based on my test, if we directly insert a column with people account or group name with domain\user or domain\group formats to a SharePoint list, those columns with the values would be ignored when executing the package. Other columns with Null value would
be insert into the list. If we insert a column with numeric format, the values would change to corresponding user or group based on the site permissions in SharePoint site.
So to fix this issue, I suggest we can select <ignore> maps to the “People or Group” column in SharePoint list. The “People or Group” column would show null value in SharePoint list. Then we can manually or use workflow feature add values in the “People
or Group” column in SharePoint list.
The following screenshot is for your reference:
If there are any other questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
MS SQL - Add column with all rows being "0"
Add column with all rows being "0"
nevermind
"lee" <[email protected]> wrote in message
news:e3b5kt$mch$[email protected]..
> Add column with all rows being "0"
>
>
> -
SQL - Multiple Fetch into Single Column with Comma Separator
Hello Experts,
Good Day to all...
I need your help on following scenarios. The below query returns set of titleID strings. Instead of printing them one below the other as query output, I want the output to be in batch of 25 values.i.e each row should have 25 values separated by comma. i.e If there are 100 titles satisfying the output, then there should be only four rows with and each row having 25 titles in comma separated manner.
SELECT DISTINCT title_id
FROM pack_relation
WHERE package_id IN ( SELECT DISTINCT fa.package_id
FROM annotation fa
GROUP BY fa.package_id
HAVING COUNT
(fa.package_id) <100);I tried with the PL/SQL block; whereas it is printing all the values continously :(
I need to stop with 25 values and display.
If its possible with SQL block alone; then it would be of great help
DECLARE
v_str VARCHAR2 (32767) := NULL;
CURSOR c1
IS
SELECT DISTINCT title_id
FROM pack_relation
WHERE package_id IN ( SELECT DISTINCT fa.package_id
FROM annotation fa
GROUP BY fa.package_id
HAVING COUNT
(fa.package_id) <100);
BEGIN
FOR i IN c1
LOOP
v_str := v_str || ',' || i.title_id;
END LOOP;
v_str := SUBSTR (v_str, 2);
DBMS_OUTPUT.put_line (v_str);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error-->' || SQLERRM);
END;Thanks...You can use CEIL
Sample code
SELECT
nt,
LTRIM(MAX(SYS_CONNECT_BY_PATH(val,',')) KEEP (DENSE_RANK LAST ORDER BY curr),',') AS concat_val
FROM
SELECT
val,
nt,
ROW_NUMBER() OVER (PARTITION BY nt ORDER BY val) AS curr,
ROW_NUMBER() OVER (PARTITION BY nt ORDER BY val) -1 AS prev
FROM
SELECT
level AS val,
ceil(rownum/3) as nt /* Grouped in batches of 3 */
FROM
dual
CONNECT BY level <= 10
GROUP BY
nt
CONNECT BY prev = PRIOR curr
AND nt = PRIOR nt
START WITH curr = 1;
NT CONCAT_VAL
1 1,2,3
2 4,5,6
3 7,8,9
4 10Your code
SELECT
nt,
LTRIM(MAX(SYS_CONNECT_BY_PATH(title_id,',')) KEEP (DENSE_RANK LAST ORDER BY curr),',') AS concat_val
FROM
SELECT
title_id,
nt,
ROW_NUMBER () OVER (PARTITion BY nt ORDER BY title_id) AS curr,
ROW_NUMBER() OVER (PARTITION BY nt ORDER BY title_id) -1 AS prev
FROM
SELECT
title_id,
ceil(rownum/25) AS nt /* Grouped in batches of 25 */
FROM
pack_relation tdpr
JOIN annotation fa
ON
tdpr.package_id = fa.package_id
GROUP BY
title_id,
fa.package_id
HAVING
COUNT (fa.package_id) < 500
GROUP BY
nt
CONNECT BY prev = PRIOR curr
AND nt = PRIOR nt
START WITH curr = 1; -
WHat is the best index type for non uniqueness / Varchar columns in SQL 2008 R2
Hello All Greetings,
Please help me here with my doubt,
in my table i have two columns about a million rows, it has about 20 columns in it, three columns with name as Period, Gender so most of the time these two columns use in where clause,
Gender will contain Either M or F , Period contains YYYY-Month (2013-December, 2013-August) etc so i would like to add a Index to these two columns so that in will increase the performance, so please let me know what type of indexes i need to add to
these columns in the table,
please note that only one time we will add data to the table which will take only 2 minutes but we query the table every day
so my question what is the best index type that i need to create on columns with non uniqueness values in the column.,
Thank you In Advance,
MilanThere is nothing whatever wrong with creating an index on a VARCHAR column, or set of columns.
Regarding the performance of VARCHAR/INT, as with everything in a RDBMS, it depends on what you are doing. What you may be thinking of is the fact that clustering a table on a VARCHAR key is (in SQL Server) marginally less efficient than clustering on a monotonically
increasing numerical key, and can introduce fragmentation.
Or you may be thinking of what you have heard about writing JOINs on VARCHAR columns - it is true, it is a little less efficient than a JOIN on numeric type, but it is only a little less efficient, nothing that would lead you to never join on varchar cols.
None of this does not mean that you should not create indexes on VARCHAR columns. A needed index on a VARCHAR column will boost query performance, often by orders of magnitude. If you need an index on a VARCHAR, create it. It makes no sense to try to find an
integer column to create the index on - the engine will never use it.
Check this reference: http://stackoverflow.com/questions/14041481/is-it-good-to-create-a-nonclustered-index-on-a-column-of-type-varchar
Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
INSQLSERVER.COM
Mohammad Nizamuddin -
All,
I have two tables HEADER_TABLE and LINE_TABLE. Each header record can have multiple line records. I have to load data from a flat file to these tables.Flat file can have two types of records. H-Header, L-Line. It looks as follows.. Each H record can have multiple corresponding L records
H..........
L.......
L......
L......
H.........
L.......
L......
L......
I have HEADER_ID column in HEADER_TABLE and HEADER_ID, LINE_ID columns in the LINE_TABLE.
While loading data using SQL Loader, I need to generate HEADER_ID and LINE_ID values as follows and load them.
H..........<HEADER_ID = 1>
L....... <HEADER_ID = 1><LINE_ID = 1>
L...... <HEADER_ID = 1><LINE_ID = 2>
L...... <HEADER_ID = 1><LINE_ID = 3>
H......... <HEADER_ID = 2>
L....... <HEADER_ID = 2><LINE_ID = 4>
L...... <HEADER_ID = 2><LINE_ID = 5>
L...... <HEADER_ID = 2><LINE_ID = 6>
Is it possible to do this with SQL LODER?
I tried to do this with sequences. But it loaded the tables as follows.
H..........<HEADER_ID = 1>
L....... <HEADER_ID = 1><LINE_ID = 1>
L...... <HEADER_ID = 1><LINE_ID = 2>
L...... <HEADER_ID = 1><LINE_ID = 3>
H......... <HEADER_ID = 2>
L....... <HEADER_ID = 1><LINE_ID = 4>
L...... <HEADER_ID = 1><LINE_ID = 5>
L...... <HEADER_ID = 1><LINE_ID = 6>
Thanks
KethaMorgan,
Examples given in the link are quite generic and I have tried them. But my requirement is focused on generating header_id and line_id values as i have described. It seems that SQLLDR scans all records for a particular WHEN clause and insert them into the specified table. I think that if SQLLDR is made to read recod in the data file sequentially, this can be done.
ANy idea of how to make SQLLDR read the records from the file sequentially?
Thanks
Ketha
Maybe you are looking for
-
Open in same window, when using simple finder window
When I am using finder windows in simplified mode (no sidebar) any folder I open, pops up a new window. Is it possible to have folders open in the same window? Thanks
-
Restricting Creation/Update of Profit Center Master Data through KE51/KE52
Hi, I have a scenario where profit center master data is maintained in MDM which acts as central repository and the master data is syndicated from MDM to ECC through PRCMAS IDoc. Business requirement is that since MDM is acting as central repository
-
Mass Material Master Records Extension
Hi All, Mass Material Master Records Extension I have a list of 50 materials. I want to extend them to new sales areas and plants. Is there a t-code for mass extension of material master records, Please advice thanks in advance Rgds Priyanka
-
The iPhone "iphone"cannot be synced. An unknown error occured (0xE800400)
Hi Cannot sync my iPhone due to this error message. Its a bit concerning as I'm out of space and cannot update any apps without syncing and using iTunes. I have searched these forums, googles etc but no help is available. The error code does not even
-
I dont know what i hit, but i cant fast forward or rewind by holding the next or back button. I used to be able to fast forward to any part of the song, but now it just skips to the the next song. I tried to reset the settings and still doesnt work.