Can I use full text search a row in a table where the condition is an array of values from a select query?

I want to create a view and I want to do a full text search of a row using a set of keywords. These keywords exist in a table in the database. So is it possible to do something like below where I can use a select statement to dynamically determine which keywords to filter […]

SQL number generation in concurrent environment (Transation isolation level)

I am working with an application that generates invoice numbers (sequentially based on few parameters) and so far it has been using a trigger with serialized transaction. Because the trigger is rather “heavy” it manages to timeout execution of the insert query. I’m now working on a solution to that problem and so far I […]

F# How to use preload child records using Sql Type Provider

I’m using the F# SqlDataConnection data provider to access a database. The code works fine except that it goes to the database for every single nested record. How do I get the query to prefetch some of these records module Local = type Db = SqlDataConnection<“Server=.;Database=CCTFundDb;Trusted_Connection=True”> let db = let ctx = Db.GetDataContext() let dataOptions […]

SQL find the column which match the parameter

I have a SQL to determine when a call come in. If the number match one of the address book number, then it will display the result. The logic is similar as following: select * from mstCustomerContact where CC_IsDelete<>1 and ( Convert(varchar(100),RIGHT(CC_Ext1, 4)) = @Phone or Convert(varchar(100),RIGHT(CC_Ext2, 4)) = @Phone or Convert(varchar(100),CC_MobileNo) = @Phone or […]

Running SSIS Package from SQL Server

I am trying to run an SSIS package from SQL Server. I was able to successfully import the package and run it manually. I was also able to run it manually from the SSIS Catalog. Neither work from the agent job. Oddly enough, when I set package source to sql server, the package does not […]

Need to insert breaks in strings of very column with ' ' or ','

I have a table that has one Column but over 100,000 rows Col_Name qwchijhuirhxnihdiuyfnx dhjhfiurhncnmxmzjcoinrds xnbxknsiiuncirnxknrxnxz I need to insert a ‘.’ or ‘$’ or some marker after every 3rd character Example of result needed: Col_Name qwc.hij.hui.rhx.nih.diu.yfn.x dhj.hfi.urh.ncn.mxm.zjc.oin.rds. xnb.xkn.sii.unc.irn.xkn.rxn.xz I originally solved this with: INSERT INTO New_Table ( c1 ,c2 ,c3 ) SELECT substring(CAST(Col_Name AS […]

How to know how many times a record has been viewed (SELECTED)?

I want to implement a feature that will show users how many times a record has been viewed (been SQL selected), but don’t know what is the best way to do it. The only way I can think of right now is to get the all recordID that has been SELECTED and then use xml […]

What is the maximum number of columns and size for Azure Sql Data warehouse table record?

I am looking to denormalize many tables into one table in Azure Sql Data warehouse which would require large number of fields (~1500 columns). Does anyone know the limitation of the number of columns for a PDW table and the maximum row size? Also what is this best practice in the sense of performance and […]

insert number in sql database with vb.net (like student ID, Employee ID)

I want to make an auto generating transaction no. in sql database like student ID, or Employee ID every time i insert data in sql database. all i can do now is to insert data. but i dont have idea how to create transaction no. in everytime i add data. Dim query As String = […]

PHP with MSSQL performance

I’m developing a project where I need to retrieve HUGE amounts of data from an MsSQL database and treat that data. The data retrieval comes from 4 tables, 2 of them with 800-1000 rows, but the other two with 55000-65000 rows each one. The execution time wasn’t tollerable, so I started to rewrite the code, […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.