I have a fulltext catalog for an indexed view. Problem: I want to search with the function ‘FREETEXT’ all words which contains the search term. But the result doesn’t return any entries… but one entry must be the word ‘freightcosts’ If the search term = ‘freightcosts’, the result is ‘freightcosts’? Example: SELECT [Description] FROM dbo.vuCmsTextDe […]
We’re using SchemaExport via ActiveRecord. By default it generates a table like this: create table List ( Id UNIQUEIDENTIFIER not null, Name NVARCHAR(255) null, OwnerId UNIQUEIDENTIFIER null, primary key ( Id )) SQL Server then defaults to adding a clustered index for the primary key. But I want this to be nonclustered. I want to […]
My query is based on the following example I have table say ‘Table1’. Table1 has one row and one column. The name of the column is ‘Column1’. ‘Column1’ is a text column (NVARCHAR). I have a comma separated keywords like ‘key1,key2..keyn’. I want to search these keywords individually in the column1. So in the where […]
Is there anything called dynamic partitioning in SQL server? If so how can i implement it?
I’m trying to insert row by row in a table about 100k records.. I get this error after some 140 or so.. Violation of PRIMARY KEY constraint ‘PK_table1’. Cannot insert duplicate key in object ‘table1’. The statement has been terminated. In this case the primary key is an IDENTITY column. I do not include that […]
I tried these two methods on Advantureworks and got different results. select * from Person.[Address] where AddressLine1 like ‘%99%’ select * from Person.[Address] where contains(Address.AddressLine1,'”*99*”‘) Any Idea?
I have a table that contains a user_id, and an XML field containing basically a series of values. I need to run a report against the data in the XML, but for the life of me I cannot get the XML out of the field in any useful fashion. Here’s the schema for the table: […]
first I have checked that Server Authentication is already set to: “SQL server and Windows Authentication mode” (mixed mode) ้here ‘s my web.config connectionstring <connectionStrings> <add name=”StockConnectionString” connectionString=”Data Source=192.168.0.2;Initial Catalog=Stock;Persist Security Info=True;User ID=op;Password=operator” providerName=”System.Data.SqlClient”/> </connectionStrings> Whene I test running (ctrl+F5) under VS2010 development this can connect to remote SQL server without any problem. but when […]
How do I write a SQL statement that will Insert millions and Update millions of records in a Sql Server using T-SQL? While inserting the records the SQL should be able to create the primary key using a criteria. Example : Table 1 and Table 2 are joined by a unique key. And this data […]
I need to zero pad my ID column for putting in drop down combo boxes, example 001 item text 101 item text 2 but if the numbers only went to 80, then we should have 01 item text 80 item text and so on, since I need to write this and allow tens / thousands […]