I'm working on a Classic ASP (VBScript) site that's running on a Windows 2008 server with IIS7 and hitting a SQL Server 2008 database and I'm seeing some strange behavior that seems to be specific to fields that are of type nvarchar(max).
I have this simple bit of code that loops over some query results and tries to print out the title ...
Hey all,
I currently have a stored procedure that runs a complex query and returns a data set. I'd like to cast this data set to a table (on which I can perform further queries) if at all possible. I know I can do this using a table-valued UDF but I'd prefer to avoid that at this point. Is there any way I can accomplish this task?
T...
I am working on a personal project as a way of learning more about C# and .NET, specifically creating an application that utilises a database (MS SQL Server 2008 in my case). Whilst I appreciate there isn't always a definitive "right" way of doing things, given the choice between using an old technology/idea or a new one, I would rather...
Hi,
I have a website using Microsoft SQL 2008 server over local network. Sometimes, SQL server machine is rebooted, and so the website fails to connect to the database. If the machine is up and running, it will respond fast. If it's down, there is no need to wait for 15 seconds. 3 seconds are ok.
I want to display apologizes on the web...
I want to return the top three pets for each employee as columns instead of rows i.e.
Owner_ID Pet
--------------------
1 Cat
1 Dog
1 Hamster
2 Cow
2 Sheep
3 Dog
Convert it to
Owner_ID Pet1 Pet2 Pet3
-------------------------------------
1 Cat Dog Hamster
...
I can see how to turn off row level and page level locking in SQL Server, but I cannot find a way to force SQL Server to use row level locking. Is there a way to force SQL Server to use row level locking and NOT use page level locking?
...
I am trying to create the correct values for the tables I created. This is the code:
INSERT DEPARTMENTS
(Department_Id,Department_Name,Manager_Id,Location_Id)
VALUES
('D0001,D0002,D0003','Think Tank,Creators,Marketers',NULL,'L0001,L0002,L0003')
GO
INSERT EMPLOYEES
(Employee_Id,First_Name,Last_Name,Email,PhoneNumber,Hire_Date,Manager_ID...
Hi folks,
I wish to Insert or Update a row in a table - so I wish to try and use the MERGE syntax. My problem is that my data (to insert/update) exists in a variable table. I'm not sure how to write the correct syntax for the insert/update part.
Here's my pseduo code :-
-- Here's the Variable Table ... and not it has not PK.
DECLARE @...
Hi
In our project user using NHibernate 2.1.1 with SQL Server 2008 with .net 3.5.
I am facing strange problem with SQL Server. We developed windows service, installed it and it was running fine for sometime. Unfortunately by mistake when I stopped SQL Server, NHibernate throw exception
System.Data.SqlClient.SqlException: A
netwo...
Is there a way to trigger a job on a from another job on a remote server without using Linked Servers?
The reasoning is that the job being triggered executes an SSIS package on 2008. The calling job resides on a 2005 server, so cannot execute the job directly.
The servers are not linked, and I was hoping there was a way to call one f...
I have the following query:
select r.people_code_id [People Code ID], r.resident_commuter [Campus6],
c1.udormcom [AG], aR.RESIDENT_COMMUTER [AG Bridge], ar.ACADEMIC_SESSION,
ar.ACADEMIC_TERM, ar.academic_year, ar.revision_date
from RESIDENCY r
left join AG_Common..CONTACT1 c1 on r.PEOPLE_CODE_ID=c1.key4
left join AG_Common..CONTACT2 c2 ...
I have a table schema similar to the following (simplified):
CREATE TABLE Transactions
(
TransactionID int NOT NULL IDENTITY(1, 1) PRIMARY KEY CLUSTERED,
CustomerID int NOT NULL, -- Foreign key, not shown
TransactionDate datetime NOT NULL,
...
)
CREATE INDEX IX_Transactions_Customer_Date
ON Transactions (CustomerID, Tr...
Hello,
The following query returns no result and no error on SQL Server 2008 (tested on SP1), you can run it against any database, even master:
WITH computed_table (id) AS
(
SELECT id FROM this_table_does_not_exist
)
(SELECT * FROM computed_table)
UNION
(SELECT * FROM another_table_that_does_not_exists)
On SQL Server 2005, you ge...
I created an instance SQL Server on my local machine.
Then my login changed and I was assigned a new domain.
As a result, I need to reconfigure SQL Server.
The owner of the instance is still myself with the old domain. I need to change that to the new domain.
Then I need to change my .Net apps so that they can connect to this instance.
...
I have a website that is running on windows 2000 and sql 2000. The application and the db resides on the same server.
The site has a search feature that is a combination of dbsearch and pdf search. for the pdf search i created a linked server that points to index server to do the pdf search. Wrote a stored proc that will combine both th...
I have an application that uses DBF files and I need to import them to SQL Server 2008. However, I also need to modify some of the data along the way and some columns will be added to tables while others will be deprecated.
So far I'm using DBF -> Access -> MS Migration Assistant -> SQL Server 2008. But I think that there has to be a be...
I'm still a neophyte when it comes to SQL queries, so I was hoping someone could lend me a hand.
Assume I have 3 tables, Skill, Set, and Contact, and 2 linking tables, SkillSet and ContactSet. (the 3 tables have an "ID" column that is being used as a primary key)
Contacts can have any number of sets, and vice versa (many-to-many)
Sets...
What I need to do is to be able to connect to a sql database on a sql server 2008 database using a php script. The script is running on IIS 6 on the same server as the sql server. I am using php 5.3.2 and the command sqlsrv_connect to connect. I am passing this method a user name, password, database, and server to connect to. However whe...
Hello,
After receiving very good correction from fuzzy lollipop, I amended my code to create an insert statement for every row of data. This is the code that I entered:
INSERT DEPARTMENTS
(Department_Id,Department_Name,Manager_Id,Location_Id)
VALUES
('D0001','Think Tank',NULL,'L0001')
GO
INSERT DEPARTMENTS
(Department_Id,Department_N...
I have VS 2008 Trial edition, SDK, and SQL Server 2008 currently. But I need to uninstall VS 2008 Trial and replace it with VS 2008 Professional. If I uninstall VS 2008 while keeping SQL Server 2008, then if I install VS 2008 Pro will SQL Server databases still be accessible from the new VS 2008 Pro? And do I install the SDK after VS ...