0

I'm new with LinqPad and I would like to run two simple SQL statements at the same time so I can see the values in two tables. If I run the following individually it works but now when I run them at the same time. I get an error "invalid character".

Select * From Table1; Select * From Table2;

I found this article that suggests this format but it's not working for me. How to run multiple SQL queries?

BTW: I'm using the free version of LinqPad 5.00.08 at the moment.

Community
  • 1
  • 1
  • 1
    Strange. That should work, as should entering the commands on different lines or even just separating them by a space – sgmoore Aug 29 '15 at 10:05
  • When I try to run the commands on different lines I get an error "ORA-00933: SQL command not properly ended". I'm not using any commas or semi-colon, just spaces. – David Caver Aug 31 '15 at 14:30
  • So you're saying that I should be able to do this? That makes me wonder if I have a bug going on with my install or version. – David Caver Aug 31 '15 at 14:31
  • You _can_ do this on MS SQL. What you're trying to do may not be possible on Oracle. Try wrapping the statements in `BEGIN` and `END` and see if that helps. – Corey Sep 02 '15 at 05:07
  • Thanks for the suggestion but unfortunately BEGIN/END didn't work either. I'm extremely frustrated with it. I'm sure it's an Oracle thing and that it would work without issue on SQL. Unfortunately the company uses Oracle for most of their DB servers so my hands are tied. I've been using SQL for over 15 yrs but new to Oracle. So far I'm not a fan of Oracle and one of the reasons I want to use LinqPad is for a SQL Studio Mgr type of software as well as working with Linq. – David Caver Sep 03 '15 at 17:07

2 Answers2

1

I know this is old, but I found this in my search for the same problem. (Using a SQL Server Compact database.) The way I was able to get mine to work was to add GO after each query.

SELECT * FROM Table1;
GO
SELECT * FROM Table2;
GO
0

You need to use Dump function

Table1.Dump();
Table2.Dump();
user280723
  • 21
  • 2