Nested Split WITHOUT Cross APPLY

I have been wrestling with this for days and need an assist.
I have to split a text field based on different Delimitters AND I need to do
it without CROSS Apply because the database I am working in has a compatability
level of less than 90.
This is what I have attempted with the cross apply and it ALMOST works.
Again the issue is that
I want this
ID Company  AdjustedZip
1 McDonalds 55407
2 Burger
King 55401
3 Wendys  32314
3 Wendys  32121
4 ChikFilA 30317
4 ChikFilA 30318
4 ChikFilA 30318
5 Checkers 90134
5 Checkers 90301
5 Checkers 90210
5 Checkers 90211
And I am getting this
ID Company  AdjustedZip
1 McDonalds 55407
2 Burger
King 55401
3 Wendys  32314
3 Wendys  3,231,432,121
3 Wendys  32121
4 ChikFilA 30317
4 ChikFilA 303,173,031,830,318
4 ChikFilA 30318
4 ChikFilA 30318
5 Checkers 90134
5 Checkers 90134;90301;90210;90211
5 Checkers 90301
5 Checkers 90210
5 Checkers 90211
BUT I CAN'T use the Cross Apply to do it,
Here is my code
Create FUNCTION [dbo].[DelimitedSplitMax]
--===== Define I/O
parameters
        (@pString VARCHAR(max), @pDelimiter
CHAR(1))
--WARNING!!! DO NOT USE MAX DATA-TYPES HERE!  IT WILL KILL
PERFORMANCE!
RETURNS TABLE WITH SCHEMABINDING AS
 RETURN
--=====
"Inline" CTE Driven "Tally Table" produces values from 1 up to 10,000...
-- enough to cover VARCHAR(8000)
  WITH E1(N) AS (
                 SELECT
1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
                 SELECT 1
UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL
                 SELECT 1
UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1
),                          --10E+1 or 10 rows
       E2(N) AS (SELECT 1 FROM
E1 a, E1 b), --10E+2 or 100 rows
       E4(N) AS (SELECT 1 FROM E2 a, E2 b),
--10E+4 or 10,000 rows max
       E16(N) AS (SELECT 1 FROM E4 a, E4 b),
