Help needed Converting MSSQL function to PL/SQL

Hello,
I have the following MSSQL code which I need to migrate to Oracle 10g. The problem I am having is the MSSQL code creates a temp table as the return type and I am unsure how to get the same functionality in PL/SQL.
MSSQL CODE_
CREATE FUNCTION [dbo].[QueryCurrentWhy]
@ColumnID INT,
@GroupID INT,
@Parents VARCHAR(8000)
RETURNS @R TABLE(ID1 int IDENTITY (1, 1) NOT NULL, ID2 int, ColID int, [Name] VARCHAR(255), Tlevel int, ParentID int, Processed BIT)
AS
BEGIN
RETURN
END
The code I have currently written in PL/SQL is below. I firstly create a global temp table and then a sequence and trigger for it. I then create the Function in the hope I can specify the temp table as the return type. Problem is I get the error "PLS-00201: identifier 'TEMPR' must be declared". Im guessing this is because the temp table is declared outside the function declaration?
ORACLE CODE_
CREATE GLOBAL TEMPORARY TABLE tempR
ID1 INT NOT NULL,
ID2 INT,
ColID INT,
Name VARCHAR2(255),
Tlevel INT,
ParentID INT,
Processed CHAR(1)
CREATE SEQUENCE gCounter
     START WITH 1
     INCREMENT BY 1
CREATE OR REPLACE TRIGGER gTrigger
BEFORE INSERT ON tempR
FOR EACH ROW
DECLARE TEMP_NO INT;
BEGIN
     SELECT gCounter.NEXTVAL INTO TEMP_NO FROM DUAL;
:NEW.ID1 := TEMP_NO;
END;
CREATE OR REPLACE FUNCTION TSORADB.QueryCurrentWhy
aColumnID INT,
aGroupID INT,
aParents VARCHAR2(8000)
RETURN tempR
AS
BEGIN
RETURN;
EXCEPTION when NO_DATA_FOUND then null;
END;
Basically is it possible for me to declare the temp table in the return statement, if not then what is the best way to go about this?
Thanks in advance
Toby
Edited by: redeye on Jul 27, 2009 3:26 PM

Unfortunately I didnt write the original function or stored procedure and the person who did is no longer with the company, so apologies for any confusion with what I am saying.
Maybe it'll be more helpful if i paste the contents of the function?
CREATE OR REPLACE FUNCTION TSORADB.QueryCurrentWhy
aColumnID INT,
aGroupID INT,
aParents VARCHAR2(8000)
RETURN tempR
AS
--BEGIN
aPKColTypeID INT;
aFKDColTypeID INT;
aFKDSColTypeID INT;
aFKIColTypeID INT;
aColType VARCHAR2(30);
aTableID INT;
aName VARCHAR2(255);
aNameWhyMost VARCHAR2(255);
aNameWhyMost2 VARCHAR2(255);
aLongNameStr VARCHAR2(1000);
aConnectStr VARCHAR2(1000);
aColID INT;
aColIDWhyMost INT;
aColIDWhyMost2 INT;
aColIDWhyMostLast INT;
aCount INT;
aID1 INT;
aID2 INT;
aPreID2 INT;
aMaxID2 INT;
aCurrentID2 INT;
aTLevel INT;
aTLevel2 INT;
aTlevelLast INT;
aNewLevel INT;
aMaxTLevel INT;
aMaxTLevel2 INT;
aParentID INT;
aParentID2 INT;
aNewParentID INT;
aProcessed number (1);
--aCurVar1 CURSOR;
aParent INT; aStrEntityIDSet varchar(2000); aStrPipeSepValsInput varchar(2000); aEndPointInput int; aSeperatorIndex int;
aNumTempDoc INTEGER := 0;
--aColumnID INT DEFAULT(0);
--aGroupID INT DEFAULT(0);
--aParents VARCHAR(8000) DEFAULT('');
BEGIN
SELECT ColumnTypeID INTO aPKColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'PK';
SELECT ColumnTypeID INTO aFKDColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'FKD';
SELECT ColumnTypeID INTO aFKDSColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'FKDS';
SELECT ColumnTypeID INTO aFKIColTypeID FROM TSORADB.HKColumnType WHERE ColumnTypeName = 'FKI';
IF (aGroupID is null)
THEN
     aGroupID := -1;
END IF;
--Tokenize the parent array and get back a set of values.
IF(aParents is not null)
THEN
BEGIN
     aStrEntityIDSet := aParents;
     aStrPipeSepValsInput := '|' + ltrim(rtrim(aStrEntityIDSet)) + '|';
     --print aStrPipeSepValsInput
     aEndPointInput := INSTR(aStrPipeSepValsInput, '|');
     aStrPipeSepValsInput := INSTR (aStrPipeSepValsInput, LENGTH (aStrPipeSepValsInput) - aEndPointInput); -- take out the '|' pattern
     WHILE (LENGTH (aStrPipeSepValsInput) > 0)
     LOOP
     BEGIN
          aEndPointInput := INSTR(aStrPipeSepValsInput, '|'); -- get the next '|' pattern
          aParent := SUBSTR(aStrPipeSepValsInput, 1, aEndPointInput - 1);
          --PRINT 'aParent is ' + CONVERT (NVARCHAR, aParent)
          aStrPipeSepValsInput := INSTR (aStrPipeSepValsInput, LENGTH (aStrPipeSepValsInput) - aEndPointInput);
          INSERT INTO TmpParent (ColID) VALUES (aParent);
     END;
     END LOOP;
END;
END IF;
SELECT hkc.TableID, hkc.Name, hkct.ColumnTypeName
INTO aTableID, aName, aColType
FROM TSORADB.HKColumns hkc
INNER JOIN TSORADB.HKColumnType hkct on hkc.ColTypeID = hkct.ColumnTypeID
WHERE hkc.ColumnID = aColumnID;
IF aColType in ('PK','PKD')
THEN
     -- Generate Unique Path Table Start
     SELECT
     CASE WHEN FKIs3.Name is null
     THEN PKs3.Name
     ELSE FKIs3.Name
     END Name
     INTO aName
     FROM TSORADB.HKColumns PKs3
     INNER JOIN
     SELECT hkc3.TableID FROM TSORADB.HKColumns hkc3
     WHERE hkc3.ColumnID = aColumnID
     ) HKC3 ON PKs3.TableID = HKC3.TableID
     LEFT OUTER JOIN
     SELECT TableID, Name
     FROM TSORADB.HKColumns
     WHERE ColTypeID = aFKIColTypeID
     ) FKIs3 ON PKs3.TableID = FKIs3.TableID
     WHERE PKs3.ColTypeID = aPKColTypeID AND ((aGroupID=-1 AND PKs3.GroupID IS NULL) OR PKs3.GroupID=aGroupID);     
END IF;
-- Insert query column itself
aTlevel := 0;
aParentID := 0;
aID2 := 1;
IF (aColType = 'ATT')
THEN
BEGIN
INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed)
SELECT distinct aID2, TopHKCs.ColumnID as ColID, aName as Name,aTlevel as Tlevel, aParentID as ParentID, 1 as Processed
     FROM TSORADB.HKColumns TopHKCs
WHERE TopHKCs.ColumnID = aColumnID;
aID2 := aID2 + 1;
aTlevel := 1;
     aParentID := aColumnID;
     -- Get the non-compound name for the parent
     SELECT
     CASE WHEN FKIs3.Name is null
     THEN PKs3.Name
     ELSE FKIs3.Name
     END Name
     INTO aName
     FROM TSORADB.HKColumns PKs3
     INNER JOIN
     SELECT hkc3.TableID FROM TSORADB.HKColumns hkc3
     WHERE hkc3.ColumnID = (SELECT ColumnID FROM TSORADB.HKColumns WHERE TableID = aTableID AND ColTypeID = aPKColTypeID)
     ) HKC3 ON PKs3.TableID = HKC3.TableID
     LEFT OUTER JOIN
     SELECT TableID, Name
     FROM TSORADB.HKColumns
     WHERE ColTypeID = aFKIColTypeID
     ) FKIs3 ON PKs3.TableID = FKIs3.TableID
     WHERE PKs3.ColTypeID = aPKColTypeID AND ((aGroupID=-1 AND PKs3.GroupID IS NULL) OR PKs3.GroupID=aGroupID);
     INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed)
SELECT aID2, ColumnID, aName, aTlevel, aParentID, 0
FROM TSORADB.HKColumns
     WHERE TableID = aTableID
     AND ColTypeID = aPKColTypeID;
aID2 := aID2 + 1;
END;
ELSE
BEGIN
     INSERT INTO TmpR1(ColID, Name, Tlevel, ParentID, Processed)
     SELECT nonCompoundHks.ColumnID as ColID, aName as Name,aTlevel as Tlevel, aParentID as ParentID, 0 as Processed
     FROM TSORADB.HKColumns nonCompoundHks
     WHERE nonCompoundHks.Name = aName --lower(nonCompoundHks.Name) = lower(aName)
     AND ((aGroupID=-1 AND nonCompoundHks.GroupID IS NULL) OR nonCompoundHks.GroupID=aGroupID)
     AND nonCompoundHks.ColTypeID = aPKColTypeID
     AND EXISTS
          select ColumnID
          From TSORADB.HKColumns hkc4
          WHERE hkc4.TableID = nonCompoundHks.TableID
          AND (hkc4.ColTypeID = aFKDColTypeID OR hkc4.ColTypeID = aFKDSColTypeID)
     AND NOT EXISTS
          select ColumnID
          From TSORADB.HKColumns hkc5
          WHERE hkc5.TableID = nonCompoundHks.TableID
          AND hkc5.ColTypeID = aFKIColTypeID
          AND ((aGroupID=-1 AND hkc5.GroupID IS NULL) OR hkc5.GroupID=aGroupID)
     INSERT INTO TmpR1(ColID, Name, Tlevel, ParentID, Processed)
     SELECT compoundPk.ColumnID as ColID, aName as Name,aTlevel as Tlevel, aParentID as ParentID, 0 as Processed
     FROM TSORADB.HKColumns compoundPk
     INNER JOIN TSORADB.HKColumns compoundHkc on compoundHkc.TableID = compoundPk.TableID AND compoundHkc.ColTypeID = aFKIColTypeID
