473,419 Members | 3,464 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

MS Sql Server Express vs. Visual Studio? Embedded DISTINCT functionality?

I've been having issues running certain commands in Sql Server Express 2008.

One of the specific commands in question looks like this:

Expand|Select|Wrap|Line Numbers
  1. SELECT COUNT(DISTINCT Sno) as NumberShipping
  2. FROM SHIPMENT;

This commands works perfectly in visual studio 2008, but I get an error in sql server express.

The error is:
There was an error parsing the query. [ Token line number = 1,Token line offset = 14,Token in error = DISTINCT ]


I was also unable to use varchar(), float, real, and have been unable to get an "except" statement working. Does sql server express not support these commands, or did I more than likely end up with a bad installation?

Thanks!
Oct 11 '10 #1
4 2224
NeoPa
32,556 Expert Mod 16PB
Try :
Expand|Select|Wrap|Line Numbers
  1. SELECT   Count(*)
  2. FROM     (
  3.     SELECT DISTINCT [SNO]
  4.     FROM   [Shipment]
  5.     )

Joe Willis:
BTW: I'm wondering if my SQL Server Express installed correctly. Currently, it doesn't recognize varchar's, and I have yet to be able to get an "except" clause working without an error.
Sounds like a completely separate question. If you're interested, then post a new thread. It's not relevant here.
Oct 11 '10 #2
NeoPa
32,556 Expert Mod 16PB
Joe, I know you posted the first time before registering, but do you really think double posting your question will get you help any quicker?

I suggest all you'll get is grief from all the experts whose time you've wasted. Not a great start.

PS. I've moved the other response in here and deleted the older thread. If the response isn't an exact match to the question then you know why.
Oct 11 '10 #3
I'm sorry NeoPa, I couldn't find my original post before registering.

Expand|Select|Wrap|Line Numbers
  1.  
  2.  
  3.     SELECT   Count(*)
  4.     FROM     (
  5.         SELECT DISTINCT [SNO]
  6.         FROM   [Shipment]
  7.         )
  8.  
  9.  
I had tried this aswell. Didn't work in sql express 2008.


On a side note, both of the above queries work in visual studio.
Oct 11 '10 #4
NeoPa
32,556 Expert Mod 16PB
Joe Willis:
On a side note, both of the above queries work in visual studio.
Bearing in mind Visual Studio is simply a view by which you see whichever SQL Server you're using, I'm guessing this is actually referring to a full SQL server. I have no idea why the Express edition would behave any differently from the full edition, but that would be the best area to look in if that's the case. It would be a surprise for me I admit, but if that's what you're seeing I doubt playing with the SQL code will help greatly.
Oct 11 '10 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jim Bayers | last post by:
I'm a bit new at this. The previous guy in my position set up visual studio .net to access applications on a webserver. It works fine. Now I have to move the applications over to a new server....
3
by: JM | last post by:
Good day. I was able to connect to a database server using SQL Server Enterprise Manager. The Server name specified on the tree is JOMARGON(Windows NT). But no server was detected using either...
3
by: Kieran Kelly | last post by:
Is it possible to create a new Web Application Project using Visual Studio.Net 2003 on Windows 2003 Server but no in the Default Web Site. 1. I have created a new Web Site in IIS called WebSite2...
6
by: Wardeaux | last post by:
Is there an article on how to configure Win2003 so that I can use with Visual Studio for ASP.NET development? I loaded Win2003, copied over my previous ASP.NET code, and still can't load the...
2
by: kennethgrice | last post by:
Hi, I am new to ASP.net and visual studio.net. I have created a new ASP.NET Web Application and have started with a simple form. I have created a simple test database that will store a...
0
by: Kurtz | last post by:
Hi, I developed a web application that run complete (all the functions) in a server with Visual Studio .NET 2003, but not run complete in a web server with .NET framework (both versions) and...
0
by: kolalakitty | last post by:
Hopefully someone here can help me/point me in the right direction. I've found tons of references towards making relations, creating rows, saving said rows, using datagrids, databinding objects,...
4
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
When I start the Visual Studio .NET 2005 on client machine, I select Tools and database connection (Database: SQL Server, security: windows authentication. Server: Server Machine name (not in the...
0
by: Dutt | last post by:
Microsoft Webcasts SQL Server 2008 Visual Studio 2008 http://msdotnetsupport.blogspot.com/2008/02/microsoft-webcasts-sql-server-2008.html
6
by: Cirene | last post by:
From my experience/undertanding SQL Server (and SQL Express) is the preferred db to use with Visual Studio and is very nicely integrated with it. It works well with the built in membership, etc......
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.