--10E+16 or 10,000 rows max
 cteTally(N) AS (--==== This provides the "base"
CTE and limits the number of rows right up front
                     -- for
both a performance gain and prevention of accidental
"overruns"
                 SELECT TOP (ISNULL(DATALENGTH(@pString),0))
ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) FROM E4
cteStart(N1) AS (--==== This returns N+1 (starting position of each
"element" just once for each delimiter)
                 SELECT 1 UNION
ALL
                 SELECT t.N+1 FROM cteTally t WHERE
SUBSTRING(@pString,t.N,1) = @pDelimiter
cteLen(N1,L1)
AS(--==== Return start and length (for use in substring)
SELECT s.N1,
ISNULL(NULLIF(CHARINDEX(@pDelimiter,@pString,s.N1),0)-s.N1,8000)
FROM cteStart s
--===== Do the actual split. The
ISNULL/NULLIF combo handles the length for the final element when no delimiter
is found.
 SELECT ItemNumber = ROW_NUMBER() OVER(ORDER BY l.N1),
Item       = SUBSTRING(@pString, l.N1, l.L1)
   FROM cteLen l
Create Table #Temp
(Id int
,Company varchar (100)
,AdjustedZip
varchar(255)
Insert #Temp
(Id
,Company
,AdjustedZip
Values
  (1,'McDonalds','55407')
       ,(2,'Burger King','55401')
,(3,'Wendys','32314,32121')
,(4,'ChikFilA','30317,30318,30319')
,(5,'Checkers','90134;90301;90210;90211')
 Select s.ID
  ,s.Company     
        ,Case
   When Len(Ltrim(Rtrim(s.adjustedzip)))= 5 Then
s.adjustedzip
   Else
   f.Item
   End  
   as
AdjustedZip
         From
  #temp as s
CROSS APPLY
Select *
From dbo.DelimitedSplitMax(ltrim(rtrim(s.AdjustedZip)), ',')
Union 
Select * From dbo.DelimitedSplitMax(ltrim(rtrim(s.AdjustedZip)), ';') 
 ) as f 

I got the bug out and it appears to be running I am simply running the database with compatability set to 90 and there appears to be no issue with that.
HERE IS THE CODE AND THANK YOU ALL!!!
Select l.*
From
Select s.ID
,s.Company     
,Case
When
Len(Ltrim(Rtrim(s.adjustedzip)))=
5 Then s.adjustedzip
Else
f
.Item
End
as AdjustedZip
From
#temp
as s
CROSS
APPLY
Select
From mailtrak.dbo.DelimitedSplitMax(ltrim(rtrim(s.AdjustedZip)),
as f
Union
Select s.ID
,s.Company     
,Case
When
Len(Ltrim(Rtrim(s.adjustedzip)))=
5 Then s.adjustedzip
Else
ff
.Item
End
as AdjustedZip
From
#temp
as s
CROSS
APPLY
Select
From mailtrak.dbo.DelimitedSplitMax(ltrim(rtrim(s.AdjustedZip)),
as ff
l
Except
Select ID,Company,Adjustedzip
from #Temp
where
LEN(Adjustedzip)>5

Similar Messages

  • I have activated 2 iPhones using my iTunes account, but I now would like to take one iPhone off this account, and start its own iTunes "pairing" in order to back up, without cross syncing between purchases, how can I do this?

    I have activated 2 iPhones using ONE iTunes account, but I would now like to remove one iPhone from the account and add it to a new iTunes account. This is so that I can back it up without cross syncing between purchases/apps on both iPhones.
    Whats the best method for this?
    I'm running Windows 7
    Many thanks

    Whenever a menu choice is grayed out, that is because you have Restrictions turned on in Settings.  Be sure to turn it off.
    You are confusing an itunes store account with an icloud account.  You two can continue using the same ID for itunes (thus sharing purchased music, apps, etc.), but you really should have separate accounts (different IDs) for icloud, since an account is intended for one user to keep his/her devices in sync.
    To create a new icloud account, go to
    http://www.apple.com/icloud/setup/
    Then go to Settings>icloud and scroll to the bottom of the screen and tap Delete Account.  (have restrictions turned off)  That will disconnect the device from the account but will not delete data in icloud or other devices.  Then sign in using the new ID.

  • Message Split without BPM - Error

    Hi,
    I am creating a message split scenario without BPM as per weblog <a href="/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible Split without BPM</a>
    I am able to receive message in XI but after that it shows error in Integration engine.
    Error Category : MAPPING
    Error Code : GENERIC
    I am able to see the message in SXMB_MONI with error
    <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">GENERIC</SAP:Code>
      <SAP:P1>No messages created from split mapping</SAP:P1>
    Please advice.
    Thanks,
    Sri.

    Hi Venkat,
    I am not able to see sub-groupid in sxmb_moni.
    Please see below the contents from sxmb_moni trace.
    ============================
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Trace xmlns:SAP="http://sap.com/xi/XI/Message/30">
      <Trace level="1" type="T">Party normalization: sender</Trace>
      <Trace level="1" type="T">Sender scheme external = XIParty</Trace>
      <Trace level="1" type="T">Sender agency external = http://sap.com/xi/XI</Trace>
      <Trace level="1" type="T">Sender party external =</Trace>
      <Trace level="1" type="T">Sender party normalized =</Trace>
      <Trace level="1" type="T">Party normalization: receiver</Trace>
      <Trace level="1" type="T">Receiver scheme external =</Trace>
      <Trace level="1" type="T">Receiver agency external =</Trace>
      <Trace level="1" type="T">Receiver party external =</Trace>
      <Trace level="1" type="T">Receiver party normalized =</Trace>
      <Trace level="1" type="B" name="CL_XMS_HTTP_HANDLER-HANDLE_REQUEST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">XMB was called with URL /sap/xi/engine?type=entry</Trace>
      <Trace level="1" type="T">COMMIT is done by XMB !</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-ENTER_XMS" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-SET_START_PIPELINE" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="SXMBCONF-SXMB_GET_XMB_USE" />
      <Trace level="1" type="B" name="CL_XMS_TROUBLESHOOT-ENTER_PLSRV" />
      <Trace level="1" type="T">****************************************************</Trace>
      <Trace level="1" type="T">* *</Trace>
      <Trace level="1" type="T">* *</Trace>
      <Trace level="1" type="T">XMB entry processing</Trace>
      <Trace level="1" type="T">system-ID = QN7</Trace>
      <Trace level="1" type="T">client = 100</Trace>
      <Trace level="1" type="T">language = E</Trace>
      <Trace level="1" type="T">user = XIAFUSER</Trace>
      <Trace level="1" type="Timestamp">2006-04-18T05:51:20Z CET</Trace>
      <Trace level="1" type="T">* *</Trace>
      <Trace level="1" type="T">* *</Trace>
      <Trace level="1" type="T">****************************************************</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_UC_EXECUTE" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Message-GUID = 67F58830CE9E11DA91CD00111120E6DB</Trace>
      <Trace level="1" type="T">PLNAME = CENTRAL</Trace>
      <Trace level="1" type="T">QOS = EO</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_ASYNC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Get definition of external pipeline = CENTRAL</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
      <Trace level="1" type="T">Get definition of internal pipeline = SAP_CENTRAL</Trace>
      <Trace level="1" type="T">Queue name : XBTI0002</Trace>
      <Trace level="1" type="T">Generated prefixed queue name = XBTI0002</Trace>
      <Trace level="1" type="T">Schedule message in qRFC environment</Trace>
      <Trace level="1" type="T">Setup qRFC Scheduler OK!</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Going to persist message</Trace>
      <Trace level="1" type="T">NOTE: The following trace entries are always lacking</Trace>
      <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST</Trace>
      <Trace level="1" type="T">- Exit CALL_PIPELINE_ASYNC</Trace>
      <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
      <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
      <Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
      <Trace level="1" type="T">system-ID = QN7</Trace>
      <Trace level="1" type="T">client = 100</Trace>
      <Trace level="1" type="T">language = E</Trace>
      <Trace level="1" type="T">user = XIAFUSER</Trace>
      <Trace level="1" type="Timestamp">2006-04-18T05:51:20Z CET</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Get definition of external pipeline CENTRAL</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
      <Trace level="1" type="T">Corresponding internal pipeline SAP_CENTRAL</Trace>
    - <Trace level="1" type="B" name="PLSRV_RECEIVER_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
    - <Trace level="1" type="B" name="PLSRV_INTERFACE_DETERMINATION">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
    - <Trace level="1" type="B" name="CL_ID_PLSRV-ENTER_PLSRV">
      <Trace level="1" type="T">I N T E R F A C E - D E T E R M I N A T I O N</Trace>
      <Trace level="1" type="T">Cache Content is up to date</Trace>
      </Trace>
      </Trace>
      </Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="B" name="PLSRV_RECEIVER_MESSAGE_SPLIT" />
    - <!--  ************************************
      -->
    - <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV">
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_PLSRV_RECEIVER_SPLIT-ENTER_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">number of receivers: 1</Trace>
      <Trace level="1" type="T">Single-receiver split case</Trace>
      <Trace level="1" type="T">Post-split internal queue name = XBTO6___0000</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Persisting single message for post-split handling</Trace>
      <Trace level="1" type="T" />
      <Trace level="1" type="T">Going to persist message + call qRFC now...</Trace>
      <Trace level="1" type="T">NOTE: The following trace entries are always lacking</Trace>
      <Trace level="1" type="T">- Exit WRITE_MESSAGE_TO_PERSIST</Trace>
      <Trace level="1" type="T">Async barrier reached. Bye-bye !</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-PERSIST_READ_MESSAGE" />
      <Trace level="1" type="T">Note: the following trace entry is written delayed (after read from persist)</Trace>
      <Trace level="1" type="B" name="SXMS_ASYNC_EXEC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="T">Starting async processing with pipeline CENTRAL</Trace>
      <Trace level="1" type="T">system-ID = QN7</Trace>
      <Trace level="1" type="T">client = 100</Trace>
      <Trace level="1" type="T">language = E</Trace>
      <Trace level="1" type="T">user = XIAFUSER</Trace>
      <Trace level="1" type="Timestamp">2006-04-18T05:51:20Z CET</Trace>
      <Trace level="1" type="T">----
    </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PIPELINE_SYNC" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Get definition of external pipeline CENTRAL</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-LOOKUP_INTERNAL_PL_ID" />
      <Trace level="1" type="T">Corresponding internal pipeline SAP_CENTRAL</Trace>
      <Trace level="1" type="T">Start with pipeline element PLEL= 5EC3C53B4BB7B62DE10000000A1148F5</Trace>
      <Trace level="1" type="B" name="PLSRV_MAPPING_REQUEST" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL" />
    - <!--  ************************************
      -->
      <Trace level="1" type="B" name="CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV" />
    - <!--  ************************************
      -->
      <Trace level="1" type="T">Mapping-Object-Id:29EB87F0231C357A8336DDEBD574EEAB</Trace>
      <Trace level="1" type="T">Mapping-SWCV:0CF1E1E0C5FC11DABCB9E4A50A07012B</Trace>
      <Trace level="1" type="T">Mapping-Step:1</Trace>
      <Trace level="1" type="T">Mapping-Type:JAVA</Trace>
      <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_MM_filesplit_without_bpm_</Trace>
      <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
      </Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
      <Trace level="1" type="System_Error">Error exception return from pipeline processing!</Trace>
      <Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_TO_PERSIST" />
    - <!--  ************************************
      -->
      </SAP:Trace>
    Thanks,
    Sri.

  • Message splitting without bpm

    Could anyone please give any idea or links about end to end configuration for  message splitting without using bpm.
    Thanks
    sabyasachi
    Edited by: Sabyasachi Mohapatra on Apr 7, 2009 11:50 AM

    Hi Sameerr
    .i have one sender  &  2 receivers.Please guide how to configure end to end in the receiver determination step & interface determination step.How many sender & receiver agreements need to be configured.
    Thanks & Regards
    Sabyasachi

  • Column values in table equal column names in other table (unpivot? cross apply?)

    2 tables:
    CREATE TABLE Requirement
     reqID int IDENTITY(1,1) PRIMARY KEY,
     req_result_id numeric(10,0) NOT NULL,
     description varchar(200),
     heading varchar(100),
     GO
    INSERT INTO Requirement VALUES (5296,'Cold pack','HH19_5');
    INSERT INTO Requirement VALUES (5296,'Band-Aids','HH19_6');
    INSERT INTO Requirement VALUES (5296,'First aid cream','HH19_7');
    INSERT INTO Requirement VALUES (5296,'Tape','HH19_8');
    INSERT INTO Requirement VALUES (5296,'Gloves','HH19_9);
    INSERT INTO Requirement VALUES (5296,'Bandages','HH19_10');
    INSERT INTO Requirement VALUES (5296,'Hand sanitizer','HH19_11');
    INSERT INTO Requirement VALUES (5296,'Scissors','HH19_12');
    INSERT INTO Requirement VALUES (5296,'Poison control information','HH19_13');
    INSERT INTO Requirement VALUES (5296,'Name','HH02');
    GO
    CREATE TABLE Response
     respID int IDENTITY(1,1) PRIMARY KEY,
    req_result_id numeric(10,0) NOT NULL,
     HH02 varchar(200),
     HH19_5 varchar(20),
     HH19_6 varchar(20),
     HH19_7 varchar(20),
     HH19_8 varchar(20),
     HH19_9 varchar(20),
     HH19_10 varchar(20),
     HH19_11 varchar(20),
     HH19_12 varchar(20),
     HH19_13 varchar(20),
     GO
    INSERT INTO Response VALUES (33,'Mary',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (35,'Barbara',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (144,'Melissa',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (146,'Missy',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (5296,'Pamela',7,8,9,10,11,12,13,14,15);
    GO
    Result:
    description
    heading
    response
    Name
    HH02
    Pamela
    Bandages
    HH19_10
    12
    Hand sanitizer
    HH19_11
    13
    Scissors
    HH19_12
    14
    Poison control information
    HH19_13
    15
    Cold pack
    HH19_5
    7
    Band-Aids
    HH19_6
    8
    First aid cream
    HH19_7
    9
    Tape
    HH19_8
    10
    Gloves
    HH19_9
    11
    For now, I'm using where req_result_id = 5296. Only one row from the Response table is selected.
    I'm playing with unpivot and cross apply. I might use two CTE's but am not yet sure how to join them. I would just like to see what others here suggest.
    I only need help with T-SQL - not table design.
    Let me know if you need more info or if I need to reformat the expected output to make it legible.
    Thanks for any suggestions.

    CREATE TABLE Requirement
    reqID int IDENTITY(1,1) PRIMARY KEY,
    req_result_id numeric(10,0) NOT NULL,
    description varchar(200),
    heading varchar(100),
    GO
    INSERT INTO Requirement VALUES (5296,'Cold pack','HH19_5');
    INSERT INTO Requirement VALUES (5296,'Band-Aids','HH19_6');
    INSERT INTO Requirement VALUES (5296,'First aid cream','HH19_7');
    INSERT INTO Requirement VALUES (5296,'Tape','HH19_8');
    INSERT INTO Requirement VALUES (5296,'Gloves','HH19_9');
    INSERT INTO Requirement VALUES (5296,'Bandages','HH19_10');
    INSERT INTO Requirement VALUES (5296,'Hand sanitizer','HH19_11');
    INSERT INTO Requirement VALUES (5296,'Scissors','HH19_12');
    INSERT INTO Requirement VALUES (5296,'Poison control information','HH19_13');
    INSERT INTO Requirement VALUES (5296,'Name','HH02');
    GO
    CREATE TABLE Response
    respID int IDENTITY(1,1) PRIMARY KEY,
    req_result_id numeric(10,0) NOT NULL,
    HH02 varchar(200),
    HH19_5 varchar(20),
    HH19_6 varchar(20),
    HH19_7 varchar(20),
    HH19_8 varchar(20),
    HH19_9 varchar(20),
    HH19_10 varchar(20),
    HH19_11 varchar(20),
    HH19_12 varchar(20),
    HH19_13 varchar(20),
    GO
    INSERT INTO Response VALUES (33,'Mary',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (35,'Barbara',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (144,'Melissa',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (146,'Missy',7,8,9,10,11,12,13,14,15);
    INSERT INTO Response VALUES (5296,'Pamela',7,8,9,10,11,12,13,14,15);
    GO
    ;with mycte as (
    select respID,req_result_id,response,heading from Response
    cross apply (values
    ([HH19_5],'HH19_5')
    ,([HH19_6],'HH19_6')
    ,([HH19_7],'HH19_7')
    ,([HH19_8],'HH19_8')
    ,([HH19_9],'HH19_9')
    ,([HH19_10],'HH19_10')
    ,([HH19_11],'HH19_11')
    ,([HH19_12],'HH19_12')
    ,([HH19_13],'HH19_13')
    ,([HH02],'HH02') ) d(response,heading)
    WHERE req_result_id=5296 )
    select description,r.heading,response from Requirement r
    inner join mycte m on r.req_result_id=m.req_result_id and r.heading=m.heading
    Order by Case When len(r.heading)=4 then 1 Else 2 END, Len(Replace(r.heading,'HH19_','')) desc
    drop table Requirement,Response

  • Charm without Cross system object lock

    Dear All,
    We have requirement for configuration of Charm without cross system object lock i.e. solution manager will be used for documentation but create, release, import request from the development system itself.
    Can we make changes in the functionality and use charm for documentation only?
    if anyone has the same requirement can you please let me know steps to be followed.
    Thanks in advance
    Regards
    Sushant

    Dear Prabhakar,
    Thanks for the reply.
    Our project has just gone live and issues immediate resolution is being carried. Charm will integrate with system and training is required for that which at this point of time not possible but at the same time without affecting the issue resolution we want to log the changes in solution manager.
    We will use the CSOL feature may be some time later.
    At present i have not activate CSOL, still the document doesn't flow through. Document got stuck at "In development" phase and doesn't move forward. It doesn't allow to change the status.
    Regards
    Sushant

  • DMV use Cross Apply and too much result

    Hi
    Here are my code for query DMV, but some column Is repeated, how can I filter it (last_exection_time) ?
    I just wnat find T-SQL query information(only select), and it must include query text、targert db、source application(from connection string )、and other needed !
    You can change database name and where conditional, for your testing ! Thanks
    SELECT DB_NAME(DMV_QueryText.dbid) as 'DBName',
    DMV_Sessions.program_name as 'ApplicationName',
    DMV_QueryText.text as 'SQL Statement',
    execution_count as 'Count',
    --last_rows, (for SQL 2012 only)
    last_execution_time as 'Last Execution Time(ms)',
    last_worker_time as 'Last Worker Time(ms)',
    last_physical_reads as 'Last Physical Reads(ms)',
    last_logical_reads as 'Last Logical Reads(ms)',
    last_logical_writes as 'Last Logical Writes(ms)',
    last_elapsed_time as 'Last Elapsed Time(ms)'
    FROM sys.dm_exec_query_stats AS DMV_QueryStats
    CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS DMV_QueryText
    cross Apply sys.dm_exec_sessions as DMV_Sessions
    WHERE DMV_QueryText.objectid is null and DB_Name(DMV_QueryText.dbid)='YourDB' and PatIndex('select %',DMV_QueryText.text)>0
    and DMV_Sessions.program_name is not null and DMV_Sessions.program_name in('app1','app2','app3','app4')
    -- order by DMV_QueryStats.execution_count desc
    order by DMV_QueryStats.last_worker_time desc
    my407sw

    There is no relationship between sys.dm_exec_query_stats and
    sys.dm_exec_sessions and thus you are getting a Cartesian product, every combination of query stat record and session.
    sys.dm_exec_sessions shows the "aggregate performance statistics for cached query plans in SQL Server 2012"
    http://msdn.microsoft.com/en-us/library/ms189741.aspx and is not tied in any way to a session.
    Russel Loski, MCT, MCSE Data Platform/Business Intelligence. Twitter: @sqlmovers; blog: www.sqlmovers.com

  • Can a PM work center operation be split without assigning to individuals?

    We have a requirement to split the work time of a PM operation into more than one non-consecutive time period.  For example a maintenance trade work center containing 3 individuals is required to perform an operation that takes 40 hours.  Due to the plant schedule the work will be carried out in 20 hour segments.  20 hours in week 5 and 20 hours in week 7.  Can this operation be dispatched as a split without assigning the splits to individuals in the work center?
    We are using:  SAP Appl Release 470 and
    SAP R/3 Enterprise PLM, SCM, Financials  Release 110 and the latest support packs.

    Question is being posted to EAM Forum.

  • HT3819 I just bought my kids iPods.  How can we share music from my iTunes library without crossing over with text messages, etc?

    I just bought my 3 kids iPods.  How can we share music from my iTunes library without crossing over with texts, apps, etc? 

    Create new IDs for each by:
    Create a NEW account using these instructions. Make sure you follow the instructions. Many do not and if you do not you will not get the None option. You must use an email address that you have not used with Apple before.
    Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
    Use that Id only for:
    - Settings>Messages>Send and receive and sign out your ID and sign into the new one. Make sure that only that ID email address is listed.
    - Settings>FaceTime sign out of your ID and sign into the new . Make sure that under You can be reached at only the new ID email address is listed
    - Settings>iCloud and sign out and sign in with the new one
    Continue to the one one common ID for Settings>iTunes and App stores. That is what controls purchases.

  • C# remote powershell without explicitelly applying user & password (rather connection with current credentials)

    Dear all,
    I would like to know, how I can open a runspace to an Exchange Server 2013 WITHOUT explicitelly applying username and password (well - this works using basic authentication).
    Following scenario :
    - A (well patched) Win 7 Enterprise Client with Exchange 2013 Client Tools installed
    - Logged in as (the) domain admin
    - Using Exchange Management Shell I can administer Exchange WITHOUT entering username/password
    - Using C# I cannot :(
    Nothing helped (DefaultCredentials [even with Releasebuild], PSCredentials.Empty or null, tried All members of AuthenticationMechanism).
    I wonder how Powershell itself does the thing....
    There must be a way to connect with the current user credentials...
    I you know, how this can be done, then provide a short snippet - please.
    Please no links or something like "...try to use blablabla" - thanks :)
    The thing that I would like to do is :
    - configure a runspace for the exchange server (WITHOUT user/password)
    - create that runspace
    - create a pipeline with that
    - add a command/parameters
    - invoke
    - examine the results
    - clean up
    As I mentioned above - all things work well - except the thing with the "trusted connection".
    It works only, if I provide a username and a password in the PSCredential parameter....
    ...but it should work without it...
    Please provide a tested and running example :)
    Best regards
    dp.

    Dear all,
    I would like to know, how I can open a runspace to an Exchange Server 2013 WITHOUT explicitelly applying username and password (well - this works using basic authentication).
    Following scenario :
    - A (well patched) Win 7 Enterprise Client with Exchange 2013 Client Tools installed
    - Logged in as (the) domain admin
    - Using Exchange Management Shell I can administer Exchange WITHOUT entering username/password
    - Using C# I cannot :(
    Nothing helped (DefaultCredentials [even with Releasebuild], PSCredentials.Empty or null, tried All members of AuthenticationMechanism).
    I wonder how Powershell itself does the thing....
    There must be a way to connect with the current user credentials...
    I you know, how this can be done, then provide a short snippet - please.
    Please no links or something like "...try to use blablabla" - thanks :)
    The thing that I would like to do is :
    - configure a runspace for the exchange server (WITHOUT user/password)
    - create that runspace
    - create a pipeline with that
    - add a command/parameters
    - invoke
    - examine the results
    - clean up
    As I mentioned above - all things work well - except the thing with the "trusted connection".
    It works only, if I provide a username and a password in the PSCredential parameter....
    ...but it should work without it...
    Please provide a tested and running example :)
    Best regards
    dp.

  • Load XML file from addon domain without cross-domain Policy file

    Hello.
    Assuming that there are two addon domains on the same server: /public_html/domain1.com       and      /public_html/domain2.com
    I try to load XML file from domain2.com into domain1.com without using cross-domain policy file (since it doesn’t work on xml files in my case).
    So the idea is to use php file in order to load XML and read it back to flash.
    I’ve found an interesting scripts that seems to do the job but unfortunately I can't get it to work. In my opinion there is somewhere problem with AS3 part. Please take a look.
    Here are the AS3/PHP scripts:
    AS3 (.swf in www.domain1.com):
    // location of the xml that you would like to load, full http address
    var xmlLoc:String = "http://www.domain2.com/MyFile.xml";
    // location of the php xml grabber file, in relation to the .swf
    var phpLoc:String = "loadXML.php";
    var xml:XML;
    var loader:URLLoader = new URLLoader();
    var request:URLRequest = new URLRequest(phpLoc+"?location="+escape(xmlLoc) );
    loader.addEventListener(Event.COMPLETE, onXMLLoaded);
    loader.addEventListener(IOErrorEvent.IO_ERROR, onIOErrorHandler);
    loader.load(request);
    function onIOErrorHandler(e:IOErrorEvent):void {
        trace("There was an error with the xml file "+e);
    function onXMLLoaded(e:Event):void {
        trace("the rss feed has been loaded");
        xml = new XML(loader.data);
        // set to string, since it is passed back from php as an object
        xml = XML(xml.toString());
        xml_txt.text = xml;
    PHP (loadXML.php in www.domain1.com):
    <?php
    header("Content-type: text/xml");
    $location = "";
    if(isset($_GET["location"])) {
        $location = $_GET["location"];
        $location = urldecode($location);
    $xml_string = getData($location);
    // pass the url encoded vars back to Flash
    echo $xml_string;
    //cURLs a URL and returns it
    function getData($query) {
        // create curl resource
        $ch = curl_init();
        // cURL url
        curl_setopt($ch, CURLOPT_URL, $query);
        //Set some necessary params for using CURL
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
       //Execute the curl function, and decode the returned JSON data
        $result = curl_exec($ch);
        return $result;
        // close curl resource to free up system resources
        curl_close($ch);
    ?>

    I think you might be right about permissions/settings on the server for php. Unfortunately I'm not allowed to adjust them.
    So I wrote my own script - this time I used file path instead of http address of the XML file.  It works fine in my case.
    Here it is:
    XML file on domain2.com:
    <?xml version="1.0" encoding="UTF-8"?>
    <gallery>
        <image imagePath="galleries/gallery_1/images/1.jpg" thumbPath="galleries/gallery_1/thumbs/1.jpg" file_name= "1"> </image>
        <image imagePath="galleries/gallery_1/images/2.jpg" thumbPath="galleries/gallery_1/thumbs/2.jpg" file_name= "2"> </image>
        <image imagePath="galleries/gallery_1/images/3.jpg" thumbPath="galleries/gallery_1/thumbs/3.jpg" file_name= "3"> </image>
    </gallery>
    swf  on domain1.com:
    var imagesXML:XML;
    var variables:URLVariables = new URLVariables();
    var varURL:URLRequest = new URLRequest("MyPHPfile.php");
    varURL.method = URLRequestMethod.POST;
    varURL.data = variables;
    var MyLoader:URLLoader = new URLLoader;
    MyLoader.dataFormat =URLLoaderDataFormat.VARIABLES;
    MyLoader.addEventListener(Event.COMPLETE, XMLDone);
    MyLoader.load(varURL);
    function XMLDone(event:Event):void {
        var imported_XML:Object = event.target.data.imported_XML;
        imagesXML = new XML(imported_XML);
       MyTextfield_1.text = imagesXML;
       MyTextfield_2.text = imagesXML.image[0].attribute("thumbPath");  // sample reference to attribute "thumbPath" of the first element
    php file on domain1.com:
    <?php
    $xml_file = simplexml_load_file('../../domain2.com/galleries/gallery_1/MyXMLfile.xml');  // directory to XML file on the same server
    $imported_XML = $xml_file->asXML();
    print "imported_XML=" . $imported_XML;
    ?>
    Regards
    PS: for those who read the above discussion: the first and the second script work but you must test which one is better in your situation. The first script will also work between two domains on different servers. No cross domain policy file needed.

  • Message split without BPM?

    Can we do correlation (message merge) without bpm. I mean Is there any adwanced service pack which support this,so that we can avoid bpm?

    Hi,
    Ur subject and ur question is confusing.....
    Message split means splitting the one message into N message that is 1:N
    And message merge is merging the N message to 1 message N:1.
    Wat u want to do...can you pls explain with example.
    Correlation is a functionality provided in BPM.
    Thnx
    Chirag

  • MIRO. Amount Split without Taxes Code

    Hi,
    I´m trying to make a "MIRO" "Invoice Verification"  from a Purchase Order witn only one item.
    I want to split the amount in two parts, in order to assign each part a different Tax Code.
    Somehow, I cannot see the Tax Code Field, in the "Amount Split" TAB.
    Does anybody know how can i display this field?
    Does anyboby know a different way to solve this problem?
    Thanks in advanced?

    Hi
    I really appreciate your answer.
    I tried to do what you suggested, but it is impossible in my system. I cannot leave the TAX CODE field in blank in the position. The system gives me an error "m8249" "Enter a tax code".
    I tried to find out where I could erase this message in Customizing, without success.
    Does anybody know, where i can set this field as not a mandatory field for the MIRO?
    Thanks,

  • Create source system without cross client config

    The SAP-Help URL given below explains the prerequisites for linking BW to a source system. One of the requirements is that the source client is open for cross client configuration.
    Is there a way to create the source system without having cross client rights in each source client?
    I understand that the client only has to be open while it is being linked to the BW system but I would prefer to avoid opening the client at all.
    Help URL:
    http://help.sap.com/saphelp_nw04/helpdata/en/80/1a61e5e07211d2acb80000e829fbfe/frameset.htm

    Hi ,
    You can perform the following check :-
    1) Check if BI DBMS and Source DBMS are same. If not then you have to Install DB Client for that Source then this error should not come.
    2)Check if DBSL(Data Base shared Library is installed in BI for this Source. If not Kindly Install that in BI server.
    Kindly perform these operations and lets see what happens.
    Regards,
    Amit Kumar trivedi

  • Actual Cost Component Split for cross company code transfers.

    Hi,
    My issue is as follows.
    Production process spans across 2 company codes.
    Goods are produced in production company code, transferred (via stock transport order) to marketing company code and sold to customers from marketing company code.
    Stock transport order follows sales scenario i.e.. marketing company code creates purchase order for goods from production company code and production company code bills marketing for the goods.
    Actual costing / Material ledger is implemented in both company codes.
    We would like to roll-up (transfer) actual cost component split from production company code to marketing company (in a similar way as in product cost planning in cross-company scenario).
    However, due to the fact that the transfer between the companies is in fact a "sales" the goods in marketing company code are seen as externally purchased and the only cost component we can create is based on PO conditions. But we want to get the info about production cost component split.
    Once again this is for ACTUAL cost component split.
    I would be grateful for any ideas.
    Thanks,
    Szymon

    Hi Udo / Szymon.
    I have a question about this issue.
    In the sap help  about multiple valuations / group costing:
    http://help.sap.com/saphelp_46c/helpdata/en/7e/cb848443a311d189ee0000e81ddfac/content.htm
    Its not clear if this can roll up the Actual CCS? or what it do? My question is because i read the documentation of  bussiness function: LOG_MM_SIT,and also the book *Actual Costing with The SAP Material Ledger*
    states that we can handle the rollup of actual cost component split inter-company only with this BF active.
    Could you clarify about this?
    thanks!!
    Arturo.
    Group Valuation
    Goods movements between affiliated companies not involving intercompany profits are processed using the group view. This view determines the actual cost of goods manufactured for the group, and does not include any intercompany profits. You can, however, display internal profits as delta profits in the legal and/or profit center views.
    When you define cost components, you can specify that internal profits between company codes and/or profit centers are shown in detail in the cost component split. You activate these delta profits for the group valuation in the attributes of the cost components.
    For each cost component structure, there can only be one cost component under which the delta profit is shown. This means that neither the legal view nor the profit center view can have more than one cost component for the delta profit.
    To cost multiple values, you define a costing type for each valuation approach in Customizing for Product Cost Planning. You use the costing type to specify which valuation approach you require. You define each costing type in a new costing variant and carry out a cost estimate with this costing variant.
    Group Costing and Multiple Valuation Approaches
    In-Depth Detail of the Value-Added Chain: Partner Cost Component Split
    You can display in detail the costs of materials and services of every company department in the value-added chain for every stage of the production process. The partner can be traced for every material used. To do this, you define a partner version, which enables the value-added portions of each manufacturing level to be displayed in detail. For further information about this, see Partners and Direct Partners.
    The group cost component split can be displayed according to your partner definition. You can display the cost structures of the partners hierarchically according to your requirements, such as the company code segments on the highest level and the plant or profit center segments underneath.
    To display partner cost component splits, define a partner version in Customizing and enter it in the costing type.

Maybe you are looking for

  • Hacking Apple's CD-ROM extensions

    I have burned a 701.2 MB CD-ROM containing old Macintosh software using my '17 iMac G5. I have tried the downloadable Apple CD-ROM Extension 5.4 & I have extracted version 5.4.2 of the Apple CD-ROM Extension from my Mac OS 8.1 CD-ROM by using TomeVie

  • Tax Amount Split in AP Credit Note

    Hi Everyone, While trying to Split the tax amount in Print Layout Design for AP Credit Note, I didn't get the desired result. Instead it brings over 1000 tax amount records. When doing the same procedure for AR Invoice, it comes up with the correct r

  • Mouse right click button, popup menu, PC frozen

    Hello all, It has been while I've been noticing this problem. Almost every time I click with the right mouse button on an email from the list of emails or a word inside the content of an email to see which words are suggested by the spell checker, th

  • Captivate 2 Zoom In - How can I do that?

    Hello, I saw the Captivate 2 "Zoom In" introduction video at Adobe website. The video show the "Sleeping Girl" picture zoom in larger and larger smoothly. How can I do that? Thanks and best regards Alex

  • Why won't a Windows 7 client connect to my web server?

    I've got 5 Mac clients that can connect to my Snow Leopard server. They use file sharing, iCal, and web services. We're trying to put a Windows 7 client on the network to use just file sharing and web services. Unfortunately, I can't get the Windows