INNER JOIN (
          SELECT hkc.ColumnID
          FROM TSORADB.HKColumns hkc
          WHERE hkc.ColTypeID = aPKColTypeID
          AND hkc.Name = aName --lower(hkc.Name) = lower(aName)
          AND ((aGroupID=-1 AND hkc.GroupID IS NULL) OR hkc.GroupID=aGroupID)
          AND NOT EXISTS
          select ColumnID
          From TSORADB.HKColumns hkc2
          WHERE hkc2.TableID = hkc.TableID
          AND (hkc2.ColTypeID = aFKDColTypeID OR hkc2.ColTypeID = aFKDSColTypeID)
          AND ((aGroupID=-1 AND hkc2.GroupID IS NULL) OR hkc2.GroupID=aGroupID)
) Indys ON Indys.ColumnID = compoundHkc.ForeignKey
     WHERE compoundPk.ColTypeID = aPKColTypeID;
     INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed)
     SELECT ID2, ColID, Name, Tlevel, ParentID, Processed FROM TmpR1;
     FETCH FROM aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed
     WHILE aafetch_status = 0
     BEGIN     
          IF(aParents is null or EXISTS (SElECT ColID FROM aTmpParent WHERE ColID = aColID) )
          BEGIN
               INSERT INTO tempR(ID2, ColID, [Name], Tlevel, ParentID, Processed) VALUES(aID2, aColID, aName, aTlevel, aParentID, aProcessed)
               SET aID2 = aID2 + 1
          END
          FETCH NEXT FROM aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed
     END
     CLOSE aCurVar1 */
END;
END IF;
     begin
     SELECT COUNT(*) INTO aNumTempDoc FROM tempR WHERE Processed = 0 and Tlevel < 1;
     end;
WHILE aNumTempDoc > 0
LOOP
BEGIN
-- Get current row
     SELECT ID1, ID2, ColID, Name, Tlevel, ParentID
     INTO aID1, aID2, aColID, aName, aTlevel, aParentID
     FROM tempR
     WHERE Processed = 0 AND ROWNUM = 1
     ORDER BY ID1;
UPDATE tempR SET processed = 1 WHERE ID1 = aID1;
aPreID2 := aID2;
-- Get why parents
declare CURSOR aCurVar1 IS --SELECT * FROM TSORADB.HKColumns;
     SELECT distinct FKDPKs.ColumnID as ColID,
          CASE WHEN FKDFKI.NAME is null
          THEN FKDPKs.Name
          ELSE FKDFKI.Name
          END Name,
     (aTlevel+1) as Tlevel,
     PREHKCs.ColID AS ParentID,
     0 as Processed
     FROM TSORADB.HKColumns FKDPKs
     INNER JOIN
     TSORADB.HKColumns FKDFKs ON FKDPKs.ColumnID = FKDFKs.ForeignKey
INNER JOIN
     TSORADB.HKColumns FKDFKs2 ON FKDFKs2.TableID = FKDFKs.TableID
     INNER JOIN
     tempR PREHKCs ON PREHKCs.ColID=aColID AND PREHKCs.ColID = FKDFKs2.ColumnID AND PREHKCs.Tlevel=aTlevel
     LEFT OUTER JOIN
     SELECT TableID, Name, GroupID
     FROM TSORADB.HKColumns
     WHERE ColTypeID = aFKIColTypeID
     ) FKDFKI ON FKDFKI.TableID = FKDPKs.TableID
     INNER JOIN TSORADB.HKColumnType ON FKDPKs.ColTypeID=HKcolumnType.ColumnTypeID
     WHERE FKDPKs.ColTypeID=aPKColTypeID AND FKDPKs.ColumnID <> aColumnID
     AND FKDFKs.ColTypeID=aFKDColTypeID
AND ((aGroupID=-1 AND FKDPKs.GroupID IS NULL) OR FKDPKs.GroupID=aGroupID);
     BEGIN
OPEN aCurVar1;
aCount := 1;
SELECT MAX(ID2) INTO aID2 FROM tempR;
LOOP
     FETCH aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed;
     Exit when aCurVar1%NOTFOUND; -- Exit the loop when no more rows are found.
--WHILE aafetch_status = 0
BEGIN
IF (aCount = 1) -- The first Why Parent
          THEN
               INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed) VALUES(aPreID2, aColID, aName, aTlevel, aParentID, 0);
ELSE -- The multiple Why Parents
BEGIN
               aID2 := aID2 + 1;
-- Copy the previous parent with increased ID2
INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed) SELECT aID2 as ID2, ColID, Name, Tlevel, ParentID, 1 AS Processed FROM tempR WHERE ID1 <= aID1 AND ID2 = aPreID2;
-- Insert the new why parent
INSERT INTO tempR(ID2, ColID, Name, Tlevel, ParentID, Processed) VALUES(aID2, aColID, aName, aTlevel, aParentID, 0);
END;
END IF;          
aCount := aCount + 1;
          --FETCH NEXT FROM aCurVar1 INTO aColID, aName, aTlevel, aParentID, aProcessed;
END;
     END LOOP;
CLOSE aCurVar1;
     END;
     SELECT COUNT(*) INTO aNumTempDoc FROM tempR WHERE Processed = 0 and Tlevel < 1;
