Skip to Content
0

UPDATE Or COPY through SQL in a UDT

Sep 09, 2017 at 02:39 PM

70

avatar image
Former Member

Hello,

How can i delete or copy data from one Column into another one ( Or simply delete Data ) in a UDT ?

I have more than 3000 Data entries in a UDT that i need to delete or to copy data from one Column into another so that my Query works.

is that possible through UPDATE or DELETE in a Query?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

DIEGO LOTHER Sep 09, 2017 at 08:55 PM
0

Hi muhammed,

Look this explanation of what is allowed.

https://blogs.sap.com/2016/07/28/guidelines-for-modifying-sap-business-one-data/

Hope it helps.

Kind Regards.

Diego Lother

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Diago and thanks for your Answer.

Allows or not its another Topic and in my case it is allowed because its a UDT of type NO OBJECT. The Problem is that is not working and i thought maybe the system does not allow these commands on UDT but as it looks like it is okay.

I dont know why it is not working!!! I dont even become any Error-Message! It doesnt work simply...

0

Hi Muhammed,

Probably your query have some error, but when you execute it inside B1 on query manager, it's common the application does not return any error.

Try run your query directly on database through SQL Server management(SQL Server) or Hana B1 studio(Hana), with this I believe you will be able to get the correct error.

If doesn't work, share your query with us for a better help.

Hope it helps.

Kind Regards,

Diego Lother

0
Former Member

Hello again :)

My Query can not have an error because it is the simpliest Query at all :D

Simply

Delete * from [dbo].[@myTable] where ......

The same Code works with normal Tables ( I know it is not allowed but only for test ) but only when i use it for my UDT it does not.

0

Hi Muhammed,

Did you execute your query on sql management studio?

The delete instruction cannot contain "*", then the correct query should be:

DELETE FROM [@myTable] WHERE .....

If you execute your query on sql management studio you are able to see the correct error message or a successful message.

Hope it helps.

Kind Regards,

Diego Lother

0