14
Views
7
Comments
Solved
Delete Statement error
Question

Halo,

I am facing error when to do my delete statement, anyone of you can help me?

Please find the attached file.


Thank you



deletestatementerror.png

Rank: #55
Solution

Hi Jing,


Try it like this:


DELETE FROM {Visitor}

WHERE NOT EXISTS (SELECT 1 FROM {Visit} WHERE {Visit}.[VisitorId] = {Visitor}.[Id])


EDIT: Besides the syntax, you will also need to add an output structure like it is mentioned below.

Hope it helps.


Kind Regards,
João

Hi Jingtung,

As mentioned in the error message, you still need to put an Output structure (same requirement for Select) for a delete process.

Kind regards,

Chris

Rank: #300

Hello,

Please set a structure under Output Entities / Structures folder available into the screen you had shared.  I have highlighted for your reference.

Thanks & Kind Regards,

Sachin


Rank: #33495

Halo All,

Thanks for your replied.

Like this correct? 

Please find the attached file.


Thank you


sample1.png

Rank: #55

Since the DELETE operation in SQL doesn't return you anything, you actually just need to place an output structure or entity because Service Studio needs one.


So you can place there any entity and it would be good :)


Rank: #300

Yes, that is correct. However, I guess you need only first one.

Rank: #33495

ok, so I just leave it like this.

Thank you so much