Basically i want to be able to dynamically create a temp table based off of an existing table, and then insert values into the temp table, and select the inserted values.
i've got the part where i can create the temp table working just fine, it's just that inserting and selecting form it aren't working too well.
here's my current code....
I'm trying to pull in data from a remote SQL Server. I can access the remote server using SQL authentication; I haven't had any luck using the same credentials with sp_addlinkedserver.
I'm trying something like this:
Exec sp_dropserver 'Remote', 'droplogins'
go
EXEC sp_addlinkedserver
@server='Remote',
@srvproduct='',
@pr...
I want to be able to invoke an SSIS package at will from a web application. I've found that I can do this successfully with sp_start_job when running on my local machine. However, when I publish to our test site, I get:
The EXECUTE permission was denied on the object 'sp_start_job', database 'msdb', schema dbo'
So I tried this
USE...
Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Syste...
I was wondering what do i need to get my asp.net web application installed on multiple server, having them working as a one piece.
Thanks in advance,
...
I'd like to create some human-friendly codes to identify my objects.
I'm thinking about using the following rules:
6-digit random number
the first character is not zero
each code has an edit distance value of 2 or greater* from every other such code
maybe a checksum too
I'd like my MS SQL database to enforce that the codes I use are...
How do I create a foreign key
from table tGeoAnswers column 'locationId'
to table tLocations column 'id'?
ALTER TABLE
tGeoAnswers
ADD
FK_Answer_Location
FOREIGN KEY
(locationId)
REFERENCES
tLocations(id)
I am trying this code that I found but I get the following error:
The definition for colu...
I have a table as below
Rate Effective_Date
---- --------------
5.6 02/02/2009
5.8 05/01/2009
5.4 06/01/2009
5.8 12/01/2009
6.0 03/15/2009
I am supposed to find the all rates that are effective for current date and after it. So to get the current effective rate, i use
SELECT TOP 1 * from table
where effective_date < '05/05/2009...
is there any way to connect to ms sql server 2008 using management studio 2005?
...
Has anybody got recent experience with deploying a Django application with an SQL Server database back end? Our workplace is heavily invested in SQL Server and will not support Django if there isn't a sufficiently developed back end for it.
I'm aware of mssql.django-pyodbc and django-mssql as unofficially supported back ends. Both proje...
I understand this is a VERY vague question, so forgive me.
A company I used to work for has contacted me saying that since they've upgraded to SQL Server 2008, they've been encountering a ton of "locking" issues.
I really don't know what this means. I don't even know how to see these "locking" errors in SQL Server. This was not my area...
Hi,
I'm considering writing some unit tests for my Tsql stored procedures, I have two concerns:
1) I will have to write a lot of SQL to create test fixtures (test data prepared in _setup procedures)
2) I will have to "re-write" my query in the test procedure to obtain the results to compare against the results from the stored procedure...
I have created a test user that has sysadmin right in SQL Server 2005 (sysadmin, because i want to profile with this user name also).But i want to restrict that test users access rights to production database.
It is under "logins" and also db name selected under the "User Mapping" tab of its properties with "db_denydatareader" default s...
Background:
I have an interview some time next week (for a Jr position) that requires SQL Server. The job descriptions states "Must be able to score high in a C# and a SQL Server design test."
I feel I'm solid on the C# portion, and I think I'm pretty good on implementation-agnostic DB design (Reread "Mastering Data Modeling" by Car...
I have three SELECT statements that each return a total, 'New Cases', 'Closes Cases', 'Existing Cases'. How do I combine these so they are returned in one resultset.
ie I need a table returned with 3 fields, 'New Cases', 'Closes Cases' and 'Existing Cases' each with one total
SELECT COUNT(CaseID) AS 'New Cases'
FROM dbo.Cl...
When inserting a guid as a primary key does the db server go through every single row to make sure there's no duplicate or does it just assume that a duplicate is not possible or very unlikely?
with int the db server can simply increment the key but not the case with GUIDs
...
My application allows user to upload pdf files and store them on the webserver for later viewing. I store the name of the file, location, size, upload date, user name etc in an SQL server database.
I'd like to be able to programatically, just after a file is uploaded, generate a list of keywords (maybe everything except common words) an...
How do I populate a int column, currently empty, with random numbers with no duplicates?
...
when i copy data from one table to another all the primary key values are resetted. is there a way to keep the values of the original table.
in the original table the primary key values (int) are not continual (deleted rows)
another table has all the values hardcoded thats why i need to keep the same values.
...
Hello everyone,
I got this weird error which mentions I should install VSTS 2008 SP1, during the process of installation of SQL Server 2008 developer edition. But actually I have VSTS 2008 SP1 installed. Any ideas what is wrong?
Here is my screen snapshot.
http://i41.tinypic.com/9teo7m.jpg
thanks in advance,
George
...