You are viewing limited content. For full access, please sign in.

Question

Question

Custom Query - Table Name "?" Value

asked on August 16, 2017

I'm running into an issue where I'm using a token to pass the table name for a custom delete query but it's giving me an error. I'm including screen shots of the query and the error. It works fine if I just enter the table name. The table names are in this format "LastName, FirstName" without the quotes. So a working query would look like this: 

DELETE FROM [dbo].[Smith, John]

 Any ideas would be helpful! Thanks!

customquery.png
customqueryerror.png
customquery.png (791.61 KB)
0 0

Answer

SELECTED ANSWER
replied on August 16, 2017

I don't think you can use a variable/parameter for the table name.

0 0
replied on August 16, 2017

Well that's not going to be fun... Can I get confirmation from a Laserfiche tech on this?

0 0
replied on August 16, 2017

Yes, Jason is correct. Table names are not query parameters.

0 0
replied on August 16, 2017

Thanks Miruna and Jason. 

0 0
replied on August 16, 2017

A way to work around this is described in this thread. Please make sure to read the posts on its possible drawbacks and understand the security implications of this solution.

0 0
replied on August 16, 2017

I'll take a look at it. Thanks.

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.