Solved

Problem with simple sql and sqlcompact database

Posted on 2014-10-09
3
73 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 49

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 49

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

735 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