Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Inserting multiple rows into sql mobile

Posted on 2008-06-18
1
Medium Priority
?
602 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 2000 total points
ID: 21811114
INSERT INTO FlooringTypes (FlooringType)
SELECT'Carpet'
UNION ALL SELECT 'Smooth'
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.

926 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