{"id":6455,"date":"2018-02-23T11:58:13","date_gmt":"2018-02-23T10:58:13","guid":{"rendered":"http:\/\/help.sdna.lu\/?p=6455&#038;lang=en"},"modified":"2022-12-18T11:12:54","modified_gmt":"2022-12-18T10:12:54","slug":"query-to-create-job-services-based-upon-job-service","status":"publish","type":"post","link":"https:\/\/sdna.lu\/?p=6455","title":{"rendered":"Query to create Job Services based upon Job Service"},"content":{"rendered":"<p>Use this query to create Job Services based upon a single Job Service:<\/p>\n<p><code>Insert Into [JobService] ([DBId], [Id], [JobId], [ServiceId], [Num], [Description], [DescriptionExcess], [ClientId], [FeeType], [FeeTypeTrigger], [Fees], [ACFees], [Limit], [IndexValue], [IndexArticleId],<br \/>\n[IndexCalcAmount], [YearlyCyAmount], [YearlyIndexCalcAmount], [CommissionArticleId], [CommissionRate], [CommissionAmount], [CommissionACAmount], [IncludeInInvoice], [Frequency],<br \/>\n[FrequencyNum], [FrequencyType], [FrequencyDate], [RepeatMonth], [RepeatNumber], [TimeReportTypeId], [NumberOfUnits], [StartDate], [EndDate], [CurrencyId], [ACCurrencyId],<br \/>\n[GLAccountId], [VATId], [VATCode], [VATRate], [ArticleId], [CountryIndexId], [CountryIndexTypeId], [LastInvoiceTId])<br \/>\nSelect [JobService].[DBId],<br \/>\nROW_NUMBER() OVER(ORDER BY [Job].[Number]) + nnnnn AS [ResId],<br \/>\n[Job].[Id] as [JobId],<br \/>\n[JobService].[ServiceId],<br \/>\n[JobService].[Num],<br \/>\n[JobService].[Description],<br \/>\n[JobService].[DescriptionExcess],<br \/>\n[Job].[ClientId] as [ClientId],<br \/>\n[JobService].[FeeType],<br \/>\n[JobService].[FeeTypeTrigger],<br \/>\n[JobService].[Fees],<br \/>\n[JobService].[ACFees],<br \/>\n[JobService].[Limit],<br \/>\n[JobService].[IndexValue],<br \/>\n[JobService].[IndexArticleId],<br \/>\n[JobService].[IndexCalcAmount],<br \/>\n[JobService].[YearlyCyAmount],<br \/>\n[JobService].[YearlyIndexCalcAmount],<br \/>\n[JobService].[CommissionArticleId],<br \/>\n[JobService].[CommissionRate],<br \/>\n[JobService].[CommissionAmount],<br \/>\n[JobService].[CommissionACAmount],<br \/>\n[JobService].[IncludeInInvoice],<br \/>\n[JobService].[Frequency],<br \/>\n[JobService].[FrequencyNum],<br \/>\n[JobService].[FrequencyType],<br \/>\n[JobService].[FrequencyDate],<br \/>\n[JobService].[RepeatMonth],<br \/>\n[JobService].[RepeatNumber],<br \/>\n[JobService].[TimeReportTypeId],<br \/>\n[JobService].[NumberOfUnits],<br \/>\n[JobService].[StartDate],<br \/>\n[JobService].[EndDate],<br \/>\n[JobService].[CurrencyId],<br \/>\n[JobService].[ACCurrencyId],<br \/>\n[JobService].[GLAccountId],<br \/>\n[JobService].[VATId],<br \/>\n[JobService].[VATCode],<br \/>\n[JobService].[VATRate],<br \/>\n[JobService].[ArticleId],<br \/>\n[JobService].[CountryIndexId],<br \/>\n[JobService].[CountryIndexTypeId],<br \/>\n[JobService].[LastInvoiceTId]<br \/>\nfrom [JobService], [Job]<br \/>\nwhere [JobService].[DBId] = 1 and [JobService].[Id] = xxxxx<br \/>\nand [Job].[DBId] = zzzzz and Not [Job].[Id] = yyyyy<br \/>\nand [Job].[Number] like '% - Advisory'<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Use this query to create Job Services based upon a single Job Service: Insert Into [JobService] ([DBId], [Id], [JobId], [ServiceId], [Num], [Description], [DescriptionExcess], [ClientId], [FeeType], [FeeTypeTrigger], [Fees], [ACFees], [Limit], [IndexValue], [IndexArticleId], [IndexCalcAmount], [YearlyCyAmount], [YearlyIndexCalcAmount], [CommissionArticleId], [CommissionRate], [CommissionAmount], [CommissionACAmount], [IncludeInInvoice], [Frequency], [FrequencyNum], [FrequencyType], [FrequencyDate], [RepeatMonth], [RepeatNumber], [TimeReportTypeId], [NumberOfUnits], [StartDate], [EndDate], [CurrencyId], [ACCurrencyId], [GLAccountId], [VATId], [VATCode], [VATRate], [&hellip;]<\/p>\n","protected":false},"author":19,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[487],"tags":[],"class_list":["post-6455","post","type-post","status-publish","format-standard","hentry","category-query"],"_links":{"self":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/6455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6455"}],"version-history":[{"count":2,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/6455\/revisions"}],"predecessor-version":[{"id":6457,"href":"https:\/\/sdna.lu\/index.php?rest_route=\/wp\/v2\/posts\/6455\/revisions\/6457"}],"wp:attachment":[{"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sdna.lu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}