Solved

Inserting multiple rows into sql mobile

Posted on 2008-06-18
1
599 Views
Last Modified: 2008-06-18
Hi i know this isn't sql server per se but hopefully someone may be able to help...

I'm using management studio to connect to my sql mobile database.

I'm trying to insert some dummy data into some tables, for example:

INSERT INTO FlooringTypes (FlooringType) VALUES ('Carpet')
INSERT INTO FlooringTypes (FlooringType) VALUES ('Smooth')

However it returns the error:
Major Error 0x80040E14, Minor Error 25501
> SELECT 'Carpet' INTO FlooringType
There was an error parsing the query. [ Token line number = 1,Token line offset = 17,Token in error = INTO ]

If i run them seperately it works fine.
I understand sql mobile doesn't support multiple select statements, is there a way around this at all as i have to insert quite a lot of dummy data and running one statement at a time is going to take forever.

Thanks
Rob
0
Comment
Question by:Type25
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 500 total points
ID: 21811114
INSERT INTO FlooringTypes (FlooringType)
SELECT'Carpet'
UNION ALL SELECT 'Smooth'
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question