Need to add a column in front in my current Vb script

 Attached is the script that I use for copying text from multiple files and transfering them to the excell sheet, listed below is my current outout in excell. Need a column in front for dates for all the rows. The date is also contained in the text
file 4 th row. Listed below also is the text file that i read from. Any help is very much appriciated. Thanks
'Option Explicit
Sub OpenMultipleFiles()
Application.ScreenUpdating = False
Dim fn As Variant, f, c As Integer
c = 1
fn = Application.GetOpenFilename("All_files,*.*", _
1, "Select One Or More Files To Open", , True)
If TypeName(fn) = "Boolean" Then Exit Sub
For f = 1 To UBound(fn)
Debug.Print "Selected file #" & f & ": " & fn(f)
'Workbooks.Open fn(f)
Open fn(f) For Input As #f
Ctr = 0
Do
Line Input #f, Data
Ctr = Ctr + 1
Cells(Ctr, 1).Value = Data
Loop While EOF(f) = False
Close #f
Cells(1, 1).Resize(Ctr, 1).TextToColumns Destination:=Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=True, Tab:=True, Semicolon:=False, Comma:=False _
, Space:=False, Other:=True, OtherChar:="=", FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
'Create new sheet with raw data
'Mycell1 = Sheets("Sheet2").Cells(1, c) 'Find last cell with data
'On Error Resume Next
Worksheets("Sheet1").Range("A11:A30").Copy Destination:=Worksheets("Sheet2").Cells(c, 1)
c = c + 21
Sheets("Sheet1").Select
Cells.ClearContents 'Clear data on sheet1
Range("A1").Select
Next f
Application.ScreenUpdating = True
End Sub
Text File date is read fromLOT SUMMARY [24 HOURS]
Machine ID IPIe 29
Start Date 12-18-2013
Start Time 00:00:00
End Time 00:00:00
Inspection Summary TOTAL TRACK 1 TRACK 2 TRACK 3 TRACK 4 TRACK 5
Units Inspected 195 35 40 40 40 40
Units Passed 0 0 0 0 0 0
Units Yield 0.00 0.0 0.0 0.0 0.0 0.0
Units Failed 195 35 40 40 40 40
Grab Retry 0 0 0 0 0 0
Saline Shortage 0 0 0 0 0 0
Saline In-Range 0 0 0 0 0 0
Saline Excess 0 0 0 0 0 0
Defects
Spot 0 0 0 0 0 0
Non-Circular 0 0 0 0 0 0
Tear Lens 0 0 0 0 0 0
Gap Lens 0 0 0 0 0 0
No Lens 0 0 0 0 0 0
No Saline 195 35 40 40 40 40
Inner Tear 0 0 0 0 0 0
Current Output, need one column in the left for dates for all the rows. Units Inspected 195 35 40 40 40 40
Units Passed 0 0 0 0 0 0
Units Yield 0.00 0.0 0.0 0.0 0.0 0.0
Units Failed 195 35 40 40 40 40
Grab Retry 0 0 0 0 0 0
Saline Shortage 0 0 0 0 0 0
Saline In-Range 0 0 0 0 0 0
Saline Excess 0 0 0 0 0 0
Defects
Spot 0 0 0 0 0 0
Non-Circular 0 0 0 0 0 0
Tear Lens 0 0 0 0 0 0
Gap Lens 0 0 0 0 0 0
No Lens 0 0 0 0 0 0
No Saline 195 35 40 40 40 40
Inner Tear 0 0 0 0 0 0

Hello,
I'd ask in
The Official Scripting Guys Forum!
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

Similar Messages

  • Need to add 2 columns in query

    Hello, I have a query that I need to add 2 of the columns together, but I have been unsuccessful in my attempts to this point. I'm using Oracle SQL Developer 1.2.1
    Here is the query:
    WITH group_by_4_column_results AS
    (SELECT m_atschunk.employee AS employee,
    SUM(CASE
    WHEN
    M_ATSCHUNK.rolloffDaysCount = '108545043' AND m_atschunk.infractiondate BETWEEN SYSDATE - 365 AND SYSDATE THEN 1 ELSE 0 END) as rolloffs,
    M_ATSCHUNK.INFRACTIONDATE + 365 as infractionDate,
    M_ATSCHUNK.calculationDate as CalcDate
    FROM M_ATSCHUNK
    group by employee, infractionDate, rolloffDaysCount, calculationDate
    SELECT g4.*,
    SUM (rolloffs) OVER (PARTITION BY employee) AS total_rolloffs
    FROM group_by_4_column_results g4
    ORDER BY total_rolloffs desc
    And it will output this:
    ||Employee||     ||Rolloffs||     ||InfractionDate||     ||CalcDate||     ||Total_Rolloffs||
    ||86707||     ||1||     ||3/8/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/9/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/10/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/11/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/12/2011||     ||(null)||     ||134||
    ||86707||     ||1||     ||3/13/2011||     ||(null)||     ||134||
    I know need it to add the InfractionDate + Total_RollOffs columns and output intot he CalcDate column
    The table was not created conventially using SQL, it was creating using a using a metabean file:
    customerForm = /com/merced/datamart/repository/forms/CustomerForm,\
    employee           = /com/merced/datamart/repository/Person,\
    filledOutBy      = /com/merced/datamart/repository/Person,\
    infractionDate      = /com/merced/metabeans/Date,\
    infractionCode      = /com/merced/apps/ATS/forms/enumerations/infractionCodeType,\
    WLB          = /com/merced/apps/ATS/forms/enumerations/WLBType,\
    rolloffDaysCount     = /com/merced/apps/ATS/forms/enumerations/atsyesNoType,\
    shiftInterval          = /com/merced/apps/ATS/forms/enumerations/shiftIntervalType,\
    premiumDays          = /com/merced/apps/ATS/forms/enumerations/atsyesNoType,\
    PABonusPoints          = /com/merced/apps/ATS/forms/enumerations/atsyesNoType,\
    comments      = /com/merced/metabeans/String,\
    appliedWLC     = /com/merced/apps/ATS/forms/enumerations/appliedWLCType,\
    calculationDate = /com/merced/metabeans/Date,\
    calculationInteger = /com/merced/metabeans/Integer

    If you want to use 0COUNTRY as a navgational atttr. first go to info object 0BPARTNER and make 0COUNTRY as a navigational attr. save activate.
    The go to cube or DSO and check Navigational attr box infront of this info object,
    And then it will be available as a navigational attr in your query.
    Hope this helps,
    Assgn points if helpful.
    Regards

  • Need to add default columns to a CrossTab

    Post Author: ViBaldi
    CA Forum: Crystal Reports
    Just wondering if anyone has any ideas, as I have run out...
    I have a summary report that queries an SQL view and contains a CrossTab. The selection criteria is filtered by 4 selectable parameter fields:
    1) Region    2) Type of Job     3) Start Date    4) End Date
    With the exception of the dates, the user can select u2018one or manyu2019 from the dynamic parameter fields. The dates are selectable with Calendar controls. The Report is Grouped initially by Region. In my CrossTabs in each selected Region, the rows are the selected Job Type and the columns are grouped by the Month of the Job. The summarized field in the CrossTab is a Distinct Count of the JobID's. So basically, I want a monthly summary of Job Types, where the user can select the Job Types and date range for any particular Region.
    My dilemma is that my Cross Tab will not include Months, if there was no activity in those months. I want it to still print the Months, regardless of whether there were no jobs, but show a count of zero. Note that if there were different Job Types during the Month, it will appear with a zero in the column for the correct Job Type, but if that month had none of the selected Job Types, the Month is skipped altogether. Somehow, I would like to have the CrossTab leave all selected Months within the Start and End Dates in the columns, but with zero's as the Distinct Count, instead of skipping those Months.
    Here is a typical example:
    User selects 4 regions from the Regions PickList (say..Vancouver, Victoria, Nanaimo, Sooke).
    User selects 3 Job Types from the Job Type pick list (sayu2026Install, Removal, Service Call).
    User selects Jan. 1/07 as Start Date and Jun. 31/07 as End Date
    All of these picklists populate on first pass of the query, I believe.
    My Report Groups into Regions first, and then includes a CrossTab for each Region. I had hoped that the CrossTab would list all 3 Job Types in the left hand Rows, and all six Months in the Columns. Not so! If there was no u2018Installu2019 activity in Vancouver for all six Months, then that Job Type is omitted. Similarly, if there were no Job Type activities (of the 3 selected) at all for the whole month of March in Victoria, then the column for March is omitted. But, if March had 2 u2018Removalu2019 Job Type, and no other activity, and all other Months had at least one Job Type activity, then all Months would appear, and zerou2019s would be present where appropriate.
    So, it seems obvious that the query doesnu2019t have data for the Months with no activity, and you cannot do a Distinct Count of no data. I cannot insert fake records into the database, nor would I want to, because the JobID is a Unique Identifier. I have viewed a similar post that suggests linking to a .txt file, but I think that this may not work for me. I suspect that the ability for the user to select a date range would be a problem here, because the user could select only 3 consecutive months, or 18 consecutive months.
    Any ideas will be greatly appreciated. Please note that I am fairly proficient with Crystal Reports XI, and have tried everything I know, but I am relatively inexperienced with CrossTabs.
    Thanks!

    Post Author: Doug Johnson
    CA Forum: Crystal Reports
    This may not be the best solution but I believe it will solve your problem.  Try adding dummy records to your SQL view query.  I've done this with crosstabs in the past.  Use a UNION to your original select statement to do this.  So if your original query looks like:SELECT job_type, month, cross_value FROM tableA {where...blah blah}then add some UNIONs to it and return the whole thing as one view.SELECT job_type, month, cross_value FROM tableA {where...blah blah}UNIONSELECT DISTINCT job_type, 'January' AS month, 0 AS cross_value FROM tableA {where...blah blah}UNIONSELECT DISTINCT job_type, 'Feburary' AS month, 0 AS cross_value FROM tableA {where...blah blah}ect....If you are doing a sum at the crosstab value, the extra 0's won't harm anything.  If you're doing a count you will have to compensate by subtracting the extra 0 job_types/months.  You could also create a dummy table that contains the distinct job_types, 0 values and months, then just add one UNION selecting from that table.  OR you could just add an extra record to your existing table(s) that contains 0's for all months/job types.   

  • Need to add new column in SAP Query - Please guide me in this regard

    Dear All,
    In SAP Query, I need to put a new coulmn of each record for the difference of Billing date and PGI date as a work days.
    eg: Billing Date = 02.05.2008
         PGI Date = 08.05.2008
    Take a Variable i.e. Days = Billing Date - PGI Date that will display as 5 days by excluding Saturday and Sunday.
    After doing calculation of these work days for each record, we need a to add a new coulmn in that record as field lable as "Work Days" and display.
    Please Guide me in this regard
    Regards,
    Sateesh.

    Hi Rama,
    In SQ01 when you are in the fields (first would be attributes, when you click next it takes you to field groups, and again when you click next if takes you to fields tab) check the following menu path
    EDIT -> LOCAL FIELD -> CREATE
    You can define the formula as per your requirement and populate the field.
    Hope this is helpful.
    Thanks,
    Pavan

  • Need to add one column to TCODE :S_ALR_87013532

    hi all,
    i am suppose to add column 'person responsible' to tcode:S_ALR_87013532
    which is a drill down report and created by report painter.
    when i tried to create new report with report painter by makeing copy of existing one,  it didnt work.
    as person responsible field is not available in list of available characteristics.
    according to me making Zreport from scratch would not be good idea.
    can anybody tell me how can i add  extra field to list of available characteristics?

    Hello ,
    check in Config, i'm sure this can be done thru config.
    regards
    Prabhu

  • Add New column in the Display Specification: Hit List (CGE2)

    Hi,
    My Scenario is to add new columns (AUTHORIZATION GROUP and CREATED BY) in CGE2 T-code.
    At the hitlist of the workbench in transaction CGE2 there can be selected several columns(Ex:specification,Desc.specific.type,packing name etc), but we need to add new columns for (AUTHORIZATION GROUP and CREATED BY) for the perticular specifications.
    Please let me know how to make the changes for standard things or any exists or badi's are available..
    Replies would be appreciated.
    Regards,
    Raghava

    Try to check whether there is any enhancement spot available and create a spot.
    Example: sample steps for doing it.
    If you are trying to modify standard program. Ex: RV60AFZZ
    1) Go to SE38
    2) Display program RV60AFZZ
    3) Switch to  Front-End Editor (New)
    4) Click Spiral icon(Shift+F4) on the tool bar
    5) From Menu options EDIT-->Enhancement Operations --> Show implicit enhancement options.
    6) Now on the left hand corner you will see and arrow indicator where you can enhance the code. select the line example for this program Line 39, from menu EDIT--> Enhancement Operations --> create. on pop-up include the new column.
    I hope above example will help you to close the thread.
    Regards,
    Sairam

  • Add label column in applescript

    I'm using snow leopard at the moment and this is a section of the script and this works, i just need to add the column label into the window.
    open theFolder1
              tell front Finder window
                        set properties to {current view:list view, position:{0, 0}, bounds:{0, 100, 400, 500}, toolbar visible:true, sidebar width:0}
                        set text size of its list view options to 10
      close theFolder1
              end tell
    I've tried adding the line
    set visible of column label column to true
    but I get the error
    error "Finder got an error: Can’t make label column into type integer." number -1700 from label column to integer
    Can this be done?
    Many Thanks
    Matt

    Hello
    As far as I can tell, visible property of Finder > column class is broken. E.g.,
    tell application "Finder"
        tell Finder window 1
            set current view to list view
            tell its list view options
                --return columns -- for test
                set column id label column's visible to true -- [*1] NG
            end tell
            --update target -- no effect
        end tell
            [1] This should work but does not.
                The "visible" property is set to true but it has no effect in list view.
    end tell
    A workaround would be to use GUI scripting as follows. Tested under 10.6.5.
    * In order to use GUI scripting, you need to enbale the option: System Preferences > Universal Access > Enable access for assistive devices.
    tell application "Finder"
        tell Finder window 1
            my show_label_in_list_view(it)
        end tell
    end tell
    on show_label_in_list_view(fwin)
            reference fwin : reference of target Finder window
        tell application "Finder"
            activate
            tell fwin
                set current view to list view
            end tell
        end tell
        tell application "System Events"
            tell process "Finder"
                set view_options to a reference to (window 1 whose subrole = "AXSystemFloatingWindow")
                set was_open to exists view_options
                if not was_open then
                    tell menu bar 1's menu bar item 5 -- View
                        tell menu 1's menu item -1 -- Show View Options
                            click
                        end tell
                    end tell
                end if
                tell view_options
                    tell group 1
                        tell checkbox 4 -- Label
                            if value = 0 then click
                        end tell
                    end tell
                    if not was_open then click button 1 -- Close
                end tell
            end tell
        end tell
    end show_label_in_list_view
    Regards,
    H

  • Add dropdown column in Metadata properties in Search SharePoint2010

    Hi all,
    i have some drop-down columns in library and i need to add these column in metadata properties in search. and dose dropdown column support in search refinement panel and in advance search page xml ? also i
    need to add library dropdown column in search center for filter the data on search page. is there any out of the box way to do this. 
    BestRegards|SharePoint Techies

    Hi  ,
    According to your description, my understanding is that you want to create  custom SharePoint 2010 Search Refiners for some drop-down columns  in library.
    For achieving your demand, you can refer to  the blog:
    http://blogs.msdn.com/b/spnext/archive/2010/08/09/customising-sharepoint-2010-search-refiners.aspx
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support,
    contact [email protected]
    Eric Tao
    TechNet Community Support

  • How to add new columns in materialized view

    We are using Oracle 10g Release2.
    We need to add new columns to a prebuilt fast refresh materialized view. We want to add 4 new columns in this table and make them part of select statement in the materialized view. We can drop the view but we cannot do complete refresh after that because the paymentsInfo table has a creation_timestamp column which is populated by before row insert trigger with systimestamp. If we did the complete refresh, all values in this column shall be changed.
    CREATE MATERIALIZED VIEW  paymentsInfo
    ON PREBUILT TABLE
    REFRESH FAST
      ON DEMAND
      START WITH SYSDATE
      NEXT SYSDATE+5/1440
      WITH PRIMARY KEY
    DISABLE QUERY REWRITE AS
    SELECT PAYMENT_ID,BATCH_REFERENCE, TRANSACTION_REFERENCE, NO_OF_TRANSACTIONS, DEBIT_ACC_NUM,... from payment@dblink
    I want to know is there any other way to add new columns without losing any changes from the master table.
    Thanks.

    There is no way to add new Columns to Materialized view. To add new columns, it has to be dropped and re-built again.
    Extract from Oracle Documentaion:
    Use the ALTER MATERIALIZED VIEW statement to modify an existing materialized view in one or more of the following ways:
      To change its storage characteristics
      To change its refresh method, mode, or time
      To alter its structure so that it is a different type of materialized view
      To enable or disable query rewrite
    If you have a problem of Complete refresh, then It may be beneficial to get the backup of the MView; Drop and re-create it with modified definition; Restore the backup data leaving the new columns untouched (assuming they are to be kept as fetched from the Master site).

  • How to modify an existing query to add a column

    Hi all, I have an existing query :
    SELECT 2 as SOURCE_SYSTEM_ID, LI.IPROD AS SYSTEM_ID, LI.IPROD AS PART_NUMBER, LI.IDESC AS PART_DESCRIPTION, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE (LZ.CCTABL = 'SIRF2') AND LI.IREF02 = LZ.CCCODE), '') AS PLANT_CODE, LIS.ISSTSD
    AS lifecycle_status, CASE LI.ILDTE WHEN 0 THEN convert(date, GETDATE()) ELSE (SUBSTRing(convert(varchar, LI.ILDTE), 1,4)+'-'+SUBSTRing(convert(varchar,LI.ILDTE), 5,2)+'-'+SUBSTRing(convert(varCHAR,LI.ILDTE), 7,2)) END AS LAST_ACTIVITY_DATE,
    LZPA.DATA AS PRODUCTION_TYPE, (CASE (LI.IITYP) WHEN '6' THEN 'SERVICE' ELSE 'ITEM' END) AS ITEM_TYPE, LI.IVEND AS PRIMARY_VENDOR, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS
    UOM_INVENTORY, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS UOM_BOM, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI. IUMR
    AND LZ.CCLANG = '') AS UOM_SELL, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMP AND LZ.CCLANG = '') AS UOM_PURCHASE, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='BUYER'
    AND LZ.CCCODE=LI.IPURC), '') AS BUYER, (LI.IMHIGH) AS ITEM_HEIGHT, SUBSTRING(IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='SIRF5' AND LZ.CCCODE=LI.IREF05), ''), 1, 20) AS APPLICATIONS, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC
    LZ WHERE LZ.CCTABL='SIRF3' AND LZ.CCCODE=LI.IREF03), '') AS PORGRAM, (LI.IMWIDE) AS ITEM_WIDTH, LI.IMLONG AS ITEM_DEPTH, LI.IWGHT AS ITEM_WEIGHT_NET, LI.IMNNWU AS ITEM_WEIGHT_TARE FROM HCMEUP01.FRDA385A.LBPCSF.IIM LI, HCMEUP01.FRDA385A.LBPCSF.ISC LIS,HCMEUP01.FRDA385A.LBPCSF.ZPA
    LZPA WHERE LI.ICOND = LIS.ISSTSC AND LZPA.PKEY=('ITEMTYP'+LI.IITYP )
    Now I need to add a column called WORK_CENTER. I added a subquery to the existing one.  It looks like this:
    SELECT 2 as SOURCE_SYSTEM_ID, LI.IPROD AS SYSTEM_ID, LI.IPROD AS PART_NUMBER, LI.IDESC AS PART_DESCRIPTION, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE (LZ.CCTABL = 'SIRF2') AND LI.IREF02 = LZ.CCCODE), '') AS PLANT_CODE, LIS.ISSTSD
    AS lifecycle_status, CASE LI.ILDTE WHEN 0 THEN convert(date, GETDATE()) ELSE (SUBSTRing(convert(varchar, LI.ILDTE), 1,4)+'-'+SUBSTRing(convert(varchar,LI.ILDTE), 5,2)+'-'+SUBSTRing(convert(varCHAR,LI.ILDTE), 7,2)) END AS LAST_ACTIVITY_DATE,
    LZPA.DATA AS PRODUCTION_TYPE, (CASE (LI.IITYP) WHEN '6' THEN 'SERVICE' ELSE 'ITEM' END) AS ITEM_TYPE, LI.IVEND AS PRIMARY_VENDOR, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS
    UOM_INVENTORY, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMS AND LZ.CCLANG = '') AS UOM_BOM, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI. IUMR
    AND LZ.CCLANG = '') AS UOM_SELL, (SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='UNITMEAS' AND LZ.CCCODE=LI.IUMP AND LZ.CCLANG = '') AS UOM_PURCHASE, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='BUYER'
    AND LZ.CCCODE=LI.IPURC), '') AS BUYER, (LI.IMHIGH) AS ITEM_HEIGHT, SUBSTRING(IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC LZ WHERE LZ.CCTABL='SIRF5' AND LZ.CCCODE=LI.IREF05), ''), 1, 20) AS APPLICATIONS, IsNULL((SELECT LZ.CCDESC FROM HCMEUP01.FRDA385A.LBPCSF.ZCC
    LZ WHERE LZ.CCTABL='SIRF3' AND LZ.CCCODE=LI.IREF03), '') AS PORGRAM, (LI.IMWIDE) AS ITEM_WIDTH, LI.IMLONG AS ITEM_DEPTH, LI.IWGHT AS ITEM_WEIGHT_NET, LI.IMNNWU AS ITEM_WEIGHT_TARE,
    (SELECT LC.LWRKC FROM HCMEUP01.FRDA385A.LBPCSF.LCR LC WHERE RTRIM(LTRIM(LC.LITEM)) = RTRIM(LTRIM(LI.IPROD)) ) AS WORK_CENTER FROM HCMEUP01.FRDA385A.LBPCSF.IIM LI, HCMEUP01.FRDA385A.LBPCSF.ISC LIS,HCMEUP01.FRDA385A.LBPCSF.ZPA LZPA WHERE
    LI.ICOND = LIS.ISSTSC AND LZPA.PKEY=('ITEMTYP'+LI.IITYP )
    Please see the bolded and italic part.   The problem is that the subquery is non distinct.  I am getting an error "
    Msg 512, Level 16, State 1, Line 2
    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression."
    Can you let me know how I can resolve this issue? it is an urgent request.  Thank you
    Thank You Warmest Fanny Pied

    I was given the existing query and the subquery as they were.  The subquery is as it is returning multiple records on the columns selected.  The person who give me the sub query is sure those are the correct tables to use to develope/change the
    query. 
    select
      DISTINCT a.litem,
    b.IPROD,b.idesc,a.lwrkc
    from HCMEUP01.FRDA385A.LBPCSF.LCR
    a, HCMEUP01.FRDA385A.LBPCSF.IIM
    b
    where
    a.litem=b.iprod
    Thank you for your help.
    Thank You Warmest Fanny Pied

  • How to add custom columns with BO data from GP to UWL

    Hi
    We have CE 7.1 in our project UWL taskitems only have GP workflow tasks.
    In UWL we can see that by default there are standard columns but now we need to add custom columns with data from ours BO associated to process instance
    For that we need to develop one custom connector for UWL where we can retrieve the values from custom conenctor to UWL.
    Currently our NWDS 7.1 does not have plugins for UWL Connector can anybody tell me where can I download this plugins?
    thanks in advance!
    Regards
    Cristian

    Hi,
    plz refer the following link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0ee5047-c7a0-2a10-70b7-9557e3e4d440
    Regards
    Manohar

  • Add varchar column in to Time Series Algorithm

    i created a time series algoritham using numeric columns, but i need to add text columns so what we do?
    plz share to me if possible to add.

    Hi,
    Thanks a lot, it's really help...don't know why I didn't see this customized point before in SPRO.
    But I have an other issue, my new fields is added in the CATS screen and now I'm trying to put default value by using the user exit of extension CATS0009.
    When I complete the value of my new fields in structure CATSD_IMP, there are not taking into account and the CATS screen doesn't display the value.
    Am I using the wrong table ? wrong user-exit ? or my code ..
    Thansk a lot again for your help.
    Fanny GROUX

  • Add additional column in existing table

    Hello guys,
    I need to add new columns to the existing table, but when I'm trying to add, nothing happens. Checked table itself and all Rows and Column fields are read-only. Can't see any property which indicates this locking behavior. I'm using ES2 LC.
    Thanks,
    Uldis

    You can use an APPEND function.
    Append Structures (SAP Library - Tables)

  • Alter table add new column

    I have table structure like this
    select
    PROJECT_NAME, OBJECT_NAME, INCOMMING_DOC, DESIGN, DESIGN_REVIEW, DESIGN_REWORK, BUILD, BUILD_REVIEW, BUILD_REWORK, TEST_CASE_PREP, TEST_CASE_REVIEW, TEST_CASE_REWORK, INSTALLATION_SCRIPT, UNIT_TESTING, WAIT_TIME, COMMENTS, INITIAL_DATE
    from initial_effort
    i want to add a column after unit_testing
    How to include
    Thanks
    Sudhir

    Directly you can add the column in existing table, No matter which position column find in the table, Its depend on your SELECT Statement. You add column in the table like this..
    ALTER TABLE TEST
    ADD COL_NAME DATATYPE CONSTRAINTS
    OR
    Rename your table table , Take the same table creation script add your column whereever you want.
    Run the script and drop the old table.

  • Convert a column in Numbers that is currently in HH:MM format to decimal format.

    I need to Convert a column in Numbers that is currently in HH:MM format to decimal format.  IE 6:30 to 6.5

    Rj,
    There are two possibilities here. Your HH:MM could be a Date/Time value or a Duration.
    Let's assume your data is in Column A.
    If it's a Date/Time value, do the conversion with the expression:
    =TIMEVALUE(A) * 24
    If it's a Duration value, do the conversion with the expression:
    =DUR2HOURS(A)
    In both cases, remember to Format the result to Number with at least one decimal place.
    Regareds,
    Jerry

