Laden...
|
|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
A calculated column in R | |
I have a small dataframe in R that looks like this: > mysales orderdate customerids orderqty orderprice 1 2019-09-23 1 10 10 2 2019-06-16 2 20 10 3 2019-03-09 3 30 9 I want to add a line total column, called linetotal, that is the product of the quantity and the price. Which code does this? | |
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) |
Backing up to Azure I want to send the backup of my SQL Server 2019 database to Azure Blob storage. When I enter the URL, what is the format? All CAPS are the items I set for my account. Answer: http[s]://ACCOUNTNAME.blob.core.windows.net/CONTAINER/FILENAME.bak Explanation: The format is: http[s]://ACCOUNTNAME.blob.core.windows.net// A filename must be provided, as well as a container. Ref: SQL Server Backup to URL - https://docs.microsoft.com/en-us/sql/relational-databases/backup-restore/sql-server-backup-to-url?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 |
Inserts not propagated in transactional replication - Hello, I have a transactional replication configured which subscription fails to sync to often due to 20598 errors. I've enabled verbose logging on the Distribution agent, nothing more detailed captured than the message that the UPDATE fails due to the row missing at the Subscriber. I've run profiler on the Subscriber side and verified that very often […] |
SQL Server 2017 - Development |
Import csv file into existing table where 1st row has sep=, - Hi, I have a csv file that has the value "sep=," in the first row and the header in the second row. I can import it as using the flat file wizard however that doesn't allow importing into an existing table. The data import task allows importing into an existing tables but i can't figure […] |
Cross Apply, sub query or something else.... I\'m stuck - need help on a query please. given the following table; CREATE TABLE #T (CATEGORY bigint, NESTEDSETLEFT bigint, NESTEDSETRIGHT BIGINT) INSERT INTO #T ( CATEGORY, NESTEDSETLEFT, NESTEDSETRIGHT ) SELECT 5637145852,1526,1541 UNION SELECT 5637145310,392,407 UNION SELECT 5637145515,814,837 I need to be able to pass NESTEDSETLEFT and NESTEDSETRIGHT into this query without using a cursor.... SELECT CATEGORY, ITEMID […] |
SQL Server 2016 - Administration |
Old version SQL server license questions - Please forgive me for asking questions about licensing on older version SQL servers We have 6 SQL servers on prior 2012 versions (1 version 2005 and 5 versions 2008 R2, standard editions) still being used for our business, I have two questions: Microsoft extended support for 2005 and 2008 R2 version SQL server has already […] |
SQL Agent error history - Is there a way to capture 2 things, when did the job failed and why did it fail ( capturing error message). I don't have the history available for couple of jobs but do know they have failed before and they were fixed. I want to know why they failed before like by looking at […] |
Linked Server Modification - I have a linked server and need to change only the @svrproduct and the @datasrc. I cannot figure out how to do this. I do not want to drop the object and recreate. @server = N'EAUTO', @srvproduct=N'1.2.3.4', @provider=N'SQLNCLI', @datasrc=N'1.2.3.4' Thanks, Terry |
SQL Server 2016 - Development and T-SQL |
How to use PIPES in T-SQL to bring two number based on user entry - Hello I have a query that use wildcard to bring any value according to the user entry now the use want to enter two number at the same time so I was trying this with a "PIPE", please help tb_phone.number IN ( '%' + @number + '%' | '%' + @number + '%') Also I […] |
Administration - SQL Server 2014 |
Service pack process? - Hello! Our current version of SQL 2014 is only updated to the first Service Pack 2 download 12.0.5000.0 We're wanting to get fully updated with the Service Pack 2 Cumulative updates and Service pack 3. I'm sorry if it's a stupid question, first time updating this one. Would this be the correct update sequence? SQL […] |
SQL 2012 - General |
Adding Column to Existing View - Incorrect Syntax near ')' - I created a view several years ago that has been working well. Basically it selects a value from a row directly below it. Now, I would like to add another column to the view but when I try to save it, I get the error message 'Incorrect Syntax near ')'. If I try to run […] |
DB maintenance plan to clear tempdb? - Hi Experts , The tempdb in our production database is getting full and this is causing the SQL server job and other query's to halt. Should I shrink the tempdb to generate space? .I would require your help in creating a maintenance plan which would trigger automatically to generate space in tempdb. Thanks in […] |
SQL Server 2019 - Administration |
Create Credentials of the network shared access in SQL server to be used by SQL - Could you please let me know 'Create Credentials of the network shared access in SQL server to be used by SQL Agent' |
SQL Server 2019 - Development |
Size of table - Hi This probably a silly question but..... If I query the size of a table and it shows 20 gigs in size, when I do a select * from that table from another server will I bring back 20 gigs over the network? thanks in advance |
Validate field in STaging before loading - I have a STaging table where I have defined all fields as Varchar(255), now I'm trying to load the Prod table, and one of my fields(order_open_qty) is defined as Decimal(18,10), but it fails as data from STaging fails converting Varchar to Dec. Is there any pre-validation I can run to change those bad records to […] |
Analysis Services |
Azure Log Analytics or SQL Profiler for AAS? - I think you can use both SQL Server Profiler or Azure Log Analytics for Azure Analysis Services logging. But which one is the better option? |
Integration Services |
Running SSIS package on Always On and getting error - Hello, so My ssis Package i created, does 2 things: 1.it first checks if the Table exists, and if not, create it 2.checks if Store procedure exists, if not creates it using a Dynamic tsql statement so far, i made several ssis packages with it including several Execution SQL Task, and works fine, just this […] |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Laden...
Laden...
© 2024