Skip to content
Advertisement

Tag: list

Build efficient SQL statements with multiple parameters in C#

I have a list of items with different ids which represent a SQL table’s PK values. Is there any way to build an efficient and safe statement? Since now I’ve always prepared a string representing the statement and build it as I traversed the list via a foreach loop. Here’s an example of what I’m doing: Which feels very unsafe

Array to string with Django and MySQL

I need to design SQL query in html on Django I have an array in my table like : When I call this array in my page : I have : [‘aa’, ‘bb’, ‘cc’] What do I do if I want : a b c I tried with .split(‘,’) but I’ve already ‘[]’ I tried with for item in list

C# SqlReader issue

I’am posting on this forum for the first time . and I really hope I can find some help . What I’am doing is load about … 1000 Value (example) from SQL and I’am doing it just fine . the query for example is : Select Value from DatabaseA.dbo.Values that “Value” ==> decimal(10, 2) this propably should work fine .