I am looking for a way to insert code comment blocks semi-automatically in all the views, stored procedures, and UDFs in a database (basically every code-based module). I'm fine with generating the ALTER statements and reviewing them myself before running the scripts, I was just looking for a reliable way to generate them. I am not loo...
Hello there,
I'm having a huge problem with a client.
Their infrastructure blows, and most of the development done end up with mysterious errors(which only happen in their environment).
What I'm trying to do is create a separate environment (a VPS) and push the application server and the database into this new environment, so they can...
I have a normalized sql server 2005 database. An example of a table that is something like this:
Location
LocationID,
CustomerID,
OrderID
This is abbreviated. However, the normal query syntax simply uses joins to show the location as city state zip and the name of the customer and so on.
I would like to implement full text search on...
I'm trying to improve the performance on a query that is running very slowly. After going through the Actual Execution plan i found that a Clustered index seek was taking up 82%. Is there any way for me to improve the performance on an Index Seek? Below is an image of the problem Index Seek from the execution plan as well as the index...
Hi,
I am working on an application that will connect to SQL Server 2005 when users are in the office, or it will connect to SQL Server CE 3.5 when users are on a laptop and out of the office.
I have been reading up on Merge Replication to keep the two in sync, but am having a hard time finding anthing from start to finish (all the docu...
We have a table that has a blob column along with other simple fields. Number of rows is about 6K, and sum of length of the blob column for all rows accounted for about 30MB. however when we ran a query to find the actual table space occupied, it was about 10GB(Database size itself is 11GB). We are wondering if,
Would aborting transact...
I have two tables both of which have columns StartDate and EndDate.
I'm trying to return a single resultset that contains all date ranges from one table (TableA), and all complement date ranges from the other one (TableB).
CREATE TABLE [dbo].[TableA](
[ID] [int] NOT NULL,
[StartDate] [datetime] NOT NULL,
[EndDate] [datetime...
Sirs,
I have a ticketing system. Now I have to select adjacent places when the user asks for 2 or 3 tickets.
Every ticket has a line and column number. The concept of adjacent places is places in the same line with adjacent columns numbers.
These tickets are in a sql server database. Any ideas about this algorithm to search for availabl...
So, I have the following tables:
Using LLBLGen 2.6 (Adapter Version - No Linq), SQL Server, and .NET 3.5, how would I write the following query?
SELECT o.ObjectID
FROM Object o
INNER JOIN ObjectDetail d ON i.ObjectID = d.ObjectID
WHERE d.CreatedDate = ( SELECT MAX(CreatedDate)
FROM ObjectDetail
...
I am using SQL Server 2008, had a table with an id (numeric) column as the primary key. Also had a unique index on three varchar columns. I was able to add a row with the exact same set of the three columns. I verified it with a simple query on the values and 2 rows were returned.
I edited the index and added the id column. When I ...
Do any of the existing open source databases have the ability to expose a database as a web service on a server port? I'm looking for something like Microsoft SQL Servers ability to expose a wsdl web service URL .
If not, I guess i will use SQL Server Developer Edition...
...
In SQL 2005/8 I'm looking to convert a column in select query to a NOT NULL column.
coalease() and isnull(), although fine functions, is not what I'm looking for. I want the select to throw an error is any of the data is NULL.
Is this possible?
[Update]
Clearly the best approach would be to modify the source table, unfortunatly in th...
I've been looking for a good equivalent to the Oracle LEAST function.
I'm hoping to implement a user defined function that does about 10 fairly complex calculations, and takes the minimum value from each of those calculations.
What I would do in Oracle is:
SELECT LEAST
(
select expression1 from dual,
select expression2 from dual,
sel...
I need to rewrite the query below so that it is as efficient as possible. Any suggestions on how to increase the performance of this query? I plan on setting columns t2_1 and t2_2 to not nullable and assigning a default value, I'm mainly curious as to if/how I can modify the join so that I can move the "WHERE ... IN ... " sections ther...
I am sure that this can be achieved by loading the SQL Server Management Objects assemblies but I am curious as to whether the 'Start Powershell' item in the context menu within SQL Server Management Studio 2008 will give me a headstart.
...
Is there a function or a workaround in SQL Server 2005 that is equivalent to the new_time() function in oracle?
...
Is there a way how we can know when was a database taken offline?
Platform: SQL server 2005
...
I have a SQL Server Primary Database file. (.mdf)
I require a program which can open the file and let me edit some data.
Since there are many fields, it tedious to open all the records and modify it.
Would it be a good idea to do so? I can always take backup of .mdf file before playing with it, since I do not have any programming know...
I can neither login from my application nor connect using the wizard to my Membership Provider on my local machine. My other DBs can connect from my application just fine. My connection string is correct, it has not been changed (I was able to login using membership previously, this is a new issue).
I created a new App to see if it cou...
Hi,
I have an SQL table with the following structure:
Code1 - int
Code2 - int
Val1 - real
Val2 - real
Val3 - real
There is only one index (clustered) were Code1 is the first indexed column and Code2 is the second. The size of a single record is 20bytes.
I need to be able to store around 150,000,000 records and the biggest select ...