· 7 years ago · Dec 13, 2018, 07:16 PM
1TITLE: Microsoft SQL Server Management Studio
2------------------------------
3
4Could not import package.
5Warning SQL0: A project which specifies Microsoft Azure SQL Database v12 as the target platform may experience compatibility issues with SQL Server 2014.
6Warning SQL72012: The object [ultra_testing_Data] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
7Warning SQL72012: The object [ultra_testing_Log] exists in the target, but it will not be dropped even though you selected the 'Generate drop statements for objects that are in the target database but that are not in the source' check box.
8Error SQL72014: .Net SqlClient Data Provider: Msg 156, Level 15, State 1, Procedure SearchCommunicationTicket, Line 12 Incorrect syntax near the keyword 'if'.
9Error SQL72045: Script execution error. The executed script:
10
11CREATE PROCEDURE [SearchCommunicationTicket]
12 @UserId int,
13 @keyword [nvarchar](200)
14AS
15BEGIN
16
17
18
19
20
21 drop table if exists #Temp
22
23 create table #Temp
24 (
25 TicketID int
26 )
27
28 INSERT INTO #Temp
29
30
31 SELECT Id FROM CommunicationTickets
32 WHERE
33 ( CreatorUserId IN
34 (
35 SELECT Id
36 FROM AbpUsers
37 WHERE Id = @UserId
38 )
39 )
40 OR
41 ( Id IN
42 (
43 SELECT CommunicationTicketId
44 FROM CommunicationTicketMessages
45 WHERE CreatorUserId = @UserId
46 )
47 )
48 OR
49 ( Id IN
50 (
51 SELECT CommunicationTicketId
52 FROM CommunicationTicketRecipients
53 WHERE UserId = @UserId
54 )
55 )
56 --Where CommunicationTicketMessages.CommunicationTicketId IN (SELECT Id FROM #Temp)
57 SELECT ct.Id FROM [CommunicationTickets] AS ct
58 JOIN AbpUsers AS creator ON creator.Id = ct.CreatorUserId
59 INNER JOIN [AbpUserOrganizationUnits] AS uou ON uou.UserId = creator.Id
60 INNER JOIN [AbpOrganizationUnits] AS ou ON ou.Id = uou.OrganizationUnitId
61 WHERE ct.Id IN (SELECT TicketID FROM #Temp)
62 AND (ct.Id LIKE '
63 (Microsoft.SqlServer.Dac)
64
65------------------------------
66BUTTONS:
67
68OK
69------------------------------