You are on page 1of 2

What is difference between SUBSTR and INSTR?

Posted by: informaticareference on: 02/01/2012

In: Oracle Interview Questions

Comment!

INSTR function search string for sub-string and returns an integer indicating the position of the character in
string that is the first character of this occurrence.
SUBSTR function return a portion of string, beginning at character position, substring_length characters
long.SUBSTR calculates lengths using characters as defined by the input character set.
==============================================

The Logic to Send Half Records from Flat File


Source to Target Database
Reddy Sekhar asked Dec 25, 2011 | Replies (15)

This is Reddy Sekhar K, I have the source flat file which contain 3000 records, I want send half records, it means
first half 1500 records are load into the target; can anybody tell how can I achieve it?
Have an unconnected look-up on you source to get the count of the table when first records comes in
from source. Divide the count by 2. Also introduce a count variable to and increment it by one for each
records. In the filter transformation pass only the records where count is greater than the half the
value(total count divided by 2).
You can also use sequence generator to generate count.
If you have Unix, call the shell script as pre shell command, use the following command:
head -1500 filename > filename1

========================================================================

How to return multiple coulmn values using unconnected lookup


HI,

If you want to return multiple columns then go for Connected Lookup. When you are using

UnConnected

Lookup you cannot return multiple columns directly. So you need to Concatinate the Columns which you want to return
in to a single column and separate them in the expression after returning.

Unless you have any specific reason dont go for Unconnected when you expect multiple columns as output. As
Concatinating and separating may hamper the performance of the mapping.

You might also like