Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
BAG - how to change disk drive letters for database files - I've set up a few BAGs on the sql cluster instance. When defining the default locations for data, tlogs and temp database files I use another drive for each e.g. D: for data, E: for tlog and F: for tempdb. The problem is that I used the wrong drive letters, meaning I messed up the […] |
Log Shipping - multiple time intervals - On SQL Server 2017 I've set up log shipping. My question is, since it seems like it is not possible, is it possible to set up log shipping with 2 different time intervals for backing up and restoring tlogs e.g. every 30 min from 7 AM to 3 PM and after 3 PM backup and […] |
SQL Server 2017 - Development |
SQL equivalent to NORM.DIST Excell function? - Hi, I was wondering how I would go about calculating the normal distribution for a number of values, specifically the Probability Density Function. I know there is a function in Excell that performs this but I need to do this in SQL (I'm trying to create a bell curve graph in SSRS). […] |
What are the most common system tables, views, stored procedures, functions, etc - What are the most commonly used database objects that I should become familiar with? I'm trying to apply the Pareto Principle (80/20 rule) here to save myself time. |
SQL Server 2016 - Development and T-SQL |
update table all 0 values to null single query - Hi Team, please help on this below update query. My data looks like: create table #a(a int,b int,c int,d int) INSERT INTo #a select 0,1,0,2 union ALL select 0,2,0,3 union ALL select 0,3,0,4 select * from #a a b c d 0 1 0 2 0 2 0 3 0 3 0 4 expected […] |
XML file to sql table - Hello Guys, Can anyone help me please? I have a xml file, please see attached pic. When i try to import xml file to a sql table "ReplacedForblog_primaryText" column's value does not translate correctly. All other columns are translated correctly but this one is not. It brings some string in front of actual data. Numbers […] |
SSIS and flat file column headings with special characters in them - Thanks in advance for any help! I have a csv file that has a header row in which the header column titles have some special characters in them. For example, the column for a diagnosis code (we are a healthcare organization) might have the heading "Diagnosis: Primary". For reasons I won't get into here, I […] |
Group by and a list. - Suppose I want to do a count, grouped by an article and some columns I do not want to group on but I want some examples of the content. Is there a 'simple' solution for this. (Not using FOR XML) Example result. Counted Article Colors […] |
Administration - SQL Server 2014 |
Sessions with no query running, but an open transaction? - This has cropped up on one of the servers I maintain. The end user will report a problem, I'll use a query to check running queries which will show a fair number of blocked queries. The head blocker however, does not show a query. In doing further (and better) research on this today when it […] |
SQL 2012 - General |
BCP in to SQL DB - Hello, I'm trying to import some data from a .dat plain text file to SQL using the following BCP command. bcp dbname.dbo.tablename in DataFile.dat -f format.fmt -F2 -T -S "servername, ####" > bcp.log After the data imports to SQL. We have a tab at the start of our data for each row in the first […] |
How to Query an Excel file with mutiple cells for one single ID - Hi Folks, My first question here. This may be lengthy, sorry in advance:-) I am looking to read an excel file into a SQL Server table. The issue I am having is the data entry in the excel file was done in such a way that a person can have multiple pieces of software listed […] |
BEGIN TRANSACTION, ROLLBACK TRANSACTION, COMMIT TRANSACTION - I do a lot of ad hoc update, insert, delete statements and was wondering if I should encapsulate using BEGIN... ROLLBACK... COMMIT to give me an out if something goes wrong like below: BEGIN TRANSACTION UPDATE B SET expired = -1 FROM GCDF_DB..BillingThirdNotice B INNER JOIN GCDF_DB..Certs C ON B.PeopleID = C.PeopleID WHERE C.certificationExpireDate < […] |
SQL Server 2008 - General |
SQL Server Agent Job - Decision Extract Question and Purpose - Hello Support Forum, I've inherited a 2008 R2 server and after scrubbing through the maintenance Plan and Job setup, I came across a scheduled event with the purpose of conducting a "Decision Extract" for an entire Database (that you specify). I've looked at the Query and can follow it no problem but I'm unaware of […] |
SQL Azure - Development |
RLS and Multi tenancy - Hi All, I am looking at implementing RLS in my multi tenant databases and was trying to think of a way of being able to extend access to a group of tenants rather than a single tenant. One tenant (the owner of the record) would create and maintain group access but I am not sure […] |
Reporting Services |
Creating bell curve in SSRS - Hi, I have a report that shows how long we have spent on certain matters (I work for a solicitors). I round the amount of time spent on a matter to the nearest hour so we could have 5 matters where we spent 1 hour, 3 matters where we spent 2 hours, 1 matter […] |