Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84248members
353347posts

[Imported] QueryPad Executing Bulk INSERT Statements

EcoStruxure Geo SCADA Expert Forum

Find out how SCADA systems and networks, like EcoStruxure Geo SCADA Expert, help industrial organizations maintaining efficiency, processing data for smarter decision making with IoT, RTU and PLC devices.

sbeadle
Janeway Janeway
Janeway
0 Likes
0
307

[Imported] QueryPad Executing Bulk INSERT Statements

>>Message imported from previous forum - Category:ClearSCADA Software<<
User: florian, originally posted: 2018-10-25 19:58:51 Id:293
This is a re-posting from the obsoleted (October 2018) "Schneider Electric Telemetry & SCADA" forum.

-------------------------------
**_nminchin:_**
**_I have 2,700 insert statements that I want to execute in QueryPad, except when I try even 2 at once, I get an error:_**

**_*** Prepare failed - Query error. ***_**
**_*** Unexpected (Line = 2, Col = 1) ***_**

**_which points to the start of the 2nd insert statement... Which makes me think that it's not possible to execute multiple statements in the one execution..._**

**_Is this correct? Or can I add a delimiter (;??) to the end of each statement to execute them one-by-one?_**

**_Cheers!_**

-----------------------

bevanweiss:
Hey Nick,
This is a deliberate limitation to the ClearSCADA Query Processor.
In talks with Schneider, they will not change this anytime soon, it is considered something of a 'safety feature' as it prevents the Little Bobby Tables scenario....

--------------------

AWoodland:
Does it HAVE to be QueryPad, couldn't using vbscript and Server.Query do what you want?

I use Sublime when I need to bulk edit rows (i.e. to add Something = Server.Query(" to the start of each line, and ") to the end)

-----------

**_nminchin:_**
**_Thanks guys._**

**_Adam: yep, I think I'll need to resort to using VBScript. I was hoping for something quick and simple so that I didn't have to code anything. I would normally use a spreadsheet AI tool I wrote, but they don't have Excel on the server :)_**

--------------

davidhopkins:
For this kind of requirement, the ClearSCADA .NET API (combined with LINQPad or Visual Studio Code for a light but powerful code editor) is the bee's knees. You can get a lot done very quickly, you can use C# and Linq, the IntelliSense is really good. Much better than the VBscript COM API.

Visual Studio Code even gives you the IntelliSense for free (it's a paid feature in LINQPad).