I want to be able to find out how much space is left in my database files so that I can know when to increase the space so it doesn't do it when the application is running hard out.
I would prefer to be able to script this so I can run it across multiple databases ion a regular basis.
I have SQL Server 2000 and SQL Server 2005 database...
Duplicate of:
known and “unknown” incompatibilities between sql 2005 and 2008?
SQL Server 2005 vs SQL Server 2008 [closed]
Advantages of MS SQL Server 2008 over MS SQL Server 2005?
And many more.
Hi
I have been using SQL server 2000 for a few years but now have access to SQL server 2008 for development.
Apart from the obvious th...
In the end of my function, I have the statement:
RETURN @Result
What I want to do is something like this:
IF (@Result = '')
BEGIN
@Result = 'Unknown'
END
RETURN @Result
The above does not work though.
...
I'm not talking about doing a "SET NOCOUNT OFF". But I have a stored procedure which I use to insert some data into some tables. This procedure creates a xml response string, well let me give you an example:
CREATE PROCEDURE [dbo].[insertSomeData] (@myParam int) AS
DECLARE @reply varchar(2048)
... Do a bunch of inserts/updates...
SE...
I am currently developing a very simple database that tracks people and the company certifications they hold. This db will need to store letters of certification as PDF files. I was asked to develop this in MS Access, but I think it would be better to build it in SQLServer and use Windows Forms to build the interface. This app will need...
On SQL Server 2005, I have a complex multi-level allocation process which looks like this (pseudo-SQL):
FOR EACH @LVL_NUM < @MAX_LVL:
INSERT INTO ALLOCS
SELECT 'OUT', *
FROM BALANCES(@LVL_NUM)
INNER JOIN ALLOCN_SUMRY(@LVL_NUM)
INSERT INTO ALLOCS
SELECT 'IN', *
FROM BALANCES(@LVL_NUM)
INNER JOIN ALLOCNS(@LVL_NUM)
INNER JOIN ALLOCN_SUMRY...
I'm trying to do a sub-select and Inner Join in the same query, with little success.
The query, as it stands is below, and returning the error
The multi-part identifier
"Company.LocalityId" could not be
bound.
UPDATE Company
SET
Company.BusinessRegionId = b.Id
FROM
(
SELECT
Id
FROM
BusinessRegio...
Hi folks,
this is a follow on question to a previously asked question.
I have the following data in a single db table.
Name LeftId RightId
------------------------------------------
Cat 1
Cat 1
Dog 2
Dog 2
Dog ...
I am unfamiliar with Oracle and i need to have equivalent of my script for Oracle.
Script:
SELECT COL_NAME(parent_object_id, parent_column_id) AS ForigneKeyField,
COL_NAME(referenced_object_id, referenced_column_id) AS PrimaryKeyField,
OBJECT_NAME(referenced_object_id) AS PrimaryTable
FROM sys.foreign_key_columns
W...
I am using sql server 2000 and asp.net with c# for making a search engine and i want to refine the results obtained from a search without making server connection again and again due to speed factor how can i make my search fast?..............how can i make sql server connection lesser?...
...
Hi,
In SQL server How can I transform 1 row with varchar columns into a column?
I think I need to use Pivot but I can't find an example without agregators
this is the situation I have:
create table #tmp ( ac varchar(100), bc varchar(100), cc varchar(100))
insert into #tmp (ac,bc,cc)
Values ('test1','test2','test3')
insert into #tmp
Va...
How can I ensure that all data that I've erase from the db tables, is no longer stored in the mdb files (and others) on the hard disk?
Here's my situation:
My client used to store non-encrypted credit card data, in their database (SQL Server). Thanks to PCI requirements, they now encrypt all that data... However, the mdb file still has ...
I have this query:
SELECT Items.Name, tblBooks.AuthorLastName, tblBooks.AuthorFirstName
FROM Items WHERE Items.ProductCode IN (
SELECT TOP 10 Recommended.ProductCode
FROM
Recommended
INNER JOIN Stock ON Recomended.ProductCode = Stock.ProductCode
AND Stock.StatusCode = 1
WHERE (Recommended.Type = 'TOPICAL') ORDER BY CHECKSUM(NEWID()));...
I wish to move a database between two servers, I have backed the database up from the first server and done a database restore on the 2nd server, so far so good.
However our application make use of a lot of database users that are defined in the database, these have to be linked to logins that are defined in the master database. The se...
Hi folks,
I have a tablix in an SSRS 2008 report. It has two-level row groupings, and I'd like the value for the left-most grouping to continue to be displayed on each row. Eg, I get this:
group1 subgroup1 500.00
subgroup2 250.00
... but I'd prefer...
group1 subgroup1 500.00
group1 subgroup2 500.00
I can't seem to ...
What are the common design approaches taken in loading data from a typical Entity-Relationship OLTP database model into a Kimball star schema Data Warehouse/Marts model?
Do you use a staging area to perform the transformation and then load into the warehouse?
How do you link data between the warehouse and the OLTP database?
Where/How d...
Hi guys,
I'm updating an old ASP/MySql webapp to ASP.NET/MS SQL.
We would like to keep the logins from the old website working in the new app.
Unfortunately the passwords were stored in the MySql DB using MySql's password() function.
Is it possible to simulate MySql's password() function in either .NET or
MS SQL?
Any help/links ...
I have a SQL 2005 database with approx 250 tables.
I want to temporarily enable ON DELETE CASCADE to all of the Foreign Keys so that I can do a bulk delete easily.
I then want to turn off ON DELETE CASCADE on all Foreign Keys.
The only way I know of doing this, is to use Management Studio to generate a full database create script, do ...
I have two tables (Knicks and Knacks) and a view that joins the two tables (PaddyWhacks). The tables have the following fields:
Knicks.key, Knicks.data1
Knacks.fkey, Knacks.data2
So the view contains:
PaddyWhacks.key, PaddyWhacks.data1, PaddyWhacks.data2
I'm using LINQ to SQL to retrieve the full view as IQueryable and everything...
I have a very large (2.5GB, 55 million node) XML file with the following format:
<TopNode>
<Item id = "Something">
<Link>A link</Link>
<Link>Another link</Link>
<Link>One More Link</Link>
</Item>
<Item id = "Something else">
<Link>Some link</Link>
<Link>You get the idea</Link>
...