END;
END LOOP;
-- Generate Unique Path Table End
RETURN;
EXCEPTION when NO_DATA_FOUND then null;
END;
The table which is returned to the SProc is used in the following way, (MSSQL code, as am yet to migrate). Basically using some of the returned column values along with DB values to populate a second temp table
INSERT INTO #TmpR1 SELECT * FROM QueryCurrentWhy(@ColumnID, @GroupID, @Parents)
SET @Tlevel = 1
INSERT INTO @R
SELECT HKColumns.Columnid as ColID, HKColumns.Tableid as TblID, R1.Name as [Name], HKColumns.NounID AS KeyCompA, R1.ParentID AS KeyCompB, HKColumns.ColTypeID as ColTypeID, ColumnTypeName as ColType, 0 as HasWhats,
CASE WHEN R2.ColID is null
THEN 0
ELSE 1
END HasWhyParent,
0 as IsSelected
FROM HKColumns
INNER JOIN #TmpR1 AS R1
ON HKColumns.ColumnID = R1.ColID AND R1.Tlevel=@Tlevel
INNER JOIN HKColumnType
ON HKColumns.ColTypeID=HKcolumnType.ColumnTypeID AND HKColumns.ColTypeID=@PKColTypeID
LEFT JOIN #TmpR1 AS R2
ON R2.ID2 = R1.ID2 AND R2.Tlevel=@Tlevel+1 AND R2.ParentID=R1.ColID

