Solved

Inserting multiple rows into sql mobile

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

772 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