I am converting to an integer primary key and am having trouble seeding the new column data with a count of integer numbers.
Given an existing table:
create table t1 (
Id uniqueidentifier,
NewId int,
Data nvarchar(100)
)
How would I update existing rows with a count of numbers from 1 to the # of rows in the result set?
So:
|...
I am calculating percentages in Analysis Services 2008 using MDX by dividing the sum by the count
= IIF ([Measures].[STAT VALUE Count]=0,NULL,([Measures].[STAT VALUE]/100)/[Measures].[STAT VALUE Count])
My grain is at the hourly level and is a percentage value itself
When browsing the cube and applying a Time dimension hierachy of ye...
Hi,
I need to create an entirely new Sql Server 2008 database and want to use a Database Project in Visual Studio 2010 (Ultimate). I've created the project and added a table under the dbo schema.
The table .sql is shown only as plain text, though with colors. It has no designer, no Add Column, and no autocomplete. Existing column's pr...
Hi everyone,
I'm trying to run an SSIS package from the SQL Server Management Studio, and am having trouble overriding a configuration setting. In my case, it's the location of a flat file. The command I'm using is:
declare @returncode INT
exec @returncode = xp_cmdshell 'dtexec
/SQL "\ImportData"
/SERVER "myserver"
/CONNECTION ...
I have a requirement to determine the maximum Id int value for a set of tables in my database. The column is always 'Id' and is the primary key. Is there a simple way I can make this determination without resorting to a cursor or looping?
...
I have a table
Title Name Type
------------------------------------------------
T1 A Primary
T1 B Primary
T2 B Primary
T2 C Secondary
T2 D Secondary
I need the output t...
Hello all,
I'm trying to publish an asp.net website on a remote server. When my code tries to connect to the database, I get the error message described in the question title. Now, I've gone into the Microsoft SQL Server Management Studio for SSE 2008 and can see the list of logins. NT AUTHORITY\NETWORK SERVICE is there, but I'm not sur...
Dear Gurus
I have seen many articles and Questions/Answers Regarding Lock Escalation but following things are still vague. Please answer to the specific required information.
If Lock Escalation is disabled will there be Intended Locks on higher resources like on Page or Table???
If a Lock(IX) is placed on Page can another connection a...
I created a database with aspnet_regsql, the database was created in sql sever 2008 and not in data folder in my project (do I need to move it to the folder manually?).
Next, in Web Site Administration Tool I went to provider section and clicked don Test button.
I got an error:
Could not establish a connection to
the database. If ...
We have a database with hundreds of tables.
Is there some kind of meta data source in SQL Server that I can programatically query to get the name of the last changed table and row?
Or do we need to implement this ourselves with fields in each table called LastChangedDateTime, etc.?
...
I have a lot of sql server 2008 servers with many databases on each server.
I usually forget which database is on which server.
I want to create a batch file named after the name of the database that opens a connection to this database in the currently opened SSMS instance and not in a new instance.
...
I have a SSIS 2008 script component which is setup as a transform (so it has an input and output), and what I want to do is take 1 row in an input and optionally output multiple rows.
In 2005 there was the AddRow and CreateNewOutputRows methods but those seem not to be available in 2008.
So how do I add rows during the transformation?
...
I'M getting crazied for that ERROR
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - ...
well i'm new in Quartz i'm following this tutorial
and i configured my scheduler instance and quartz to use this properties:
properties["quartz.jobStore.lockHandler.type"] = "Quartz.Impl.AdoJobStore.UpdateLockRowSemaphore, Quartz";
properties["quartz.jobStore.driverDelegateType"] = "Quartz.Impl.AdoJobStore.SqlServerDelegate, Q...
I want to compare records between 2 databases on my SQL 2008 Server. The query below works in SSMS.
SELECT 'Manual',
manual.*,
'Auto',
Auto.*
FROM (SELECT * FROM TESTINGSOMODS..TESTINGSOManMODS) Manual
FULL OUTER JOIN
(SELECT * FROM CHELTONCUSTOMIZATIONS..SOMODS) Auto
ON manual.[Order N...
i have made columns in some of the tables encrypted in sql server 2008.
Now as i am a db owner i have the access to encode and decode the data using the symmetric key and certificate. But some other users have only currently datareader and datawriter rights ,and when they execute any SP referring the logic which uses the key and certific...
I have a client who wants his custom-written CRM to be able to access his sales people's emails so that, effectively, a history of email conversations between customer and salesperson is stored inside the CRM's database.
The CRM is written in VB 2008 and the database is SQL Server 2008. The only email these people use, in the shop an...
How can I display the content of all Views in a db in SQL Server 2008? Is there any new system views to do the same?
...
Hi !
I have a table with many rows, is there any way to find out when a concrete row has been inserted? (I don't have create/update time columns)
Thanks
...
Hi,
On a 2003 server box, with SQL server 2008 installed (ReportServer deployed in IIS mode), I've got a virtual directory within IIS with it's security set to 'windows authentication', with the following html code:
<body>
<h1>test</h1>
<iframe src="/reportserver" witdh="50%" height="50%" />
</body>
From the outside, I've got a first...