Maybe you are looking for

  • Where did my Previous System folder go?

    I upgraded my G5 yesterday from 10.3.9 to 10.5. Everything works fine after the upgrade. But I can't find the Previous System folder that should be on my hard drive. When I upgraded, I planned to do an Archive and Install and preserve user settings,

  • My passport won't unmount

    I have just brought a "My Passport Ultra" however when i have tried to reformat it to instal it on my Macbook pro, and therefore partition it, it says "couldn't unmount disk" am not sure if I am doing something incorrectly but if someone could help i

  • Extreme + Express = separate 5Ghz and 2.4Ghz networks ...

    I have an Extreme and an Express. If I set up the Extreme for 802.11n (5Ghz) clients only, how do I setup the Express to handle the 802.11g/b (2.4Ghz) clients? Specifically, if you're using an 802.11n computer, wouldn't it be possible for it to conne

  • Naming.lookup refuses to work properly when I use a different port

    Ok, here's the deal: I have an application that uses RMI. Until now it has worked wonderfully, but since a new service that "steals" port 1099 is going to be installed on the same machine, I have to update my code to start working with another port.

  • Downloading itunes 10.6

    I cant install iTunes latest version 10.6 on windows xp, anyone have any ideas? Ive removed old version as much as i can and anything apple related, it kept coming up, unable to remove old version at first, now it says it cant verify the signature. W