SQL Server 2008 Unique Column that is Case Sensitive.
Is there a way to make a column both UNIQUE and Case Sensitive? I want to be able to put abcde and ABCDE in a unique column. ...
Is there a way to make a column both UNIQUE and Case Sensitive? I want to be able to put abcde and ABCDE in a unique column. ...
Hello everyone, I am using VSTS 2008 + .Net 3.5 + C# + ADO.Net + SQL Server 2008 Enterprise. I am learning http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.clearallpools.aspx about SqlConnection.ClearAllPools method. I want to know the behavior of this method is, if any connections from connection pool is idle...
I installed sql server 2008 on my windows 7 rtm, but as you see in the screen shot all its services are stop and when i try to start it fail, also when i try to install SP, it give me a big error message. Is it not possible to install sql 2008 on windows 7 or what should i fix? feel free to ask me to know more about the problem. ...
I’m distributing an SQL 2008 database with my c# application (only the data, which I restore in the client’s local SQL server). Is there a way to assure that the client can only access my data by using my application? (and not, for instance, using Management Studio, SQLCMD, etc) Thanks, Nestor ...
I am running MS SQL Server 2008 on my local machine. I know that the default port is 1433 but some how it is not listening at this port. The SQL is an Express edition. I have already tried the log, SQL Server Management Studio, registry, and extended stored procedure for finding the port. But, I could not find it. Please help me. Thanks...
Using SQL Server 2008. I have a stored proc which has start and end date as input parameters for date range. Looking for a single sql query which has a between start and end date in the where clause which can handle both cases where the dates are either both null or both have values. I don't want to use an IF statement. ...
I just need to select the first day of the month of a given datetime variable. I know it's quite easy to do using this kind of code : select CAST(CAST(YEAR(@mydate) AS VARCHAR(4)) + '/' + CAST(MONTH(@mydate) AS VARCHAR(2)) + '/01' AS DATETIME) but this is not very elegant, and probably not very fast either. Is there a 'better way t...
how to reseed table to start at the PK 2? (SQL Server 2008) ...
Suppose I have a record with a column called "Name". Each record can be effective dated, so I also have an effective date and an expiry date column. The "Name" column has to be unique, but only within overlapping periods of the effective date and expiry date. I'm looking for some sort of efficient way to enforce this from within the s...
I am using a SqlDataReader and I am trying to read from a table I converted from an Access file, and is in SQL Server 2008. The datatype is now a varbinary(max). How do I convert this, so I can have it as System.Drawing.Image? It is a Windows MetaFile and I want to convert it to a PNG or GIF and save it to the filesystem. It appears ...
i have a <h1> that has a news title in it and i want to insert the content of this <h1> into sql server 2008 database how can i do this using c# ...
What are the different SQL Server 2008 data types? I am specifically trying to find the equivalent of a long int. ...
I am trying to use the SQL Server 2008 Copy Database Wizard to copy a SQL Server 2008 database. I am using the SQL Management Object method. The database contains a full-text index. I have set the 'Server - Properties - Advanced - Full-Text Upgrade Option' to Reset. However, the copy fails with the following error: ERROR : errorCod...
I get an error when I execute the command below from a DOS window in Windows XP with SQL Server 2008. -S is the option to specify the server name. error: Sqlcmd: '-S': unknown option. sqlcmd –S localhost –d databasename -i C:\files\somefile.sql –E ...
This is rather embarrassing, but I accidentally deleted my Windows account from the list of SQL Server 2008 users and I cannot for the life of me figure out how to re-add myself now that I don't have login privileges. The server is running on my machine and the only other Windows users with access are IUSR, NETWORK SERVICE and SYSTEM. ...
Hi folks, I've got the following trigger on a table for a SQL 2008 database. It's recursing .. so i need to stop it. After I insert or update a record, I'm trying to then update a single field on that table. Simple. Here's the trigger :( ALTER TRIGGER [dbo].[tblMediaAfterInsertOrUpdate] ON [dbo].[tblMedia] BEFORE INSERT, UPDA...
I created a login with SQL authentication credential in SQL Server 2008. But, I am not able to login using that credential. We followed the same steps in SQL Server 2005 and working without any problem. What could be the problem? Thanks, P.Gopalakrishnan. ...
Is it possible to raise an error in a stored procedure manually to stop execution and jump to BEGIN CATCH block? Some analog of throw new Exception() in C#. Here is my stored procedure's body: BEGIN TRY BEGIN TRAN -- do something IF @foobar IS NULL -- here i want to raise an error to rollback transaction -- do something next C...
Hi there, Using SQL Server 2008: assuming I have a valid geography object geog1, converting it to a geometry instance geom1 (using the same SRID) and converting it back to an object geography geog2 shows no difference between geog1 and geog2. However, due to a problem already discussed here I cannot create a geography object containing...
Using the SQL Server 2008 debugger, how can I see the contents of a local table-valued variable in a stored procedure? In the locals window its value is listed as "(table)", but I can't see the contents. I saw some references to an "Immediate" window at http://www.sqlservercentral.com/articles/SQL+Server+2008/64354/ (note registration re...