Similar Messages

  • Help needed with printf function!!!!

    public class Try
    {public static void main (String[] args)
    {int a;
    String b;
    a = 000002;
    b = "JSmith";
    System.out.printf(b + "%d", a);
    }}I need a help with the printf function.
    The result of this small excercise that I just made is:
    Jsmith2
    How do I make it so that the zeros is also displayed? (using the printf)
    I want it to look like this: Jsmith000002
    Thank you in advance

    TrySystem.out.printf(b + "%06d", a);(I don't have a compiler here so I haven't tested this).
    The "6" is the width - the minimum number of characters that will be
    printed and the "0" (it's a zero) is a flag indicating that the output should
    be padded with zeros.
    You should also note that the value of a is two. It doesn't matter whether
    you say a=2; or a=0002; - a is still just plain two.

  • Help needed converting 2 Captivate projects...

    Hi,
    I have troubles with Captivate (another post on this forum) and was wondering whether someone would be willing to help in converting 2 captivate projects to .swf?
    I can provide a link to the files.
    Help wpuld be appreciated.

    Hi there
    I'll try to help.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Need help in using sleep function in pl/sql

    Hi,
    need help:
    I have a condition where i want to validate total_pass=total_fail and
    I want to use the sleep function in a pl/sql where i want to wait for 2 minutes ie.checking
    whether total_pass=total_fail based upon class_id .
    I have the data in the table as:
    CLASS_ID TOT_PASS TOT_FAIL
    1 10 10
    2 5 4
    3 6 6
    4 7 5
    Any help will be needful for me

    I'm not quite sure what you are lookg for here, but whatever it is, your code as posted won't do it. You will never break out of the WHILE r_Class.Tot_Pass = r_Class.Tot_Fail loop, since these values will never change because you never get the next record form the cursor.
    From your original data, it looks like your cursor will return multiple rows which implies to me that you want to fetch the first row from the cursor, check if tot_pass = tot_fail, if they are equal, sleep for two minutes then get the next row. This does not make sense to me. Once the select in the cursor is executed, the data it returns will not change due to Oracle's read consistency model, so there seems to me no point in the sleep.
    The other alternative I can see is that you want to check all the returned rows, and if tot_pass = tot_fail for one of the rows (or possibly for all of the rows), then you want to sleep and try again.
    If you can explain in words what it is you are trying to accomplish, someone will be able to point you to a solution.
    John

  • Help needed - ABAP for  function modules and routines.

    Dear BW gurus,
    Hope everyone is doing great.
    I gotta project recently and we are going live in 3 weeks.My BWLead is getting rolled out in a week and he has to make the knowledge transfer to me ASAP.The bottle-necking thing is I need to have a good idea about the function modules and routines.So I request our SND community to help me out with good ABAP documents for function modules,routines and query.
    my mail id is [email protected]
    Thanks in advance
    Have a nice day
    Regards
    sathiya

    Hello Sam,
    You can create function module in ABAP using tcode SE37.
    For more informations on ABAP:
    http://help.sap.com/saphelp_47x200/helpdata/en/c9/5472f6787f11d194c90000e8353423/frameset.htm
    Use http://help.sap.com
    and also use <b>ABAPDOCU</b> transaction.
    Check these links also...
    <b>Online PDFs:</b>
    http://easymarketplace.de/online-pdfs.php
    <b>ABAP HELP</b>
    If you check these links, you can find many example programs.
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sappoint.com/abap/
    FAQs in ABAP
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    Smart forms
    http://www.sap-basis-abap.com/sapsf001.htm
    Workflow
    <http://www.sap-img.com/workflow/sap-workflow.htm>
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Mail
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    SAP Scripts:
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    Some useful ABAP Links for learning:
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm
    BAPI-step by step
    http://www.sapgenie.com/abap/bapi/example.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    Web log for receive email and processing it through ABAP
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    For Logical database
    http://help.sap.com/saphelp_46c/helpdata/en/9f/db9bed35c111d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/EN/35/2cd77bd7705394e10000009b387c12/frameset.htm
    Useful link to websites
    http://www.hernangn.com.ar/sap.htm
    Useful for background
    http://www.sappoint.com/basis/bckprsng.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6f/08703713bf277ee10000009b38f8cf/frameset.htm
    http://publib.boulder.ibm.com/infocenter/wbihelp/index.jsp?topic=/com.ibm.wbix_adapters.doc/doc/mysap4/sap4x41.htm
    Table control in BDC
    http://www.sap-img.com/abap/bdc-example-using-table-control-in-bdc.htm
    For posting web log,
    /people/sap.user72/blog/2005/06/28/sdn-weblogs-making-it-easier
    Dynamic Internal table -web log in sdn
    /people/subramanian.venkateswaran2/blog/2004/11/19/dynamic-internal-table
    ALV
    http://www.geocities.com/mpioud/Abap_programs.html
    Mail
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    http://www.sapdevelopment.co.uk/reporting/email/attach_xls.htm
    BOM Explosion
    /people/prakash.singh4/blog/2005/05/15/explode-boms-in-enterprise-portal-using-htmlb-tree--part-1-abap
    BOM
    http://help.sap.com/saphelp_erp2005/helpdata/en/ea/e9b7234c7211d189520000e829fbbd/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/d1/2e4114a61711d2b423006094b9d648/frameset.htm
    http://www.sap-img.com/sap-sd/sales-bom-implementation.htm
    http://www.sap-basis-abap.com/sappp007.htm
    OLE
    http://www.sapgenie.com/abap/ole.htm
    http://help.sap.com/saphelp_46c/helpdata/en/59/ae3f2e488f11d189490000e829fbbd/frameset.htm
    ALVGRID with refresh
    http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html
    For language setting and decimal separator
    /people/horst.keller/blog/2004/11/16/abap-geek-7-150-babylonian-confusion
    Oracle queries
    http://sqlzoo.net/
    To format SQL
    http://www.sqlinform.com/
    SCOT settings
    http://www.sap-img.com/basis/basis-faq.htm
    Status Icon [ALV,Table Control,Tab Strip]
    http://www.sapdesignguild.org/resources/MiniSG-old/from_develop/norm_status_icons.htm#positioning_4
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    For multiMedia
    /people/thomas.jung3/blog/2005/05/11/using-classic-activex-controls-in-the-abap-control-framework
    Uploading LOGO in SAP
    http://www.sap-img.com/ts001.htm
    LSMW
    http://www.sap-img.com/sap-data-migration.htm
    http://www.sapgenie.com/saptech/lsmw.htm
    http://sapabap.iespana.es/sapabap/manuales/pdf/lsmw.pdf
    http://www.sap.info/public/INT/int/glossary/int/glossaryletter/Word-17643ed1d6d658821_glossary/L#Word-17643ed1d6d658821_glossary
    http://www.consolut.de/saphelp/sap_online_help.html
    http://www.sap-img.com/
    http://www.sappoint.com/
    http://www.sapdevelopment.co.uk/
    http://www.allsaplinks.com/idoc_search.html
    Best Regards,
    Thangesh

  • Help needed in Exporting tables data through SQL query

    Hi All,
    I need to write a shell script(ksh) to take some of the tables data backup.
    The tables list is not static, and those are selecting through dynamic sql
    query.
    Can any body tell help me how to write the export command to export tables
    which are selected dynamically through SQL query.
    I tried like this
    exp ------ tables = query \" select empno from emp where ename\= \'SSS\' \"
    but its throws the following error
    EXP-00035: QUERY parameter valid only for table mode exports
    Thanks in advance,

    Hi,
    You can dynamically generate parameter file for export utility using shell script. This export parameter file can contain any table list you want every time. Then simply run the command
    $ exp parfile=myfile.txt

  • Help needed in decode function

    I am trying to use decode function shown below
    select decode(deptid,(select deistinct dept_id from dept),'found') into id from student ;
    it shows error ORA 01427:single-row subquery returns more than one row.
    could you people help me resovle the issue.
    Thanks.

    Funny thing how many mistakes can be in one little line. I try to list what is wrong here. maybe it helps you to understand what is going on.
    select decode(deptid,(select deistinct dept_id from dept),'found') into id from student ;1) "deistinct" => wrong spelling "distinct"
    2) Uniqueness => the typical DEPT table has DEPT_ID as a primary key. So DISTINCT would do nothing here. "select distinct dept_id from dept" is the same as "select dept_id from dept".
    3) decode with a multi-row subquery => the decode function only accepts single values. e.g: ,"decode(deptid,(select max(dept_id) from dept),..." => THis is not really useful, just an example.
    4) decode without handling other values => it is better to say what should happen, when the values does not match. decode(deptid,:x,'found','notfound')
    5) select .. into ... from. => INTO is only used in a PL/SQL . So I assume this statement is part of a larger PL/SQL block. In that case "into id " is a problem. The select would return many values, but your ID variable could probably hold only one value.
    6) Identification of values => For all students that could be returned, you only would know 'found'. At least select the ID for the student too, else you wouldn't know which student was found. select id, 'found' ... from student.
    7) Don't select everthing and check for each row later. Select only relevent rows. That means do your checks in the WHERE clause of a select statement not in the SELECT clause. Example: "select id from student where dept_id in (select dept_id from dept);" Possible in this case is also a join "select student.id from student, dept where student.dept_id=dept.dept_id"
    8) referential integrity. Why do have to do this check anyway? On table student there should be a FK constraint, so that only values can be inserted where the DEPT_ID is correct. Then you select would be "select id from student;".

  • Help needed- Reg: Display page number in SQL Reports

    Hi,
    I need to display page number in " page no: X of Y " format where X is current page & Y is total number of pages. Now I am able to display only the current page using ' sql.pno '. but not able to display in ' X of Y ' format.
    Any inputs in this regard will be helpful.
    Thanks & Regards,
    Anilkumar.

    Hello Anil,
    If you have the above requirement for Oracle Reports then follow the steps:
    1.In the Paper Layout view or Paper Design view, choose InsertPage Number.
    2. In the Insert Page Number dialog box, choose from the list the location for the page number.
    3.Click the desired page number format: Page Number Only or Page Number and Total Pages.
    Cheers,
    Suresh

  • Need to make function  out of SQL

    It is always taxinig for me to write DDL? I have come up with a method but it requires that I know each fieldname of the table. Here is the DDL I've come up with:
    --------- CREATE  A TABLE
    CREATE TABLE  "MY_INV_MAIN"
          "STOREID" NUMBER NOT NULL
        , "BUSI_DATE" DATE NOT NULL
        , "PRIMARY_KEY" NUMBER NOT NULL
        , "CONF_NUMB1" NUMBER NOT NULL
        , ONF_NUMB2" NUMBER NOT NULL
    --===  INSERT DATA   INV_MAIN
    - -- Dates should be To_date functions
    INSERT INTO MY_INV_MAIN VALUES(141,'27-AUG-08',64143,12599.68,12599.68);
    INSERT INTO MY_INV_MAIN VALUES(141,'28-AUG-08',64160,0,0);
    INSERT INTO MY_INV_MAIN VALUES(141,'29-AUG-08',64222,3691.59,3691.59);
    INSERT INTO MY_INV_MAIN VALUES(141,'30-AUG-08',64224,0,0);
    INSERT INTO MY_INV_MAIN VALUES(141,'31-AUG-08',64273,22103.69,22103.69);
    INSERT INTO MY_INV_MAIN VALUES(141,'01-SEP-08',64322,3836,3836);
    INSERT INTO MY_INV_MAIN VALUES(141,'04-SEP-08',64380,5296.4,5296.4);
    INSERT INTO MY_INV_MAIN VALUES(141,'05-SEP-08',64410,0,0);
    INSERT INTO MY_INV_MAIN VALUES(141,'07-SEP-08',64496,22627.74,22627.74);
    INSERT INTO MY_INV_MAIN VALUES(141,'08-SEP-08',64559,10376.61,10376.61);
    INSERT INTO MY_INV_MAIN VALUES(141,'09-SEP-08',64575,2644.62,2644.62);
    INSERT INTO MY_INV_MAIN VALUES(141,'11-SEP-08',64627,5983.33,5983.33);
    INSERT INTO MY_INV_MAIN VALUES(141,'13-SEP-08',64677,7573.21,7573.21);
    INSERT INTO MY_INV_MAIN VALUES(141,'14-SEP-08',64743,22839.3,22839.3);
    INSERT INTO MY_INV_MAIN VALUES(141,'17-SEP-08',64817,11593.69,11593.69);
    INSERT INTO MY_INV_MAIN VALUES(141,'18-SEP-08',64835,2958.97,2958.97);
    INSERT INTO MY_INV_MAIN VALUES(141,'19-SEP-08',64869,3570.74,3570.74);
    INSERT INTO MY_INV_MAIN VALUES(141,'20-SEP-08',64896,0,0);
    INSERT INTO MY_INV_MAIN VALUES(141,'21-SEP-08',64984,0,0);
    INSERT INTO MY_INV_MAIN VALUES(141,'21-SEP-08',64992,21372.82,21372.82);
    INSERT INTO MY_INV_MAIN VALUES(141,'22-SEP-08',64995,2927.13,2927.13);
    INSERT INTO MY_INV_MAIN VALUES(141,'23-SEP-08',65021,2712.38,2712.38);
    INSERT INTO MY_INV_MAIN VALUES(141,'24-SEP-08',65038,0,0);
    INSERT INTO MY_INV_MAIN VALUES(141,'26-SEP-08',65091,6763.8,6763.8);
    INSERT INTO MY_INV_MAIN VALUES(141,'27-SEP-08',65130,4985.73,4985.73);
    INSERT INTO MY_INV_MAIN VALUES(141,'28-SEP-08',65197,24950.45,24950.45);
    INSERT INTO MY_INV_MAIN VALUES(141,'28-SEP-08',65199,4648.38,4648.38);
    INSERT INTO MY_INV_MAIN VALUES(141,'30-AUG-09',74146,18081.37,18081.37);
    INSERT INTO MY_INV_MAIN VALUES(141,'06-SEP-09',74253,17183.25,17183.25);
    INSERT INTO MY_INV_MAIN VALUES(141,'13-SEP-09',74454,17688.41,17688.41);
    INSERT INTO MY_INV_MAIN VALUES(141,'20-SEP-09',74599,18211.29,18211.29);
    INSERT INTO MY_INV_MAIN VALUES(141,'27-SEP-09',74722,16809.21,16809.21);
    --=== GENERATE INSERT STATEMENTS
    WITH MyTableColumns AS
        SELECT    TNAME  as tablename
               ,  CNAME  as columnname
    FROM COL
    where tNAME in ('MY_INV_MAIN')
    ORDER BY TNAME
    , Pivoted_Table as
    ( select    tablename
           ,  MAX(DECODE(columnname,   'STOREID',       columnname,  0 ))    STOREID
           ,  MAX(DECODE(columnname,   'BUSI_DATE',     columnname,  0 ))    BUSI_DATE
           ,  MAX(DECODE(columnname,   'PRIMARY_KEY',   columnname,  0 ))    PRIMARY_KEY
           ,  MAX(DECODE(columnname,   'CONF_NUMB1',    columnname,  0 ))    CONF_NUMB1
           ,  MAX(DECODE(columnname,   'CONF_NUMB2',    columnname,  0 ))    CONF_NUMB2
        FROM MyTableColumns
        group by tablename
    , MyInsertStatments as
       (SELECT    'INSERT INTO ' ||
              tablename ||
              ' VALUES ('   ||
              STOREID      || ',' ||
              BUSI_DATE    || ',' ||
              PRIMARY_KEY  || ',' ||
              CONF_NUMB1   || ',' ||
              CONF_NUMB2   || ') FROM  ' || tablename || ';'  as INSERT_CLAUSE
    FROM  Pivoted_table;
      END FUNCTION1) How can I write this code as a function
    FUNCTION ReturnInsertStatements(tablename in varchar2,
    delimitedStringOfColumns in varchar2 default null) as varchar2
    -- Reads columns of the table like in above SQL
    -- Generate Inserts
    And return a string of 'Create Table Code " & InsertStatements in a format (INSERT INTO MY_INV_MAIN VALUES(141,'27-SEP-09',74722,16809.21,16809.21);

    TheHTMLDJ wrote:
    Tubby wrote:
    Why would you want pl/sql code to do this? There are much more efficient tools with which to move data between databases.
    1. I was trying to flex my new knowledge of pivots.
    2) I found this one which seems pretty good except line wraps and makes inserts messy:
    http://www.idevelopment.info/data/Oracle/DBA_tips/PL_SQL/PLSQL_5.shtml
    Nothing i tried would prevent the problem. CAn you fix or do you have a suggestion on some other free tool. In the rare occasion i need to move data in this fashion (typically i'd be looking at data pump, imp/exp, database links, etc...) i just use [SQL Developer|http://www.oracle.com/technology/software/products/sql/index.html] which is free and actually pretty good (developer wise).
    >
    >
    Also as a tip, you should always specify the columns you're using in the INSERT.
    I don't see why that's necessary when you are populating all fields with data.Because if you create code to do this, how do you know the order of the columns in the table? At best you get lucky and get an ORA error (like trying to put a date in to a number field), at worst you put the wrong columns data into another column and it goes unnoticed.

  • Your help needed converting video to digital

    How do I convert video to digital using a G4 Powerbook, Canopus 300 & Imovie HD 6.0.4.
    Steps needed, please.
    I have VCR, G4 Powerbook, Canopus ADVC 300 and Ilife 08 and/or Imovie HD6.0.4.
    Another poster said I needed to purchase Ilife 08 to make it work, but after the software arrived, it required G5 hardware to fully install. Not happy with that.
    Is there a workaround? Please advise.

    Assuming that you have VHS tapes that you want to convert to digital to use in iMovie? Is that correct? If so, you can find helpful information in these threads:
    http://discussions.apple.com/thread.jspa?messageID=7138598&#7138598
    An older MacWorld article with step by step instructions:
    http://www.macworld.com/article/30972/2004/05/fromvhstodvd.html
    If you are trying to do something else, please post back.

  • Help needed with Map function in Lumira

    Hi,
    I've bee using Luira for lots of great tile charts and bar charts, but now I am looking to make use of the mapping visulization in Lumira.
    Bascially I want to get a count of the number of retail stores by state. 
    I uploaded my data , and some have been populated and looks nice (see first screenshot) , but for others the state is not found (see second screenshot).
    I have looked in the help documents, and some of the training, but have yet to find a solution.
    What I'd like to know is how I can fix the "unfound" states, or at least find out what is the source file which stores all the states?
    Above is the results so far, below is the missing states that I need to resolve. How can I fix for these "not found" states  or compare the format of my original excel data vs the data from Lumira.
    Alteratively if there is a way to match via post-code / zip-code please tell me how.
    Thanks,
    Paul

    Hi Paul,
    the geo-hierarchies take all cities that are greater than 100.000 for the name resolution and for the smaller ones you would need to use latitude/longitude information to get them resolved by Lumira.
    You can find mre information on how to use latitude/ longitude information from here:
    https://scn.sap.com/docs/DOC-33118
    Regards,
    Clarissa

  • Help need Convert SWF to AVI Video

    Hi plz help
    I have made presentation in flash cs4. I have one main file Index & loading rest all the files through LoadMovie.
    I  want to convert my presentation into AVI for video but when i export it  in avi so it converts in AVI but its not taking the file which m  loading externally & not even converting the movie clip.
    so please help me i want to convert my presentation SWF files to AVI.
    If anyone knows the free converter tool so plz tell me.
    Thanx

    I found a utility the other day that captures SWF playing.
    My flash pieces were to complex to use the Export too.
    Here's just one utility out there.
    iWisoft Flash SWF to Video Converter

  • Help needed with analytical function

    I want to get the employee details of the highest and 2nd highest salaried employee in a particular department. But also the department should have more than 1 employee.
    I tried the query and it gave me proper results. But I'm wondering if there is some other alternative than using the subquery.
    Here is the table and the result query :
    with t as
    select 1 emp_id,3 mgr_id,'Rajesh' emp_name,3999 salary,677 bonus,'HR' dpt_nme from dual union
    select 2 ,3 ,'Gangz',4500,800,'Finance' from dual  union
    select 3 ,4 ,'Sid',8000,12000,'IT' from dual  union
    select 4 ,null,'Ram',5000,677,'HR' from dual  union
    select 5 ,4,'Shyam',6000,677,'IT' from dual union
    select 6 ,4 ,'Ravi',9000,12000,'IT' from dual  
    select * from
    (select emp_id, mgr_id, emp_name, dpt_nme, salary, row_number() over (partition by dpt_nme order by salary desc) rn from t where dpt_nme in
    (select dpt_nme from t group by dpt_nme having count(*) > 1)) where rn < 3

    Hi,
    You need a sub-query, but you don't need more than that.
    Here's one way to eliminate the extra sub-query:
    WITH     got_analytics     AS
         SELECT  emp_id,     mgr_id,     emp_name, dpt_nme, salary
         ,     ROW_NUMBER () OVER ( PARTITION BY  dpt_nme
                                   ORDER BY          salary     DESC
                           )         AS rn
         ,     COUNT (*)     OVER ( PARTITION BY  dpt_nme
                                       )         AS dpt_cnt
         FROM     t
    SELECT  emp_id,     mgr_id,     emp_name, dpt_nme, salary
    ,     rn
    FROM     got_analytics
    WHERE     rn     < 3
    AND     dpt_cnt     > 1
    ;Analytic functions are computed after the WHERE clause is applied. Since we need to use the results of the analytic ROW_NUMBER function in a WHERE clause, that means we'll have to compute ROW_NUMBER in a sub-query, and use the results in the WHERE clause of the main query. We can call the analytic COUNT function in the same sub-query, and use its results in the same WHERE clause of the main query.
    What results would you want if there's a tie for the 2nd highest salary in some department? For example, if you add this row to your sample data:
    select 7 ,3 ,'Sunil',8000,12000,'IT' from dual  union? You may want to use RANK instead of ROW_NUMBER.

  • Help needed for Instr function

    Hi,
    I using instr function to find the delimiter '|' .the function does retrives value , if the character contains
    special charcater. (i.e)INSTR('Carán|','|',1,6) returns
    only zero as the value , which is not correct. kindly suggest me some solution for the above problem.
    Thanks in advance.

    By INSTR('Carán|','|',1,6) , you are trying to find location of 6th occurance of special character '|' . Since there is no such occurence, it is returning 0.
    sql> select instr('Caran|','|') from dual;
    INSTR('CARAN|','|')
    6
    Thanks

  • Help needed converting 2 graphics

    http://www.nexuspoint.ca/Graphics/prisma.ai
    and
    http://www.nexuspoint.ca/Graphics/star.eps
    The only image editing software I have is Fireworks which
    sees these files
    as flattened bitmaps. Can anyone out there convert them for
    me to a
    FW-ready png with vectors etc.?
    Hopefully,
    Kathie

    Thanks so much for this, Linda. My life just became a whole
    lot easier!
    I am having a very hard time explaining to my client what
    format it is that
    I need these images in. I'm getting the feeling that I should
    really have
    more than just 1 graphics app. in order to do web design.
    Because I only do
    this as a sideline, and usually pro bono for charities, it's
    hard to justify
    the expenditure.
    Hopefully the client will agree to pay to have the starburst
    recreated.
    Regards
    Kathie
    "Linda Rathgeber" <[email protected]> wrote in
    message
    news:gn4ofg$31f$[email protected]..
    > Kathie McLaughlin wrote:
    >>
    http://www.nexuspoint.ca/Graphics/prisma.ai
    and
    >>
    http://www.nexuspoint.ca/Graphics/star.eps
    >>
    >> The only image editing software I have is Fireworks
    which sees these
    >> files as flattened bitmaps. Can anyone out there
    convert them for me to
    >> a FW-ready png with vectors etc.?
    >
    > The prisma.ai graphic can be converted to FW ones. I
    find that the easiest
    > way to get AI vectors into FW is to open it in AI, and
    then copy and paste
    > into a new FW document. Here's the result.
    >
    >
    http://www.playingwithfire.com/prisma.png
    >
    > The star.eps image is a bitmap and, as Joey said, would
    need to be
    > recreated in vector format.
    >
    >
    > --
    > Linda Rathgeber - Adobe Community Expert
    >
    http://www.adobe.com/communities/experts/members/8.html
    >

Maybe you are looking for

  • Macbook makes chirping sound? Is it a faulty hard drive?

    My late 2008 macbook's hard drive makes a pretty loud chirping sound when I open the programs Pro Tools or Adobe Photoshop. The beachball pops up and the HD "chirps" and the computer freezes for around 10 minutes and then all of a sudden it starts wo

  • Homogeneous system copy for 4.7.x.1.1 windows/oracle 9.2.0.3.0

    I plan Homogeneous system copy for 4.7.x.1.1 windows/oracle at a customer downloaded tools(do I have to put extracted files on the sorce machine in kernel directory?): MIGMON_2-20001410 MIGMON_2-20001410.SAR MIGTIME_2-20001410 MIGTIME_2-20001410.SAR

  • Anyone connected a Samsung BD-C6500 blu ray to Airport Extreme?

    Hi all I have reached the end of my rope trying to this to work. I have gotten the blu ray to see the network, and get to gateway ping - but then nothing. I read that the apple extreme password is not quite up to snuff so I increased the length of th

  • Event ID 13568 With Only One Domain Controller

    I had two domain controllers in an SBS 2003 domain.  The very first installed domain controller died.  So I seized the FSMO roles and eventually removed it from the domain by cleaning up the metadata.  I told my bosses that we really needed a new ser

  • Iphone 5C cannot connect 3G

    Hello guys, my iphone 5C, model a1456 , Me545J/a I have 3G connect above IOS 8.02 . and i will update IOS 8.1  using DFU -> Shift + restore My iphone does not appear 3G, but only E . I change connect 3G or LTE but not oke, i configured 3G my country