Collation Conflict concatening string values with varchar fields
Hi All: I have a simple query concatenating some varchar fields with some parentheses as strings:[code language="sql"]
View ArticleSend mail from stored procedure
I have a stored procedure that is used for a report. I am being asked to have an email go to one person every Monday. I wrote a stored procedure that I will run as a job in SQL Server Agent.I am...
View ArticleGetting data from 7 days back to today, but what about from just the 7th day...
[code language="sql"]DATETIME = DATEADD(DAY,-6,@Yesterday)[/code][code language="sql"]DATETIME = CAST(GETDATE() AS DATE)[/code]So that gets me data fro
View ArticleSQL Server Query is taking high CPU
Hi All,I have 2 tables. Credit Account ,Credit Account relationship.
View ArticleSQL Query (Merge Statement) Help
Hi Guys, I need help. I want to use a MERGE statement. The source and target tables are pretty big so I really want to use MERGE StatementHere is the issue. I want to compare SOURCE VS Target table...
View ArticleSend email when a record is missing
HiI have a tableCREATE TABLE tableName(id int primarykey, ProcessName varchar(50) null, IncomeDate datetime null, isProcessed int)[code language="sql"]INSERT INTO tableName(id,ProcessName,Income
View ArticleThe server will drop the connection, because the client driver has sent...
Around 2am in the morning, certain jobs fails and report fails at the same time. Report (business objects) connects to SQL server using a generic sql account. When I look at the event log, I get the...
View ArticleSend email when a field is 0
Hi,I query that will be part of a store procedure. the store procedure will be loading a table, after a load I want to check two fields first before I sent email.INSERT INTO table (id, processName,...
View ArticleSSIS Package and SQL Server Agent Job Failure - Fails at Data Import control...
Hi, we have an application that has not been changed (no new check-ins) for months. We also did not change the SQL Server Agent job. Recently, there was a move of some databases to a different server,...
View ArticleTable Structure of Monthly Data
I'm curious what everyone thinks is the best way to store data where the history of aggregated data for an ID is stored all in one table. Our current way of doing so is something like this [code...
View ArticleResource Governor + MAXDOP
Hi all.I'm configuring/testing some aspects of Resource Governor, and right now , i'm trying to set up a limit into DOP.Even specifying the value 1 (max_dop = 1 in the workload group), and confirming...
View ArticleTie row to previous rows of data
I am trying to associate the number value that has a description of SK to the previous rows up to the next SK row. In the first rows of the example below, the value "270641" would be placed in a field...
View ArticleMin not working for ROW_NUMBER
Hello , I dont think what im trying to do is possible but could someone advice on a correct way of getting the result based on the examples below ?Im trying to get the MIN of the ROW_Number however it...
View ArticleHuge number of inserts vs number of reads
Hello to allI have a system that is getting 24 hours a days xml files to import. Each of these files will generate a few new dozens of records or update existing ones. The problem is that i get over...
View ArticleModifying my parameterized query to select * an entire column
This working code lets the user use a click event in Excel/VBA to separately insert values into the same field in SQL. I would like to know how I can rewrite this code in order to have the user insert...
View ArticleDoing multiple updates with an ADODB Connection
This working code lets the user enter something in a cell, click a button in Excel and exports the data into a SQL Server database. The problem is that I would like to do multiple updates. The code...
View ArticleNeed help with T-SQL
I have more than 200 tables in one of our database and those tables contain a column name 'FirstName' and I am trying to find a person whose name is 'Desmond'. I don't want to run 'Select FirstName...
View ArticleDynamic Pivot/Unpivot
Hello, I have a table like below, where headers of columns and rows are dynamic (this is a result of query)
View Articleupload files
We would like to implement a way of upload file from a .net application and later display it and users can download and open it.The backend is SQL server database. I would like to know which is the...
View ArticleUnderstanding of Unique Index
I appreciate it might be a trifling question for most of you, but...I have a primary key on columns A, B and C (three columns in total). Due to performance issue when joined to another table, I have...
View Article