on 10-01-2009 11:43 AM
Hi,
I am using the following structure for delete operation:
<root>
<StatementName2>
<TABLE_NAME Action="SQL_DML">
<access>delete from TABLE_NAME where birth_date<=sysdate and id=1234 and flag='Y'</access>
</TABLE_NAME>
</StatementName2>
</root>
When I use the above strcture, in audit log i can see the delete query as
delete from TABLE_NAME where birth_date<=sysdate and id=1234 and flag=Y
Channel throws no error but data is not deleted because Y is not getting enclosed in single quotes.
I tried the below structure to overcome quotes problem:
<root>
<StatementName2>
<TABLE_NAME Action="SQL_DML">
<access>delete from TABLE_NAME where birth_date<=sysdate and id=1234 and flag='$FLAG$'</access>
<key>
<FLAG>'Y'</FLAG>
</key>
</TABLE_NAME>
</StatementName2>
<root>
Now in audit log query comes properly like
delete from TABLE_NAME where birth_date<=sysdate and id=1234 and flag='Y'
But it throws 'SQL command not properly ended' error.
Edited by: Vishal.P.Kulkarni on Oct 1, 2009 12:44 PM
Add the attribute "hasQuot" to FLAG and pass value YES as shown in my blog.
/people/prateek.srivastava3/blog/2009/04/02/unicode-handling-for-ms-sql-server
Regards,
Prateek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.