SHREDDING XML - Can it be done quickly?
I have the following combination of code, for which the declared xml variable isn't something I can influence. However, looking into the stored procedure it's a parameter to, I'm finding a SELECT...
View ArticleCTE Query to find Unique Status for Update Per Machine
I'm making a query which can provide the last compliance status for updates for a collection per machines[SCCM Database]. The issue that I am having is that when i run the query on multiple machines, i...
View ArticleFinding Table Constraints With Column Level Detail
Hi All,Could anyone please advise how to go about finding table constraints down to the column level, to show which columns are involved? I'm in the process of working on a script to drop/recreate a...
View ArticleNeed Help for performance
Hi All,I am using a Function code below for each row, this is called for 15000 rows. and it is working very slow.Can any one please help me[code language="sql"]Declare
View Articlecreate procedure gets stuck on select
[code language="sql"]CREATE PROCEDURE sp_cenik as beginDECLARE@OD DATETIME,@DO DATETIME,@TipSobe VARCHAR(6),@KodaCenika INT,@Sezona INT
View ArticleRun-time error '-2147467259 (80004005)': [Microsoft][ODBC SQL Server...
I have code written in vba that inserts data, via Excel, into SQL-Server. So far everything works well. However, sometimes it does not work. When it does not work, I receive the following error:...
View ArticleDividing partial count by total count
I have a table of items and their class rank. I need to count the class and divide by the total number of items. Here is a sample of 10 items across 4 classes. What I hope to get back is the percentage...
View ArticleExecute Process Task
Hi,I have SQL Server 2014 running on a Windows Server 2012.Until now, when I needed to post a file to an SFTP site with or without pgp, I would call a batch file from SSIS using the Execute Process...
View ArticleService Broker - Missing Permissions? or something else.
Hi,I was wondering if someone could help me find the missing permission.We have a process which uses the Server Broker to update a web page showing the progress of a task.
View ArticleQuery to find and format all Calendar events
Hi everyone, I'm working on a asp.net web page to display calendar events. The asp.net page uses a calendar control that I'm stuck with and could do with some help getting the data out of the db in the...
View Articleissue joining on Temp Table
crashes at /* Joining on Prod_Class */ section.Issue has something to do with joining on a created temp table.thoughts?SELECT * INTO #TEMP1 From(SelectL.PART_NUM,Like_PD_ID,PD_IDfromADHOC.ATS_ES
View ArticleTransaction Level Delayed Durability
Many of our client SQL servers are 2014 so can use Transaction Delayed Durability fine but we still have some clients using 2012 - problem is we deploy the same code to all clients.In order for this to...
View Articledelete records from table which are not active.
I have a table, where it has status like active, terminated. I have checked the duplicate records in the table with PNID how many active and how many terminated are there.. I found only one record.
View ArticleWrong regional settings (decimal point)
I'm not sure how this happened, but I'm no longer able to use a decimal point on SSMS. Instead, I need to use a decimal comma.SELECT @@LANGUAGE returns us_english, my windows setting is also US...
View ArticleIssue with ROW OVER partition
I was able to get this far from other posts in this forum, but keep getting error . . . invalid column . . Max_DateThe ZATS table often times has the same Composite_Part with different HTS_Num. I need...
View ArticleConvert from datetime to varchar to int
Hi All,So I've been working on an SSIS package and part of it involves pulling data from a table's datetime fields and inserting into another table's int fields. I'm having difficulty in converting the...
View ArticleSelecting records where column contains specific integer in specific position
Hi All,Can anyone please advise on how to go about returning records where an int datatype column contains a 0 in specific positions i.e.1st; or 5th and 6th; or 7th and 8th positions? I came across the...
View ArticleInteresting DimDate population task
Hey Guys, Happy New Year. I have a very interesting DimDate population request. I was intially going to manually populate this but I figured I'd ask to see if there is a way to programatically do this...
View ArticleDetecting change week over week in SQL table
Hello everybody,trying to figure what is the best way to figure out change between snapshots of project records. Snapshots are taken weekly. Project name is unique, dates are always 7 days apart.We...
View ArticleSELECT all negative values, that have a positive value
Hello,I need to identify in SQL server table all entries with a negative value, that have a positive value. How I can select this?
View Article