Click here to Skip to main content
14,741,130 members
Home » Discussions » Database
   

Database

 
AnswerRe: How to create a insert trigger on just one table? Pin
Mycroft Holmes22-May-18 15:09
professionalMycroft Holmes22-May-18 15:09 
GeneralRe: How to create a insert trigger on just one table? Pin
CHill6022-May-18 23:56
mveCHill6022-May-18 23:56 
GeneralRe: How to create a insert trigger on just one table? Pin
Mycroft Holmes23-May-18 14:20
professionalMycroft Holmes23-May-18 14:20 
GeneralRe: How to create a insert trigger on just one table? Pin
Member23623-May-18 0:04
MemberMember23623-May-18 0:04 
GeneralRe: How to create a insert trigger on just one table? Pin
Mycroft Holmes23-May-18 14:23
professionalMycroft Holmes23-May-18 14:23 
QuestionFOR XML PATH is not creating Child elements if they are coming with null values Pin
indian14316-May-18 13:39
Memberindian14316-May-18 13:39 
AnswerRe: FOR XML PATH is not creating Child elements if they are coming with null values Pin
CHill6022-May-18 2:32
mveCHill6022-May-18 2:32 
QuestionEquivalent of the following query without FOR XML PATH Pin
indian14314-May-18 13:03
Memberindian14314-May-18 13:03 
Hi,

What is the equivalent of the following query without the FOR XML PATH, when removed the FOR XML PATH from the query it is giving error, can anybody please help with this regards, thanks in advance buddies.
SELECT
    vw_OwnerXML5010.Owner,
    vw_OwnerXML5010.Billing_EIN AS TP_EIN,
    vw_OwnerXML5010.TP_Name AS TP_NAME,
    vw_OwnerXML5010.County_Code AS County_Code,
    (
   SELECT
   (
    SELECT
        vw_ServiceFacilityXML5010.Service_Facility_NPI AS "Service_Facility_NPI",
        vw_ServiceFacilityXML5010.County_Owned_Indicator AS "County_Owned_Indicator",
    (
    Select 
        vw_ServicesXML5010.Procedure_Code AS "Procedure_Code",
        vw_ServicesXML5010.Modifier1 As "Modifier1",
        vw_ServicesXML5010.Modifier2 AS "Modifier2",
        vw_ServicesXML5010.Modifier3 AS "Modifier3",
        vw_ServicesXML5010.Modifier4 AS "Modifier4",
        vw_ServicesXML5010.From_Date AS "From_Date",
        vw_ServicesXML5010.To_Date AS "To_Date",
        vw_ServicesXML5010.Revenue_Code AS "Revenue_Code",
        vw_ServicesXML5010.Place_Of_Service AS "Place_Of_Service",
        vw_ServicesXML5010.Taxonomy_Code AS "Taxonomy_Code"
    FROM 
    vw_ServicesXML5010 
    WHERE
        vw_ServiceFacilityXML5010.Service_Facility_NPI = vw_ServicesXML5010.Service_Facility_NPI
        and vw_ServiceFacilityXML5010.County_Code = vw_ServicesXML5010.County_Code
        and vw_ServiceFacilityXML5010.Billing_EIN = vw_ServicesXML5010.Billing_EIN  
    --  and vw_ServiceFacilityXML5010.County_Code in ('01', '02')
    --  and vw_ServiceFacilityXML5010.Service_Facility_NPI = '1932328580'
    FOR XML PATH('Service'), TYPE , ELEMENTS XSINIL
    ) 
    FROM 
    vw_ServiceFacilityXML5010
    WHERE
        vw_ServiceFacilityXML5010.County_Code = vw_OwnerXML5010.County_Code
        and vw_ServiceFacilityXML5010.Billing_EIN = vw_OwnerXML5010.Billing_EIN
    --  and vw_ServiceFacilityXML5010.County_Code in ( '01', '02')
    --  and vw_ServicesXML5010.Service_Facility_NPI = '1932328580'
    FOR XML PATH ('TB_SERVICE_FACILITY'), TYPE
--  ) AS "BILLING_PROVIDERS/TB_BILLING_PROVIDER_FILE/TB_SERVICE_FACILITY" 
--) AS "TB_BILLING_PROVIDER_FILE/TB_SERVICE_FACILITY"   
--) AS "TB_BILLING_PROVIDER_FILE"   
) FOR XML PATH ('TB_BILLING_PROVIDER_FILE'), TYPE   
)
FROM 
    vw_OwnerXML5010
--  where vw_OwnerXML5010.County_Code in ('01', '02')
ORDER BY vw_OwnerXML5010.County_Code
FOR XML PATH ('TB_TRADING_PARTNER'), root('TB_BILLING_PROVIDER_FILES')

Thanks,

Abdul Aleem

"There is already enough hatred in the world lets spread love, compassion and affection."
SuggestionRe: Equivalent of the following query without FOR XML PATH Pin
CHill6015-May-18 1:11
mveCHill6015-May-18 1:11 
GeneralRe: Equivalent of the following query without FOR XML PATH Pin
indian14315-May-18 7:39
Memberindian14315-May-18 7:39 
GeneralRe: Equivalent of the following query without FOR XML PATH Pin
CHill6015-May-18 23:11
mveCHill6015-May-18 23:11 
GeneralRe: Equivalent of the following query without FOR XML PATH Pin
indian14317-May-18 15:56
Memberindian14317-May-18 15:56 
RantLatest Oracle Connection method Pin
Mycroft Holmes6-May-18 15:56
professionalMycroft Holmes6-May-18 15:56 
GeneralRe: Latest Oracle Connection method Pin
Jörgen Andersson16-May-18 1:20
professionalJörgen Andersson16-May-18 1:20 
GeneralRe: Latest Oracle Connection method Pin
Mycroft Holmes16-May-18 1:27
professionalMycroft Holmes16-May-18 1:27 
GeneralRe: Latest Oracle Connection method Pin
Jörgen Andersson16-May-18 1:37
professionalJörgen Andersson16-May-18 1:37 
QuestionSQL 2016 Optimization ... Pin
Member 138060854-May-18 2:10
MemberMember 138060854-May-18 2:10 
RantRe: SQL 2016 Optimization ... Pin
CHill604-May-18 2:13
mveCHill604-May-18 2:13 
AnswerRe: SQL 2016 Optimization ... Pin
Eddy Vluggen5-May-18 2:14
professionalEddy Vluggen5-May-18 2:14 
QuestionSQL 2016 Optimization ... Pin
Member 138060854-May-18 2:10
MemberMember 138060854-May-18 2:10 
QuestionHow to stop execution of other tasks in SSIS if a script task gets Dts.TaskResult = (int)ScriptResults.Failure; Pin
indian1432-May-18 15:12
Memberindian1432-May-18 15:12 
AnswerSelf answered just if somebody has similar problem it would be helpful. How to stop execution of other tasks in SSIS if a script task gets Dts.TaskResult = (int)ScriptResults.Failure; Pin
indian1433-May-18 9:41
Memberindian1433-May-18 9:41 
QuestionInsert dynamic SQL Values into Temp Table Pin
indian14326-Apr-18 8:03
Memberindian14326-Apr-18 8:03 
AnswerRe: Insert dynamic SQL Values into Temp Table Pin
Richard Deeming26-Apr-18 9:00
mveRichard Deeming26-Apr-18 9:00 
GeneralRe: Insert dynamic SQL Values into Temp Table Pin
indian14326-Apr-18 11:09
Memberindian14326-Apr-18 11:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.