Row Limit on INSERT ... SELECT ... UNION ALL Statements?

Colleagues-

SQL CE 3.5. Running a multi-row insert query like:

INSERT INTO [Device] (Alias) 
SELECT 'Device1' UNION ALL
SELECT 'Device2' UNION ALL
...

I read that there is no limit on query length, but I seem to remember running into  a problem a while back where I getting runtime exceptions when inserting too many rows in a single query. Does anybody know of such a limit, or did I cut this memory from whole cloth?

Thanks!


  • Edited by Tim Trese 11 hours 32 minutes ago
August 28th, 2015 12:32pm

Hi Tim,

Do you think you might be hitting this? http://erikej.blogspot.com/2010/05/faq-why-does-my-changes-not-get-saved.html.  You may need to force a commit to see your changes reflected in the data.

Sincerely,

IoTGirl

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 3:10pm

Thanks for reply, IoTGirl. I don't see much by following the links that seems relevant to my problem, but my question needs clarification. There wasn't any issue with seeing changes in data. I'm revising it a bit--the problem I recall had to do with runtime exceptions caused by too-long insert statements.
August 28th, 2015 3:37pm

Hi Tim,

You will need to provide more detail as to the situation and error codes to get a more specific answer.

I suspect the environment will be important as well.  For example a CE device connected over wifi may time out on an update as it drives out of a warehouse and out of range. That was not due to the dataset size but a time out on connectivity.

Sincerely,

IoTGirl

Free Windows Admin Tool Kit Click here and download it now
August 28th, 2015 4:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics