I’m looking to load a dimension table that will contain a self-referencing key, and I want to understand what the most efficient / effective method would be. Here’s my setup: I have a Message table in my Staging environment that contains two keys, a primary key for the Message and a self-referencing foreign key for […]
I have written a stored procedure as Declare @Split table ( Jurisdiction nvarchar(max) ) Insert into @Split select Jurisdiction from tbLicence where AgentId =@AgentId; Select * from @Split; Declare @products varchar(MAX); Select @products = Jurisdiction from @Split; Select @products; I want to put all the values of column @Split in @products variable. Please note that […]
Is it possible to interchange a number of values of string position? To explain it clearly here: Is it possible for 103414823111 to be altered to something like this 823111103414. To make it detailed: I want to 103414 be placed after 823111 instead of having it before. The cutting of that certain data is done […]
Although the SQL Server Agent service jobs have started then cut and run, sometimes does not work until you restart the jobs related ever again. Why might that be?
I’m struggling with some sort of auto-optimization when creating a view in TSQL. The optimization is done both when using the Designer and when using CREATE VIEW. The output is equal, but I don’t understand why it’s done. Can anyone please explain me why this is optimized / why the lower one is better: […] […]
I’m working on a mmorpg game server that serves hundreds, sometimes thousands of players simultaneously. Some player actions sent to this server requires database access (sql), for example: when the user selects one of his characters, all data (items, levels, position) associated with this character are retrieved from the sql server even though this application […]
My database uses external C++ libraries for some calculations. As said TRUSTWORTHY indicates whether the instance trusts database. Is it possible to set it for every instance connected to database without doing it manually. ALTER DATABASE db_lib SET TRUSTWORTHY ON
I am having some issues creating a query to meet a requirement. There are two tables in this form: Names(nameID(PK), name,…); Invoices(nameID(FK), invoiceID, invoiceDate, invoiceTotal,…); I want to display all these columns (Name, invoiceID, invoiceDate, invoiceTotal), with the constraint of having to only show the most recent invoice date. So as such, multiple names can […]
I need to set up something to copy data from a table in one database to an identical table in another database. I’ve heard about setting up an automatic job in SQL, but I don’t know where to begin. Can someone explain how to do this in SQL Server 2012 using Management Studio?
I’m having an issue where I am pulling some names from a SQL Server 2005 Database and trying to use values from an outputted CSV to create folders in a Windows directory using VBA in Excel but Chinese/Japanese characters are not appearing correctly. In SQL Server the string is stored as ¡è‚¡ä»½æ Instead of 股份 […]