sql-server-2005-express

Delete rows from multiple tables using a single query (SQL Express 2005) with a WHERE condition

This is the query I'm using: DELETE TB1.*, TB2.* FROM TB1 INNER JOIN TB2 ON TB1.PersonID = TB2.PersonID WHERE (TB1.PersonID)='2' It's working fine in MS Access but getting error (Incorrect syntax near ','.) in SQL Server Express 2005. How to solve it? Please help. ...

SQL Server - can't do COUNT on DATEDIFF without doing CREATE VIEW

Hi, I am trying to get some information on the differences in two dates and how often that difference has occurred. I can use: SELECT DATEDIFF (day, db1.dbo.t1.Date1, db2.dbo.t2.Date2) AS Days FROM db1.dbo.t1 JOIN db2.dbo.t2 ON db1.dbo.t1.wID = db2.dbo.t2.cID AND db1.dbo.t1.Action LIKE 'Standard' ...

SQL Dependency with SQL Server express 2005

Is it possible to use SQL Dependency with SQL Server Express 2005 which comes with VS 2008? ...

Using SQL Express edition commercially

Can I use SQL Server Express edition for commercial use? Can our clients redistribute SQL Server Express edition with their application? ...

How to fill a varbinary(MAX) column with a default image for all the records in SQL Server 2005 Express

I want to fill the varbinary(MAX) column of a SQL Server database table when ever a new record is created with a default picture. How do I do this using a trigger or in that case by any other means? Any help is highly appreciated. Thank You This is the T-SQL code I have tried: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER TR...

SQL Server Bulk Insert Issue on Windows7

Hi, I’ve got an application that uses SQL Server Express 2005 SP3. This application is distributed to several hundred users, each of whom is running XP. However, our company will be moving to Windows7 soon. My application uses the bulk insert operation in SQL Server, and it runs fine in XP. However, in Windows7 I need to open SQL Ser...

SQL Server 2005 (Express) - Login vs User

I'm quite new to Microsoft SQL Server. I have some experience with MySQL, and there you have a user with priviliges, if I understand things right; these priviliges decide which databases you have access to on the MySQL server. However now I am in the situation where I have to restore a database on my SQL Server 2005 Express, and this da...

SQL Server Express 2005 set tcp listen port using command tool

Hello, I am making silent installation for SQL Server Express 2005 using the following command SECURITYMODE=SQL DISABLENETWORKPROTOCOLS=0 SAPWD="****" ADDLOCAL=SQL_Engine,SQL_Data_Files,SQL_Replication,Client_Components,Connectivity,SDK I need to know is there a parameter or a command line utility to configure the service to listen t...

How to configure SQL Server 2005

I have just downloaded SQL Server 2005 express edition from here: To be used as a database for a vb.net program. But I'm confused in using sql server. I do not know where to start from here: http://screencast.com/t/ZTdiMDU5 Do I have to create the database in vb.net?--> http://screencast.com/t/ZjRlYjkx If not, where could I create...

How do I copy records from one database to another?

I need to pull data from one SQL 2005 Express database to another and I need to do this periodically. It is not a straight copy from one table to another, but I would use different views from the source table. I also need to do this periodically. My first idea is to write a small application in C# and run it somehow in every hour or so...

SQL Server Management Studio Express 2005 has no Configuration Manager

Where is the configuration manager for SQL Express 2005? I need to configure SQL Server for TCP/IP but there is no configuration manager with the package. I see SQL Server Database Publishing Wizard, I see SQL Server Migration Assistant for Access, but no Configuration Manager. According to the MSDN, there should be one. I've even lo...

Cheapest way to mirror an ASP web application on IIS with SQL Server Express

Rather than relying on one server, is it possible to achieve high availability with two servers and no hardware load balancer? Either Network Load Balancing and have SQL Server Express mirrored between the two servers (IIS would be on both servers too) or using something like Round Robin DNS and again mirrored databases between two serv...

Convert SQL Server Express 2005 .mdf to 2008 .mdf ?

Hi I have a Visual Studio solution and an ASP.NET MVC project that uses a SQL Server Express 2005 database file in the App_Data. I want to know how I can upgrade this file so it works for SQL Server Express 2008 ? Thanks ...

SQL Server 15MM rows, simple COUNT query. 15+ seconds?

We took over a website from another company after a client decided to switch. We have a table that grows by about 25k records a day, and is currently at 15MM records. The table looks something like: id (PK, int, not null) member_id (int, not null) another_id (int, not null) date (datetime, not null) SELECT COUNT(id) FROM tbl can ta...

How to add portion of SQL database to App_data folder in VS 2008?

I have 32-bit XP with SQL Server 2005 Express and VS 2008. I have successfully added the Adventureworks DB to my VS website and I can see it from SOlution Explorer, however, the entire DB is attached. How would I only attach a few of the tables and stored procedures from this DB? ...

Encrypt column names of tables in SQL Server Express

Hello, What is the best way to encrypt columns in SQL Server 2005 Express edition so that no one can steal our database design? Thanks ...

sql - ModifyDate column - Is using a Computed Column a correct way to implement this?

I just want to have a "ModifyDate" column automatically populated for me when a record is either inserted or updated. Should I be using triggers or is it OK to use a Computed Column? (Using SSMS2005 and SQL Server 2005 Express) ...

enable TCP in SQL server 2005 express edition

Hello, sorry for answer but how to enable TCP in SQL server 2005 express edition? I used configuration manager, find network configuration/protocols and there enabled TCP, after that I have restarted sql server service and tried installation of problematic software again (software which told me that TCP is not enabled) but I have the sam...

Problems with SQL Server Express user instancing and ASP.net Web Application Projects(dotnet nuke)

I am trying to connect to SQL Express 2005 through DotnetNuke. My OS is windows 7(IIS 7) and when i tried to connect i got the following error: An attempt to attach an auto-named database for file (file location).../Database.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is locat...

how to pass column name with parameter in insert sql statment

how to pass column name with parameter in insert sql statment e.g. @name='name' insert into employees (id,@name) values(1,'a') is this possible? ...