Solved

Inserting multiple rows into sql mobile

Posted on 2008-06-18
1
586 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
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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now