|
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
Combining Python Lists | |
I have this code:
a = [1, 3] b = [2, 4] c = [(x,y) for x in a for y in b] # nested iterators print(c)What gets printed? | |
Think you know the answer? Click here, and find out if you are right. |
Yesterday's Question of the Day (by Steve Jones - SSC Editor) |
The DEFAULT RANGE If not specified in an OVER clause, what is the default RANGE framing? Answer: RANGE UNBOUNDED PRECEDING AND CURRENT ROW Explanation: The default is RANGE UNBOUNDED PRECEDING AND CURRENT ROW. Ref: OVER() Clause - https://docs.microsoft.com/sql/t-sql/queries/select-over-clause-transact-sql?view=sql-server-ver15 |
Database Pros Who Need Your Help |
Here's a few of the new posts today on the forums. To see more, visit the forums. |
SQL Server 2017 - Administration |
Moving Listener and Cluster AD objects - Hi our Ad administrator wants to move all the listener and SQL cluster objects into their own OU, even for live production servers. I'm fine with that but can anyone confirm whether moving the AD object will have an impact on the SQL servers. My gut says no it won't but they're production servers Cheers […] |
Account the SQL service is Locked - Good morning all , Does the fact that the Active directory account for starting the SQL service is locked does this cause problems with the functioning of SQL server thanks |
Find rogue process updating statistics - I have a 3rd party app and DB that requires all stats be updated using full scan, 100% sample rates. I have a maintenance plan to do this every weekend, but have found that something is erasing my work by updating stats with a small sample, less than 1% on tables with 100+ million records. […] |
SQL Server 2017 - Development |
Parse a very large delimited string - Trying to parse a very basic table with 2 colums, and ~9,000 rows. Columns are ID and delimited_string. ID is a varchar (50), and delimited_string is a varchar (max). The max len of the delimited_string is 313,895 characters. The delimiter is a semi-colon. I've tried a bunch of different methods, but can't get the query […] |
Updating schema reference automatically in stored Procedures - Requirement: Need to copy all objects (tables, fn, stored Procedures) from default dbo schema to new schema. This new schema is created programmatically on user action from the front end. Problem: Copying the objects is straightforward for tables. For stored procedures and functions also it is not too bad to make a copy. My issue […] |
Generate scripts of creating multiple external tables - Hello, we are creating prod environment and need create multiple external tables (in Azure SQL) in PROD. How can I generate the script of creating external tables at once in lower environment? instead of clicking 'Scripts table as' one by one. Thanks in advance. |
SQL Server 2016 - Administration |
TDE Understanding - Hi All I hope to get some clarity on a TDE configuration I am working on. I have multiple PROD servers and 1 QA server where we restore PROD to on a regular basis. Each server will have its own master key obviously and its own certificate. Question - Does one server certificate service all […] |
SQL Server 2016 - Development and T-SQL |
SQL Agent job TIME token - leading zeroes removed - I'm using "$(ESCAPE_NONE(DATE))$(ESCAPE_NONE(TIME))" in a job step which, according to the documentation, is supposed to be the date in YYMMDD format and the time in HHMMSS format. However, the stored procedure I'm running (which has a VARCHAR parameter) is getting: YYYYMMDDHHMMSS - when the hour is between 10 and 23 YYYYMMDDHMMSS - when the hour […] |
SQL 2012 - General |
How to find two latest prices for each ItemNo using SQL query - I have two tables: OrderItems tabel OrderId OrderDate ItemNo ItemDescrepation Unit Price 1001 03-15-2020 91570 Charger 12V $50 1205 05-06-2020 91570 Charger 12V […] |
SQL Server 2012 - T-SQL |
Performance issue (e.g. top 60000 takes 1000x longer than top 50000 on insert) - Hi all Short version: USE StagingDBtemp -- new empty database with same design as StagingDB created for no reason other than troubleshooting this IDENTITY INSERT Incoming ON INSERT INTO Incoming (ID, DataField1, DataField2) SELECT TOP 60000 ID, DataField1, DataField2 FROM StagingDB..Incoming -- note: ID is auto-incrementing INT and PK and there are no other indexes […] |
SQL Server 2019 - Administration |
Database Usage by Login Account - I would like to see which accounts in SQL are actively using databases. When I look at results from a trace file, I can see individual users, who do not have specific permissions. For example, I see that "MyDomain\Joe_Smith" accessed "Sales_DB". although Joe_Smith doesn't have SQL permissions. I suspect they are in an Active Directory […] |
Reporting Services |
? on changing option on Web interface - Hi, I would like Basic users to see just the "View" and "search" options, but admins to see all Any ideas? Thx |
SSRS 2016 |
Can Case be used to assign filter with =, = - When writing a SQL query, I want to have a parameter (say, Return) which will have the following values (the parenthesis text is what the end user sees, not the values): A (Budget) B (Actual) C (Encumbrance) D (Actual & Encumbrance) In my dataset, the Tranact_Type are: 1 for Actual 4 for Encumbrance 5 for […] |
Integration Services |
Package status = Succeeded despite errors - I have a package with an OnError event handler which records the failure in a database table. This is all working fine but looking at the "All Executions" report, the status is "Succeeded". This has the effect that the SQL Agent job which runs the package is also succeeding. Consequently no failure notification is raised […] |
The SQL connection password is not saved after deployed to the server - I developed an SSIS package in Visual Studio 2019 and deployed it to SQL Server 2017. The package contains a SQL DB connection using Microsoft OLE DB Driver for SQL Server. It worked fine until today when I updated the package with an email address change, then deployed it back to the server. When executed […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |