sql-server-2008-r2

query collation on foreign language field in Latin table

十年热恋 提交于 2020-01-05 07:23:33
问题 I have a series of tables that each have a dedicated column to a foreign language. Languages vary from Japanese, Thai, English, Italian, French, more than 20 in all. All of these tables are set up with Latin Case Insensitive collation. DB works fine. But now I am trying to query against the specific foreign language column of each table. Lets take Japanese for starters. I'd like a foreign language user to enter foreign text and find the record based on the foreign language column. DECLARE

SSRS - Data Driven Subscription -

痴心易碎 提交于 2020-01-05 07:22:23
问题 What I'm trying to do : I have a report already created that looks for something existing in one database and not in another. 99% of the time the report comes up empty. We do not need to know when there are no results to show. I only want to know when the query returns a result. What I've done so far : I have a the Data Source created and a table (view) created to where I can query for Subscriber information. What I hope can be answered : Is it all possible to have this report run and email

Wait on the database engine recovery handle failed

时光毁灭记忆、已成空白 提交于 2020-01-05 07:14:31
问题 I have been trying to install sql server 2008 r2 at my local machine and at the end of the installation i got this error "Wait on the database engine recovery handle failed". The Wizard shows progress in which some of the components including Database Engine could be not be installed. I need some help related to this. 回答1: This issue can pop up for a few different scenarios. Do check the logs for error. One of the scenario when this error can occur if a Microsoft® system folder is either

SQL Server Trace file create unique identifier for field TextData of type NTEXT

妖精的绣舞 提交于 2020-01-05 05:25:31
问题 To analyse my imported trace file it would like to have a unique value for Select Distinct TextData from myImportedTraceFile I tried using hashbyte although i am not sure if MD5 is the right tool to create a unique identifier. Even if this were the case (please tell me if it is so) then i still have the problem that Using HASHBYTES('MD5', CAST(TextData AS varchar(7999))) As TextData_HashBytes cuts a few rows of (see this reply) What can i do to create a unique identifier for every unique

SQL Server Trace file create unique identifier for field TextData of type NTEXT

你。 提交于 2020-01-05 05:25:03
问题 To analyse my imported trace file it would like to have a unique value for Select Distinct TextData from myImportedTraceFile I tried using hashbyte although i am not sure if MD5 is the right tool to create a unique identifier. Even if this were the case (please tell me if it is so) then i still have the problem that Using HASHBYTES('MD5', CAST(TextData AS varchar(7999))) As TextData_HashBytes cuts a few rows of (see this reply) What can i do to create a unique identifier for every unique

App Config - The Login is from an untrusted domain

狂风中的少年 提交于 2020-01-05 04:30:30
问题 First, I try to connect to sql server of other computer(PC1-PC\Instance1) through ssms with Windows Authentication but got this error Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. I resolve the error when I edit the password of sa to 1234 in PC1-PC\Instance1. Then connect in the ssms with SQL Server Authentication. And successfully connected. The problem is in my Winforms app config, I set the connection to this: <connectionStrings> <add

New line in sql server 2008 r2

感情迁移 提交于 2020-01-05 04:05:20
问题 I have two string in sql server 2008 r2 query. I want to make new line between these strings like and I tried to do all with char() like below, but I'm still not success. Could you show me any thing else. thanks!!!!!!! declare @text1 varchar(20) = 'First'; declare @text2 varchar(20) = 'Last'; declare @string1 varchar(40)= @text1 + char(10) + @text2 select @string1; declare @string2 varchar(40)= @text1 + char(13) + @text2 select @string2; declare @string3 varchar(40)= @text1 + char(10) + char

Why is nothing selected in this select query?

情到浓时终转凉″ 提交于 2020-01-05 04:01:05
问题 If I run Select distinct CompanyID from Device I get 6 rows. If I run Select CompanyID from Company I get 8441 rows. If I run the following: If I run Select CompanyID from Company where CompanyID NOT IN ( Select distinct CompanyID from Device ) I should get the 8435 companies that aren't in the original select statement, correct? However, when I run this I get 0 rows. What is the issue here? One of the 6 results from above is null but that shouldn't matter. Thanks! edit: With Marc-s's help I

SQL Server Like Query not case sensitive

二次信任 提交于 2020-01-04 15:15:31
问题 Query SELECT * from Table_2 WHERE name like ('Joe'); Output 1 100 Joe 2 200 JOE 3 300 jOE 4 400 joe Why is it not case sensitive? 回答1: Problem: Query not case sensitive Cause: Column 'Name' has a case-insensitive ( CI ) collation. Solution: You have to use a CS collation: SELECT * FROM fn_helpcollations() WHERE description LIKE N'%case-sensitive%' . Note: There is a database collation and column level collation. And, there is, also, a server level collation. SELECT DATABASEPROPERTYEX(DB_NAME(

Get IDENTITY value in the same T-SQL statement it is created in?

南楼画角 提交于 2020-01-03 17:32:25
问题 I was asked if you could have an insert statement, which had an ID field that was an "identity" column, and if the value that was assigned could also be inserted into another field in the same record, in the same insert statement. Is this possible (SQL Server 2008r2)? Thanks. 回答1: You cannot really do this - because the actual value that will be used for the IDENTITY column really only is fixed and set when the INSERT has completed. You could however use e.g. a trigger CREATE TRIGGER trg