Solved

Problem with simple sql and sqlcompact database

Posted on 2014-10-09
3
71 Views
Last Modified: 2014-12-09
Hi.

This sql, makes an sql error.
 "select a.navn, (select count(navn) from produkt) as counter from produkt as a "
It dosent seem to work with my sdf database in webmatrix.
Is it possible that select in select is not supportet?
0
Comment
Question by:bongii
  • 2
3 Comments
 
LVL 47

Accepted Solution

by:
Vitor Montalvão earned 500 total points
ID: 40370712
What are you trying to do and what's the error message?
Maybe this alternative query is what you are looking for?
select navn, count(navn) as counter 
from product
group by navn

Open in new window

0
 

Author Comment

by:bongii
ID: 40370940
It´s just an example. The select in select is an other table off couse.

System.Data.SqlServerCe.SqlCeException: There was an error parsing the query


 "select a.navn, (select count(navn) from pictures) as counter from produkt as a "
0
 
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 40370957
Can't you post the real query?
That error means you have something written that MSSQL doesn't understand. Maybe some column or table name with space (then you need to use brackets to enclose the column/table name) or you are using some reserved word as column or table name.
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
DTS Connection Failed 7 66
script to send html report 3 32
Sql Stored Procedure 65 26
Query Help - MSSQL - Averages 5 25
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
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.

786 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