sql-server-2005

Include in .net Application Setup File .. SQL SERVER 2005 Express

My application required SQL SERVER 2005 Express edition. so how can i make setup to include this setup and run behind setup ...

Can't create XML format file in SQL, bcp: unknown option A

I have tried many things, but I'm still not getting this to work. Here's the code: bcp RFID.dbo.ResultsDump format nul -t, -c -x -f C:\RFID.xml -S"ALBERTLAST-PC\SQLEXPRESS" -UAlbert Last -P -T All I want to do is create an XML format file from ResultsDump table, and the above statement doesn't even work. My username is "Albert Last" w...

Are there glitches with trying to use SQL Server Management Studio 2008 R2 to manage MSSQL 2005 DB instances?

I'm currently using Microsoft SQL Server Management Studio ver. 9.00.4035.00 to manage my SQL Server 2005 (90) compatible databases. Will I encounter problems should I attempt to upgrade the Management Studio software to SQL Server Management Studio 2008 R2 to manage MSSQL 2005 DB instances? I will not be upgrading the version of the da...

Paging in SQL Server

How I can implement paging in SQL Server database it has no LIMT keyword like mysql? ...

Can we call a stored proc from a function?

Can we call a stored procedure from a function in SQL? What's the reason? ...

Importing MS Access 2007 table to SQL 2005

Greetings, I want to import MS Access 2007 table to SQL 2005. I followed this link: http://www.fmsinc.com/MicrosoftAccess/SQLServerUpsizing/importing/Import_Access_DB.asp I did everything the same but I get the following error when doing final step: Could not connect source component. Error 0xc0202009: Source - TestTable[1]: An OL...

Convert query to only use table once

I have the following query: select field1,field2 from #table1 left join (select field3, max (field4) as field2 from #table1 group by field3) a on #table1.field3 = a.field3 I want to change it so #table1 is only used once (and preferably the most efficient way also) Any ideas? Thanks! ...

Why is my SqlDependency not firing.

I have a database running on MS SQL Server 2005 and an ASP.NET 3.5 web application. The database contains a product catalog which I'm using to feed "pages" into a CMS running in the web app. Once the pages have been created the application caches them so I need to notify the application of this change so it can recreate the page objects...

Full Text Search in SQL Server 2005

Hi, I am working on the Full Text Search in Sql Server 2005. I have created a catalog and then an index on a particular table. I am searching for data using FREETEXTTABLE(tablename,*,@SearchKeyword). So I am searching in all columns in the index since any of the columns can contain the keywords. Is there is a way for me to know which ...

How to efficiently search/replace on a large txt file?

I have a relatively large csv/text data file (33mb) that I need to do a global search and replace the delimiting character on. (The reason is that there doesn't seem to be a way to get SQLServer to escape/handle double quotes in the data during a table export, but that's another story...) I successfully accomplished a Textmate search an...

How do I change the destination service name of a queue / service

I have a SQL Server 2005 Service Broker queue "ProductChangeMessages" and a Service Broker service "ProductChangeNotifications". The pair are the backing to an SqlDependency I'm trying to get working but the OnChanged of the dependency doesn't fire. When the table being watched changes the subscription (visible through the results of sel...

Automating Database Project Deployment

I'm using the method outlined in this question to automate the database deploy with Hudson. When I deploy the project from within Visual Studio, everything works fine and it updates the target database. When it runs in Hudson, I get this warning: "Deploy warning TSD01266: The source's object [DBName] is different than the target's vers...

Get month from date time now month, Get year from date time now year and write specific day

Hello everyone i want search data from invoices and client by today date I'm using DateDiff() GETDATE() functions for example two tables 1 Client - ID int - Name Varcher 2 Invoice - ID int - ClientID int - date Datetime - Total money query Select * from client c inner join invoice i on c.id = i.ClientID WHERE DateD...

solve numeric overflow problem when converting to float

I have a float value that i need to do some calculations on and insert into a numeric(9,2). However in rare (and likley erronous) cases there are some data anomolies and I end up with a value that will not fit into numeric(9,2). What is a good solution to this problem? Maybe just use 9999999.99 if the number is 9999999.99 or greater? A...

WITH (NOLOCK) vs SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

Hi Everyone, Could someone give me some guidance on when I should use WITH (NOLOCK) as opposed to SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED What are the pros/cons of each? Are there any unintended consequences you've run into using one as opposed to the other? ...

What is the difference between Shrink Database and File?

DBCC ShrinkDatabase() DBCC ShrinkFile() Do I need to run both DBCC commands in order to shrink the database? What is the difference between these two above? ...

SQL Server database recovery

I simply copied my .mdf/.ldf files to another file and suddenly my Microsoft SQL 2008 database dies. I can't open these files on another system either. Can anyone explain what's happened? Any way to recover this application's database now? ...

MSSQLSYSTEMRESOURCE DATABASE

what is mssqlsystemresource database? do we need to copy this while moving form one server to another one? ...

SQL Servers: Linked-servers without linking servers?

Both my local (and remote) SQL SERVER 2005 administrators claim that "allowing linked-servers is a security issue" and forbid their use here. (Huh?) Anyway, is there a way to do something similar WITHOUT linked-servers? SELECT * FROM LOCAL_SERVER.MyDatabase.dbo.MyTable AS t1 INNER JOIN REMOTE_SERVER.MyDatabase.dbo.MyTable AS t2 ON t1....

Migration of DB2 LUW V8.2.7 to SQL Server 2005 Standard Edition

Is there any way to migrate a DB2 Database to SQL Server 2005 Standard? ...