Solved

Inserting multiple rows into sql mobile

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

747 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

12 Experts available now in Live!

Get 1:1 Help Now