Storing ROWID in a ROW_ID field.

I'm attempting to restore a ROWID after an import/export and i'm unsure if this is the correct way to it. As well i think there may be something wrong with my function that restores the poper ROWID's. Is there a better way to do this? Is my function correct?
Here is the code i'm trying to use to restore the ROW_ID field after an export/import:
create or replace PROCEDURE FIXROWID AS
BEGIN
declare
cursor cur_t is SELECT * FROM SLC_TILLAGE_LANDFORM;
rec_tillage SLC_TILLAGE_LANDFORM%rowtype;
begin
open cur_t;
loop
fetch cur_t into rec_tillage;
UPDATE SLC_TILLAGE_LANDFORM
SET ROW_ID = ROWID
WHERE PROVINCE = rec_tillage.PROVINCE AND
SL = rec_tillage.SL AND LANDFORM = rec_tillage.LANDFORM;
COMMIT;
exit when cur_t%notfound;
end loop;
end;
END FIXROWID;
Here is the table in question:
PROVINCE VARCHAR2(2 BYTE)     
SL     NUMBER
LANDFORM VARCHAR2(50 BYTE)     
LANDFRM_EX VARCHAR2(11 BYTE)          
TEL     NUMBER(6,1)     
ROW_ID     ROWID          
LE_CODE     NUMBER(1,0)          
LANDPROP NUMBER(5,2)

use it to update a field quicklyUpdating using rowid? That's scary. Hope you know that there is a possibility that the rowid can change. Anyway in your case you must just need a simple UPDATE.
UPDATE SLC_TILLAGE_LANDFORM
SET ROW_ID = ROWID;

