Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Development |
Clearing the data from all the tables - Hi, there is a requirement for me to clear all the tables of the database which I am using now. There are around 100 tables in the database. Lots of unwanted data is inserted to these tables, it needs to be cleared. Most of the tables have IDENTITY (1,1) property assigned on the ID column. […] |
SQL Server 2016 - Administration |
SP_MSIns_ "stuck" on inserting into a table. - Hello All, I'm having trouble with transactional replication I'm hoping someone can help with. I have Server A (publisher), Distro (Distribution server), and Server B (Subscriber). All servers are 2016. B is our report server. We have a particular table I'll just call 'Sales' that might have 300 records replicated to it in a day. […] |
Will adding files to TempDB replicate to 2nd node within an always on group? - I want to add 3 more datafiles to tempdb on a database server that has a second node in an always on high availability group. With MSSQL (I'm more used to Oracle) when I do this on the primary server, does the DDL get ran on the 2nd node and the files created on it […] |
SQL Server 2016 - Development and T-SQL |
Get data on specific time interval - Hi All, Happy new year 2020. It been long time I am here. There is a job running for me daily @ 4 AM and @ 4 PM daily If any of the job failed say if @ 4 AM job failed it will be retriggered @8AM/9AM based on some business logic and if 4PM […] |
Comparing to Columns from the same table - I am subtracting two columns (_REG_READING- START_REG_READING) and want to match the output (ActualRead) with another columns (FINAL_REG_QTY) to know if there is any difference. But I am getting the error message “invalid identifier” Below is the query… select BSEG_ID,SP_ID,FINAL_REG_QTY,START_REG_READING, END_REG_READING,END_REG_READING- START_REG_READING AS ActualRead from CI_BSEG_READ where FINAL_REG_QTY <> ActualRead =---- If someone can help |
How to correct the query and make it working in 2016 - WITH T1 (ID1, ID2) AS ( SELECT 1,1 UNION ALL SELECT 1,1 UNION ALL SELECT 1,1 UNION ALL SELECT 1,2 ) SELECT *, RANK() OVER (PARTITION BY ID1, ORDER BY ID2) AS 'RANK', ROW_NUMBER() OVER (PARTITION BY ID1, ORDER BY ID2) AS 'ROW_NUMBER', DENSE_RANK() OVER (PARTITION BY ID1, ORDER BY ID2) AS 'DENSE_RANK' FROM T1 […] |
Two tables but if 2nd table has one row that is to be ignored - I cannot think of an easy way Two Tables Table 1 PROJECT Project_ID , Client ID Data Project_ID , Client ID 101000 A00001 101000 A00002 102000 A1111111 Table 2 CLIENT Client_ID ROLE Client ID ROLE A00001 SYS A00002 SYS A1111111 SYS SELECT * FROM […] |
Administration - SQL Server 2014 |
Cluster, HA., replication. what are my options without a static ip address - SQL Server 2014, we have never been asked to provide redundancy until now. We have servers but they are all virtual and do not have static ip addresses. I need to know what kind of fail over I can do when I dont have an ip address. I have spent most of this year researching […] |
Development - SQL Server 2014 |
Index larger than table - I am looking at the large amount of space taken up by indexes and have a few questions; I have been searching online for a while and can't find seem to find a direct answer. For context I have more of an Oracle background. On a table with a clustered primary key, is the row […] |
SQL Server 2012 - T-SQL |
How to get highest bonus and second highest bnus paid freelancer for each group - I have a table below: Freelancer(id, fl_name, bonus, fl_group) Create table Freelancer (id int, fl_name varchar(20), bonus int, fl_group varchar(50)) insert into Freelancer (id, fl_name, bonus, fl_group) Values (1, 'John', 1000, 'SQL') insert into Freelancer (id, fl_name, bonus, fl_group) Values (2, 'Jane', 990, 'MySQL') insert into Freelancer (id, fl_name, bonus, fl_group) Values (3, 'Jimmy', 320, […] |
SQL Server 2019 - Administration |
Always Encrypted - Data Types - I am starting to take an in-depth look at always encrypted and have been working through some examples. I have a column which is an integer and i have selected that column for always encrypted encryption. When i query this column, the encrypted data is returned (not an integer) but the data type of the […] |
dbmail mail alert code - Hi, I am new to the SQL coding. Need help in configuring the mirroring alert when the db will go to suspect mode. I configured dbmailprofile and succesfully i am able to send the mail through sql server . now for alert i given the below step in job. exec msdb.dbo.sp_send_dbmail @profile_name='newprofile1', @recipients='abc@xyz.com', @query='select name,state_desc […] |
SQL Azure - Administration |
Correlation of DTU and RAM in ( GB) allocated to DB - Hi, Azure portal and DMV providing % of memory used by database I want to query MAX RAM in GB allocated to server assuming we have only one customer database per server DTU 500 = ? GB Ram , DTU 1750 = ? GB Ram Is this information secret ? Thank you Alex |
Reporting Services |
ssrs 2012 page footer - in an ssrs 2012 report, my user would like a page footer to only be displayed when there is a specific 'group' changes. Basically this would only occur when a school name changes. This request is being made for a large school district that contains a large volume of schools. If this is possible, would […] |
Integration Services |
Improve or replace Script Component - Dear SSC, I've been working on something here to replace a function which was called as part of a Script Task. That part actually flies now but there's more to that: Business Logic (which I moved from the Script Task to a Transformation Script Component) which seems to be processed RBAR ( which renders my […] |