I am trying to write a Stored Procedure that will give me Audit information between a date range. The Audit table stores the Audit Date, Column Name and Old Value. I want to display the Old Value and the New Value in the result set. I need to get the new value from the next […]
I’m doing a WCF-REST service using C#, which connects with a database in SQL Server to return several tables. Now, I need that my service returns a PDF File, which is stored at the table, in a varbinary(MAX) field. I’m doing some research but I can’t found something like I need. How can I implement […]
I have a column in my table with XML that looks like this: <Notes> <Note> <Author>test</Author> <AuthorInitials>JJJ</AuthorInitials> <Contents>Test treatment notes 3</Contents> <DateCreated>2013-07-17T14:43:00</DateCreated> <DateModified>2013-07-17T14:43:00</DateModified> </Note> <Note> <Author>test</Author> <AuthorInitials>JJJ</AuthorInitials> <Contents>This is the intial notes test for tasks</Contents> <DateCreated>2013-07-17T14:36:00</DateCreated> <DateModified>2013-07-17T14:36:00</DateModified> </Note> <Notes> <Note> <Author>test</Author> <AuthorInitials>JJJ</AuthorInitials> <Contents>Test 4 of Task Notes</Contents> <DateCreated>2013-07-17T14:57:00</DateCreated> <DateModified>2013-07-17T14:57:00</DateModified> </Note> <Note> <Author>test</Author> <AuthorInitials>JJJ</AuthorInitials> <Contents>This is […]
I have a table called customers which gets info populated from a form not all fields are required (this is because the form generates asf / xml with the inputted info) and I would like to be able to merge duplicates into one row then delete the duplicates. Here is my table CID | LastName […]
I’m getting a “cast not valid” error when trying to insert a data table containing xml using sqlbulckcopy. I cast the DataColumn that will hold the xml data to type System.Xml.XmlNode is that incorrect? Looking here it just says the .NET Framework type is xml. Here is an example of the xml I want to […]
If the day of the current date = 14 then the values of the parameter need to change. The month and possibly year will need to advance by 1 – May need to consider that on the 14th day of the month there may be a technical problem that prevents this process from running. Example […]
I have a view that gets the status for each category for each venue. I need to display all of the above, but only the latest in the status for each category for each venue. A general idea could be, for each item in a shop, there is a status. So for the cucumbers, letters, […]
I tried a lot to get this code smarter… as you see… it’s always the same… one variable can have 6 different values… which decides in which column some other value will be written… if the recordset still exists I make an “update…” else I make an “insert into…” I tried to do some dynamic […]
I stumbled accross an issue with full text search in columns which may contains domain names on a Microsoft SQL Server 2012. A table cell containing example.com is added to the full text catalog by the term example and com. The latter makes it impossible to search for a domain name, as any entry containing […]
I have a stored procedure that receives a (n) list of filters stored as GUIDs. What I need is a stored procedure that will receive an (n) list of an (n) list of filters so that I can return comparisons each (n) list of filters. Is this possible, and how would you script it? For […]