Similar Messages

  • How/where to get the values stored in these two structure fields?

    hi
       need your help to find out where the following two fields get stored in tables...or is there any fm or bapi to get the data stored in these two fields?
    1) Create Scheduling agreement:
    Tcode: ME31L
    Field label - Agreement type
    Field name - EVART
    Structure - RM06E
    2) Purchase order display:
    Tcode: ME23
    Provide any Purchase order craeted already (where release strategy is implemented)
    Select the line item & click release strategy icon at the top.
    You will find a new pop-up menu. In that place the cursor on the startegy code like
    Final release or XX or etc.
    Field name - ANZEF
    Structure - RM06B
    Sathish. R

    Hello Sathish:
    1) EKKO-BSART
    Regards,
    John.

  • Where are the address stored from the Mail To field

    In the Mail app you have in the To field recently used addresses. The most of these addresses are not stored in my Addressbook. Can anyone tell my where the recently used addresses are stored?

    I had the same question and appreciated your answer.
    I recently had to reload one of my computers from scratch due to a dead disk. I wanted to duplicate my address and mail from one computer onto the other. I transfered the file you mentioned along with the rest of the address book files, mail files and mail cache. Interestingly, the address book files and recent recipients data ends in 2007. No address that were sent to or address that were added after 2007 [the year] appear. In fact, the file you noted says it was last opened in 12/07
    Any ideas?

  • Storing Cost Centres as Text Fields

    I have a problem at a client with cost centres. They have cost centres that are numeric some of which are prefixed with leading zeroes, some not-for example 12345 and 0012345. These are two distinct cost centres, but due to the formatting on the KOSTL field SAP tries to store both as 0000012345. This means that one of the cost centre creates will reject. Is there any way of storing these cost centres as text within KOSTL, so that both can be stored.
    Thanks

    >
    ARINSO International wrote:
    > Thanks Rob,
    >
    > This is something that we have considered already however there are other elements that are effected by this so we are still looking for other options.
    >
    > Thanks
    I don't think that there are any other options.  Unless you want to try modding the SAP standard to remove the KOSTL conversion exit (only kidding - don't do this).

  • Storing variable in a hidden field

    HI,
    I've created an HTML form with drop downs. I'm storing the
    values of each option in a variable called currentvalue.
    Currentvalue keeps a running total and displays it on the page. I
    want to store the variable currentvalue in a hidden field to pass
    the value to the next HTML page. How can I do this?
    I'm using JavaScript for this application becuse I can't use
    any server side code since the application will be distributed on a
    CD.
    Thanks,

    Thanks MikeL7 for your code.
    I'm not sure about "var currentvalue = 9;" is that a fixed
    value that you've shown as an example?
    My currentvalue is a variable that is keeping a running total
    of the the values selected from each drop down. I need to capture
    the value of this running total into my hidden field that I can
    then pass on to page 2.
    I hope I'm making sense here.
    Thanks,

  • Looking for a value in a list stored in a database table field

    Hello,
    I have a field in a database table that contains a comma
    separated list on numbers. In my CFQUERY I am attempting to extract
    records from the database table where a parsed number is present in
    the comma separated list. I have tried the code below, but it is
    throwing an error.
    variables.publicationID is the number that I am looking for
    in the database table field.
    publicationList is the name of the database table field
    containing the comma separated list of numbers.
    where <cfqueryparam value="#variables.publicationID#"
    cfsqltype="cf_sql_integer"> in publicationList
    Can anybody help?
    Many thanks,
    smnbin

    The only way to do it with the data model you currently have
    is as follows:
    WHERE publicationList LIKE '#variables.publicationID#' OR
    publicationList LIKE '#variables.publicationID#,%' OR
    publicationList LIKE '%,#variables.publicationID#,%' OR
    publicationList LIKE '%,#variables.publicationID#'
    You need to check for 4 cases:
    it's the only ID in the list
    it's the first ID in the list
    it's in the middle of the list
    it's the last ID in the list.
    The better solution would be to replace this comma-delimited
    list with a mapping table, where each row in this mapping table
    contains a reference to the main table as well as a single
    publicationID.

  • Can't access a value stored in a form text field

    I created a small test page to try and understand how a piece of javascript works, well actually it's not working. All I'm trying to do is display the value entered in a text field in a form and it's failing with 
    SCRIPT5007: Unable to get value of the property 'value': object is null or undefined 
    temp.php, line 39 character 1
    The line it's failing on is this
    x = document.getElementById("otherChoice").value;
    The page can be seen here www.hollisterairshow.com/temp.php
    I just don't understand why it thinks the text field is undefined when it clearly is. I'm using DW CS4 and IE9.
    Thanks for any pointers you might have.
    Tony

    Thank you so much, I've been struggling with this for almost a week now.
    Just to complete the answer, I had to assign an ID to the text field and also to the "Other" button so that the JS could access both when it moved the value from the text field to the Button which was the original problem I was trying to solve.
    Thanks again for the assistance, much appreciated.
    Tony

  • Project Center - How to Update / Correct the URL/Link stored in the Project Name field.

    In the Project Center list, the link in the "Project Name" field for some projects take you the the project details page and some display the project schedule. How can I update/correct the links to display the project schedule?

    Reason for this behavior is your enterprise project template which your project manager used for creating project.
    We create Enterprise project template, associate PDP , Schedule, workflow according to our need then we use these Enterprise project template for project creation.
    In your case some of the project manager must have used basic template( default template) for some project, Custom Enterprise template for some project and f you are using workflow then workflow template for some project, that is why you are able to see
    PDP page first for some project and Schedule page for some project. 
    In order to change it you can change default PDP as schedule for Enterprise project template then open project save and publish them.
    kirtesh

  • Storing comment in a text field

    Hello everyone. Hope you are all well.
    Have a bit or of a problem.
    I have imported and XML file and using the code below i am
    able to store comments against a particular node.
    //istener object for tree
    var lo:Object = new Object();//a custom object called "lo" is
    created.
    lo.change = function(evtObj:Object):Void{
    var itm:Object = mytree.getSelectedItem();
    if(itm.savedComment != undefined)
    newcomment.text = itm.savedComment;
    else
    newcomment.text = "";
    mytree.addEventListener("change",lo);//everytime the tree
    component generates a change event
    //from the user selecting a different node the listener code
    runs.
    //listener object for submit button
    var lo2:Object = new Object();
    lo2.click = function(evtObj:Object):Void{
    var itm:Object = mytree.getSelectedItem();
    itm.savedComment = newcomment.text;
    addCommentbtn.addEventListener("click",lo2);
    All i need now is that whenever the user clicks on a button
    ("viewComment") ALL the comments already submitted are presented in
    a dynamic text field.
    ANy help is much appreciated. Thanks.

    This method works for a Text Field but can you text wrap and expand to fit the height of a cell that is a Drop-down List. The Expand to fit check box on the Layout palette is greyed out for all my Drop-down boxes. I have also tried using the following JavaScript:
    var newHeight = xfa.layout.h(DropDownList, "in");
    Textbox.h = newHeight + "in";
    but it doesn't work. Any suggestions?

  • Returned fields are not showing up under stored procedure

    First I would like to say I haven't used crystal reports before.
    I created a crystal report in VS2008 and under Database fields I pointed to my stored procedure. The parameter fields show up but there are no return fields under the stored procedure. I tested the SP in SQL Management Studio and it works correctly and returns the correct fields. When selecting the SP I tried unselecting "Set to Null Value" for each of the parameters and entered values I knew would return fields and the fields show up under the SP but they are filled with the data from the parameters I used. Which I would expect. If I go back to using null, the fields disappear.
    I also had this problem when I updated another Report after adding a new field to be returned from a SP. I fiddled around with it and got it working but not sure how or why it saw the fields when I got it working.
    And today I updated a stored procedure to use a string parameter and not an integer parameter. After I updated the SP in VS2008 using the field explorer, the return fields disappear. What am I doing wrong?

    Hi Don,
    Thanks for the reply. I verified the database multiple times before posting and just verified it again. No luck. Also the SP has only one select.
    I found some crystal report cds with 8.5 (the newest I could find), I installed it and tried to use the SP and it gave me the following error:
    "There are no return fields in the file". VS2008 does not give this error.
    I tried using crystal reports with all the SPs I altered and I get the same error. Most of the changes to the SPs are in the where cause (Changing from field = @field to field IN (@fields) and changing a parameter from an int to a string. Also as a side note, when setting up the data source I am choosing to use nulls. Is this correct? The SPs were all written using SQL string format if that makes any difference.
    UPDATE: I tried using discree values that I knew would return values and the return fields show up. They are populated with the expected values but if I use these values all my reports will be the same. As I would expect. So why doesn't it work for NULL values? Maybe my thinking is wrong here but isn't null values used so you can dynamically select values for the parameters at runtime?
    Edited by: Kenshinofkin on May 12, 2011 7:01 PM

  • How do I write a select statement to see if table field is in variable list

    I was wondering if someone knew the best way to write a query to pull back rows where a table field is found in a a variable string.  I'm using Cold Fusion 10 on Microsoft SQL Server.
    The table has a series of fields such as
    carcode          carname
    G                Garage
    C                Carport
    A               Attached
    D               Detached
    And another query pulls back a field that stores as text all the abbreviations that apply
    I want to pull back all the carnames that would match the abbreviations stored in that field.  I thought I could use a contains line but that does not work.  How do I pull back matches against a variable string... I tried an IN statment but that didn't work.
    CFQUERY...
    Select carname from CarTable WHERE CONTAINS (carcode, '#query.carlist#') does not work. 
       select carname from CarTable WHERE CONTAINS(carcode, 'G,A')
    I'm stumped.  The list of abbreviations could be very LOOOONG or short and I just need to translate those abbreviations into the full names by grabbing it from another table.  It isn't just one abbreviation so I can't use LIKE in the one to one sense.
    Thank you so much.

    If you have records with these values,
    G,A
    0
    then your first mistake is that you designed your database poorly.  Storing lists in a single field is essentially stroring unuseable data.  A one to many relationship is better.  If you don't know what that is, I've heard good things about the book, Database Design for Mere Mortals.
    Next, this syntax, #queryname.car_storage#, only returns the first record.  To get all the records, use the valuelist function.
    Next, in sql, if you have a list of strings, each one has to be quoted.  Something like this.
    where myfield in ('a', 'b', 'c')
    The best way to achieve this in ColdFusion is to use the cfqueryparam tag with the list attribute set to yes.

  • How can I create files from Documents stored in a longraw via OLE

    Hello,
    we use forms 6 in client-server-mode and store documents (pdf, tif, doc ... all is possible) in a longraw using an OLE-container.
    Actually I develop a new application which has to exchange document-files with other servers.
    Is there a simple way to generate files from this long raw?
    What does this OLE do to my file before storing it in the long field.
    Is this OLE still a good format?
    The migration to webforms could be a good opportunity to change something ...
    Maybe we better store the files in the file-system and show them with the show_document procedure.
    Wolfram

    Set your export type to Hard Disk and export to a folder on your hard-drive, and optionally re-import those exported JPGs using a checkbox on the Export panel. 
    When I do exports like this I typically put them in a subfolder of the raw files rather than physically mixed into the raw files, themselves.  If I want to see the raws and jpgs mixed together I can just enable Show Photos in Subfolders.

  • SQL Server 2008 R2 - Report Builder 3.0 - timeout using shared data source and stored procedure

    I select the shared datasource from the data source propeties dialog, test the connection and everything is good.
    I add a dataset by selecting "use a dataset embedded in my report" option within the Dataset properties dialog.
    I select the newly added data source, click the "Stored procedure" query type and drop down the list box and select my intended stored procedure.
    the timeout for the dataset is "0" seconds.
    I click the "OK" button and I'm presented with the parameters to the stored procedure.
    I enter valid data for the parameters and click the "OK" button.
    I then get the following error message after 30 seconds:
    The problem is, all of the timeouts, that I'm aware of, have values of zero (no timeout) or high enough values that 30 seconds isn't even close to the timeout.
    I think the smallest timeout we have is 120 seconds.
    I have searched this site and many others and the solutions all involve altering the stored procedure to get the fields into report builder and then revert the stored procedure back to its original form.
    To me, this is NOT a solution.  
    I have too many stored procedures that need to be brought into Report Builder.
    I need a real solution.
    Thank you for you time, Tim Caldwell.
    Timothy E Caldwell

    I don't mean to be rude, but really, check to see if the stored procedure can return data rows???
    Maybe I'm not being clear enough.
    The stored procedure runs perfectly fine.
    it runs perfectly fine in the production environment and the test environment.
    I can access the stored procedure in several ways and have it return correct data.
    I can even trick report builder into creating a dataset with parameters and run the stored procedure that way.
    What I cannot do, is to get report builder to not timeout after 30 seconds on the initial creation of a dataset with a Query type of stored procedure.
    I have seen this issues posted again and again and again on may different sites and the "solution" is to simplifiy the stored procedure by creating a stored procedure that has a create table and a select in the stored procedure and that's it.  After
    report builder creates the dataset the developer then has to replace the simplified stored procedure with the actual stored procedure and everything works fine after that.
    HOWEVER, having to go through this process for 70 or more stored procedures is ridiculous.
    It would appear that there is something within report builder itself that is causing this issue.
    The SQL Script included is an example of a stored procedure that will not create fields create a dataset with fields and parameters in Report Builder 3.0:
    USE [CRUM_IT]
    GO
    /****** Object: StoredProcedure [dbo].[COGNOS_Level5ScriptSP] Script Date: 11/17/2014 08:02:26 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER procedure [dbo].[COGNOS_Level5ScriptSP]
    @CompanyCode varchar(8) = null,
    @GetSiblings varchar(1) = 'N'
    as
    Begin
    -- get emergency contact info
    select *
    into #tmp_Contacts
    from
    (select
    ConEEID,
    con.connamelast as [Emer Contact Last Name],
    con.connamefirst as [Emer Contact First Name],
    con.connamemiddle as [Emer Contact Middle Initial/Name]--,
    ,ROW_NUMBER() over (Partition by ConEEID order by ConNameLast)as rn
    ,ISNULL(
    case when con.conphonepreferred = 'H'
    then '(' + substring(con.conphonehomenumber, 1, 3) + ')' + substring(con.conphonehomenumber, 4, 3) + '-' + substring(con.conphonehomenumber, 7, 4)
    else '(' + substring(con.conphoneothernumber , 1, 3) + ')' + substring(con.conphoneothernumber , 4, 3) + '-' + substring(con.conphoneothernumber , 7, 4)
    end,
    ) as [Emergency Phone]
    from [ultiprosqlprod1].[ultipro_crum].dbo.Contacts con
    where con.ConIsEmergencyContact='y'
    and con.ConIsActive='y'
    ) A
    where A.rn = 1
    CREATE TABLE #tmp_CompanyCodes (CompanyCode varchar(8))
    If @GetSiblings = 'Y'
    Begin
    INSERT INTO #tmp_CompanyCodes (CompanyCode)
    EXEC [z_GetClientNumbers_For_ParentOrg_By_ClientNumber] @CompanyCode
    End
    INSERT INTO #tmp_CompanyCodes
    values (@CompanyCode)
    select *
    into #tmp_Company
    from [ultiprosqlprod1].[ultipro_crum].dbo.Company
    where cmpcompanycode in (select CompanyCode from #tmp_CompanyCodes)
    select distinct
    cmpcompanycode as [Client ID],
    CmpCompanyDBAName as [Client Name],
    eec.eecEmplStatus AS [Employment Status],
    eec.eecEmpNo AS [Employee Num],
    rtrim(eep.eepNameLast) AS [Last Name],
    rtrim(eep.eepNameFirst) AS [First Name],
    isnull(rtrim(ltrim(eep.eepNameMiddle)), '') AS [Middle Initial/Name],
    rtrim(eep.eepAddressLine1) AS [Address Line 1],
    isnull(rtrim(eep.eepAddressLine2), '') AS [Address Line 2],
    eep.eepAddressCity AS [City],
    eep.eepAddressState AS [State],
    CASE
    WHEN len(eep.eepAddressZipCode) > 5 and charindex(eep.eepAddressZipCode, '-', 1) = 0
    THEN substring(eep.eepAddressZipCode, 1, 5)
    ELSE rtrim(eep.eepAddressZipCode)
    END AS [Zip code],
    CASE
    WHEN len(eep.eepAddressZipCode) > 5 and charindex(eep.eepAddressZipCode, '-', 1) = 0
    THEN substring(eep.eepAddressZipCode, 6, 4)
    WHEN len(eep.eepAddressZipCode) > 5 and charindex(eep.eepAddressZipCode, '-', 1) > 0
    THEN substring(eep.eepAddressZipCode, charindex(eep.eepAddressZipCode, '-', 1) + 1, 4)
    WHEN len(eep.eepAddressZipCode) <= 5
    THEN ''
    END AS [ZIP + 4],
    substring(eep.eepSSN, 1, 3) + '-' + substring(eep.eepSSN, 4, 2) + '-' + substring(eep.eepSSN, 6, 4) AS [SSN],
    isnull(convert(VARCHAR(10), eep.eepDateOfBirth, 101), '') AS [Date Of Birth],
    eetFED.TAXCODE AS [FED Tax Code],
    eetFED.FILINGSTATUS AS [Fed Filing Status],
    eetFED.EXEMPTIONS AS [Fed Exemption Allowance],
    eetFED.ADDITIONAL AS [Additional Fed Withholding],
    eetSIT.TAXCODE AS [SIT Tax Code],
    eetSIT.FILINGSTATUS AS [State Filing Status],
    eetSIT.EXEMPTIONS AS [State Exemption Allowance],
    eetSIT.ADDITIONAL AS [Additional State Withholding],
    isnull('(' + substring(eep.eepPhoneHomeNumber, 1, 3) + ')' + substring(eep.eepPhoneHomeNumber, 4, 3) + '-' + substring(eep.eepPhoneHomeNumber, 7, 4), '') AS [Home Phone],
    isnull((SELECT cod.codDesc
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.Codes cod WITH (NOLOCK)
    WHERE cod.codCode = eep.eepEthnicID
    AND cod.codDosTable = 'ETHNICCODE'), '') AS [Race-Origin], --eep.eepEthnicID AS [Race-Origin],
    eep.eepGender AS [Gender],
    isnull(convert(VARCHAR(10), eec.eecDateOfOriginalHire, 101), '') AS [Original Hire Date],
    isnull(convert(VARCHAR(10), eec.eecDateOfSeniority, 101), '') AS [Seniority Date],
    isnull(convert(VARCHAR(10), eec.eecDateOfTermination, 101), '') AS [Termination Date],
    isnull(eecTermType,'') as [Termination Type],
    isnull(TchDesc, '') as [Termination Reason],
    rtrim(eec.eecJobCode) AS [WC Code],
    isnull(eec.eecJobTitle, '') AS [Job Title],
    pgr.pgrPayFrequency AS [Pay Frequency],
    eec.eecFullTimeOrPartTime AS [Full/Part Time],
    eec.eecSalaryOrHourly AS [Pay Type],
    isnull(convert(MONEY, eec.eecHourlyPayRate), 0.00) AS [Hourly Rate],
    isnull(eec.eecAnnSalary, 0.00) AS [Annual Salary],
    [YTD Hours],
    isnull(eep.eepNameFormer, '') AS [Maiden Name],
    eec.eecLocation AS [Location ID],
    rtrim(eec.eecOrgLvl1) AS [Department ID],
    eec.eecorglvl2 AS [Cost Item],
    eec.eecorglvl3 as [Client Project],
    eec.eecPayGroup as [Pay Group],
    isnull(eepAddressEMail,' ') as [Email Address],
    isNull(BankName1,' ') as PrimaryBank,
    isNull(BankRoute1,' ') as PrimaryRouteNum,
    isNull(Account1,' ') as PrimaryAccount,
    isNull(AcctType1,' ') as PrimaryAcctType,
    isNull(DepositRule1,' ') as PrimaryDepositRule,
    isNull(BankName2,' ') as SecondaryBank,
    isNull(BankRoute2,' ') as SecondaryRouteNum,
    isNull(Account2,' ') as SecondaryAccount,
    isNull(AcctType2,' ') as SecondaryAcctType,
    isNull(DepositRule2,' ') as SecondaryDepositRule,
    isNull(
    CASE
    WHEN DepositRule2 = 'D'
    THEN '$' + convert(varchar, cast(EddAmtOrPct2 AS decimal(10,2)))
    WHEN DepositRule2 = 'P'
    THEN convert(varchar, cast((EddAmtOrPct2*100) AS decimal(10,0))) + '%'
    ELSE null
    END,' ') as SecondaryDepositAmount,
    isNull(BankName3,' ') as ThirdBank,
    isNull(BankRoute3,' ') as ThirdRouteNum,
    isNull(Account3,' ') as ThirdAccount,
    isNull(AcctType3,' ') as ThirdAcctType,
    isNull(DepositRule3,' ') as ThirdDepositRule,
    isNull(
    CASE
    WHEN DepositRule3 = 'D'
    THEN '$' + convert(varchar, cast(EddAmtOrPct3 AS decimal(10,2)))
    WHEN DepositRule3 = 'P'
    THEN convert(varchar, cast((EddAmtOrPct3*100) AS decimal(10,0))) + '%'
    ELSE null
    END,' ') as ThirdDepositAmount,
    Supervisor,
    eec.eecEEID AS [Employee EEID],
    eec.EecJobCode As [Job Code],
    isnull(eec.EecTimeclockID,' ') As [Time Clock ID],
    con.[Emer Contact Last Name],
    con.[Emer Contact First Name],
    con.[Emer Contact Middle Initial/Name],
    con.[Emergency Phone]
    from [ultiprosqlprod1].[ultipro_crum].dbo.empPers eep WITH (NOLOCK)
    inner join [ultiprosqlprod1].[ultipro_crum].dbo.empComp eec WITH (NOLOCK)
    ON eep.eepEEID = eec.eecEEID
    inner join #tmp_Company cmp WITH (NOLOCK)
    ON eec.eecCOID = cmp.cmpCOID
    inner join [ultiprosqlprod1].[ultipro_crum].dbo.PayGroup pgr WITH (NOLOCK)
    ON eec.eecPayGroup = pgr.pgrPayGroup
    left outer join [ultiprosqlprod1].[ultipro_crum].dbo.TrmReasn
    on tchCode = eecTermReason
    left join (select CAST(sum(isnull(eee.eeeYTDHrs,0.00))AS DECIMAL(18,2)) as [YTD Hours],
    eeeEEID,
    eeeCOID
    from [ultiprosqlprod1].[ultipro_crum].dbo.EmpEarn eee with (NOLOCK)
    group by eeeCOID,eeeEEID)eee
    on eec.eecEEID = eee.eeeEEID
    and eec.eecCOID = eee.eeeCOID
    left join (SELECT eetCOID AS COID,
    eetEEID AS EEID,
    eetTaxCode AS TAXCODE,
    eetFilingStatus AS FILINGSTATUS,
    eetExemptions AS EXEMPTIONS,
    eetExtraTaxDollars AS ADDITIONAL
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.empTax WITH (NOLOCK)
    WHERE eetTaxCode = 'USFIT'
    )eetFED
    ON eec.eecCOID = eetFED.COID
    and eec.eecEEID = eetFED.EEID
    left join (SELECT eetCOID AS COID,
    eetEEID AS EEID,
    eetTaxCode AS TAXCODE,
    eetFilingStatus AS FILINGSTATUS,
    eetExemptions AS EXEMPTIONS,
    eetExtraTaxDollars AS ADDITIONAL
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.empTax WITH (NOLOCK)
    WHERE eetTaxCode like '%SIT'
    AND eetIsWorkInTaxCode = 'Y'
    )eetSIT
    ON eec.eecCOID = eetSIT.COID
    and eec.eecEEID = eetSIT.EEID
    left outer join (SELECT eddCOID,
    eddEEID,
    eddEEBankName BankName1,
    eddEEBankRoute BankRoute1,
    eddAcct Account1,
    EddAcctType AcctType1,
    EddDepositRule DepositRule1,
    EddAmtOrPct EddAmtOrPct1
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.EmpDirDp WITH (NOLOCK)
    WHERE eddSequence = '99')edd
    ON eec.eecCOID = edd.eddCOID
    and eec.eecEEID = edd.eddEEID
    left outer join (SELECT eddCOID,
    eddEEID,
    eddEEBankName BankName2,
    eddEEBankRoute BankRoute2,
    eddAcct Account2,
    EddAcctType AcctType2,
    EddDepositRule DepositRule2,
    EddAmtOrPct EddAmtOrPct2
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.EmpDirDp WITH (NOLOCK)
    WHERE eddSequence = '01')edd2
    ON eec.eecCOID = edd2.eddCOID
    and eec.eecEEID = edd2.eddEEID
    left outer join (SELECT eddCOID,
    eddEEID,
    eddEEBankName BankName3,
    eddEEBankRoute BankRoute3,
    eddAcct Account3,
    EddAcctType AcctType3,
    EddDepositRule DepositRule3,
    EddAmtOrPct EddAmtOrPct3
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.EmpDirDp WITH (NOLOCK)
    WHERE eddSequence = '02')edd3
    ON eec.eecCOID = edd3.eddCOID
    and eec.eecEEID = edd3.eddEEID
    left outer join (SELECT eecCOID,
    eecEEID,
    rtrim(eepNameLast) + ', ' +
    rtrim(eepNameFirst) + ' ' +
    isnull(rtrim(ltrim(eepNameMiddle)), '') AS [Supervisor]
    FROM [ultiprosqlprod1].[ultipro_crum].dbo.EmpComp WITH (NOLOCK)
    join [ultiprosqlprod1].[ultipro_crum].dbo.EmpPers with (NoLock)
    on eeceeid = eepeeid)eec2
    ON eec.eecSupervisorID = eec2.eecEEID
    left outer join #tmp_Contacts con
    on eep.eepEEID = con.ConEEID
    order by [Client ID],
    [Last Name],
    [First Name]
    drop table #tmp_Contacts
    END
    Timothy E Caldwell

  • Some SQL fields not showing data in Crystal XI R2

    I have a report that is using a stored procedure.  In this stored procedure we have many fields that are being passed over to Crystal.  A small portion of these fields do not show any data when you browse them in Crystal.  But when you check on the SQL Server 2005 side, they contain data.  So we know that the issue is probably on the Crystal side because there is data on the SQL side.
    I originally thought that the problem may be caused by Null values in the database, but I used Crystal to convert the Null's to numeric zero if it was a number, and still there was no data showing up.
    Also in the stored procedure, we are passing 2 parameters a start and end date.   But that seems irrelevent to why some of the fields are not containing data like they should.
    Why would some fields show no values at all, and some fields shows values? 
    Any ideas on how to correct this situation so data will show up for all the fields like they are suppose too?
    Thanks everyone for their help!

    Hi Levi,
    Pleaase check the following :
    1. Other than storedprocedure are you adding any tables to your report ? If so, check the links between your stored procedure.(Through Database Expert)
    2.Write the following formula to find out whether the database fields contains values or not.
    if isnull() or = " " Then
    "This Field is Empty"
    Else
    Drag and dwop this formula in your report to get the field values.
    Thanks,
    Sastry

  • Report with stored proc running multiple stored procedures with insert statement

    Hi,
    I wonder if this is possible in SSRS ... I use the 2012 version (Data Tools).
    I have a report that triggers a stored procedure. See below.
    Within this SP there are 2 insert statements getting data from 2 other SP's.
    When I make a dataset referring to the main SP below, SSRS does not show me any fields at all.
    Is this because it's a SP with insert statements and nested SP's?
    At the end of the SP I make a select so it should see all the fields.
    The parameters @month and @costcenter are multivalue params. I use a special function to convert the multivalues, selected in the report, into a string to pass it correctly to the query (comma separated).
    USE [TestDB]
    GO
    /****** Object:  StoredProcedure [dbo].[_Pink_SP_StandingsRegisterDataset]    Script Date: 15-4-2014 13:31:30 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER PROCEDURE [dbo].[_Pink_SP_StandingsRegisterDataset]
    @year INT,
    @month NVARCHAR(50),
    @costcenter NVARCHAR(500),
    @GLaccount NVARCHAR(9)
    AS
    BEGIN
    /* Remove existing content*/
    DELETE FROM _Pink_TB_StandingsRegister
    /* Add records part 1 */
    INSERT INTO _Pink_TB_StandingsRegister
    EXEC _Pink_SP_StandingsRegister @year, @month, @costcenter, @GLaccount
    /* Add records part 2 */
    INSERT INTO _Pink_TB_StandingsRegister
    Type,
    Row,
    Year,
    Month,
    YearDatetable,
    MonthDatetable
    EXEC _Pink_SP_StandingsRegisterDatetable @year
    /* Select all records */
    SELECT *
    FROM _Pink_TB_StandingsRegister
    END
    GO

    Hi bijntjede2e,
    After testing a similar scenario in my own environment, it works well in Reporting Services. In my test, the stored procedure returns all the fields from _Pink_TB_StandingsRegister table in the dataset. Then I select some values from year, month, costcenter
    and Glaccount parameters, it inserts some values in the _Pink_TB_StandingsRegister table. So we can use this stored procedure as the dataset in the report.
    In order to solve the problem more efficiently, I need to clarify some information.
    Are you pass multiple values parameter to one stored procedure correctly? We can refer to the following thread:
    http://social.technet.microsoft.com/Forums/en-US/dbdfa101-cccc-4e9f-aa50-566dc5ebcc27/ssrs-2008-r2-report-dataset-call-a-stored-procedure?forum=sqlrep
    What results are you get when executing the stored procedure in SQL Server Management Studio? Is it works well? We should double those stored procedures.
    If there are any misunderstanding, please elaborate the issue for further investigation.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for