|
|
|
|
|
|
Question of the Day |
Today's question (by Steve Jones - SSC Editor): | |
SQLCMD Mode | |
I am writing a SQLCMD script in SSMS with SQLCMD mode. How do I turn this on? | |
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) |
More Delays What happens when I run this code? WAITFOR TIME '2020-01-10 1:13p' Answer: An error occurs because the date is included Explanation: The WAITFOR TIME statement only takes a time string, not a datetime. Ref: WAITFOR - https://docs.microsoft.com/en-us/sql/t-sql/language-elements/waitfor-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 |
BCP - Hi, I have below requirement. Please advise how to achieve that with BCP or any other tool Have Table A with 5 million records Adding few columns to Table A and those are not null column So, can we simply add these columns or we need to export data from Table A and then drop […] |
BCP export/Import >> More Columns in Table than in Data File - Hi, I'm using BCP to export and import. Steps followed: Took BCP export for Table A (Which has 14 columns ) 2. Dropped this Table A and created again with one extra column. Now this tables will have 15 columns. 3. Created formatted file for the recreated table. 4. Ran BCP import with export data […] |
SQL Server 2017 - Development |
difference between numeric and decimal - Hello, beginner in Tsql I need help: here in one of the tables that I use, one of the fields is declared in decimal (10.5). I understand that the field is therefore decimal but what are the 10 and 5 used for ?? Thanks for your help |
SQL Server 2016 - Administration |
Availability groups - Hi all Our ETL process is quite slow and we are wanting to speed it up. I've come to the conclusion it's slow as we have to use linked servers to get to the data. This is the current set-up:- server 1 - feed from 3rd-party application (SQL 2012 Enterprise) server 2 - mirrored […] |
SQL Server 2016 - Development and T-SQL |
func_GetInvoiceNumberByDocumentNumber - I'd like to re-write SELECT below without using function. It returns 19544 records. SELECT dbo.Func_getinvoicenumberbydocumentnumber(a.documentnumber) AS creditinvoicenumber, dbo.Func_getinvoicenumberbydocumentnumber(a.originalinvoicenumber) AS originalinvoicenumber, a.originalinvoicenumber AS referencedocumentnumber FROM dwdb.dbo.pc_b_customerorder_header a(nolock) WHERE Year(a.entrydate) >= Year(Getdate()) - 3 AND Substring(a.documentnumber, 3, 1) = 'R' AND Len(a.originalinvoicenumber) > 9 AND EXISTS ( SELECT documentnumber FROM dwdb.dbo.pc_b_customerorder_header b(nolock) WHERE a.originalinvoicenumber = b.documentnumber ) […] |
Development - SQL Server 2014 |
Fifi Calculation - Hi I have below Data and i want Balance Invoices on accoun of Fifo . In case of C00220 it should return 54575 entry In case of C00575 it should return 1593 & 401 entry In case of C00576 it should return 180304 entry Code debit Credit RefDate C00220 41477 0 06-05-2019 C00220 0 41477 […] |
SQL Server 2012 - T-SQL |
handling Nulls in case series - Why is the "is null" throwing a syntax error?: UPDATE [GCDF_DB].[dbo].[People] SET [educationtext] = CASE [education]when 1 then 'Post Graduate' when 2 then '4 Year Degree' when 3 then 'Associates Degree' when 4 then 'High School' when is null then 'Unknown'END |
SQL Server 2019 - Administration |
Columnstore index to be created in Oracle - Does Oracle allow creating a Columnstore index be created on a regular, non memory optimized table? Just like it is possible to do in SQL Server. |
Not an 8 to 5 employee - How can I get re-started in the world of SQL Server. Fifteen years ago I was as a SQL Server DBA but then shifted to a career as a Storage Area Network (SAN) engineer. I will retire soon but would love to get involved with Databases again. I enjoy creating/managing databases and analyzing data etc. […] |
SQL Server 2019 - Development |
Theoretical Question regarding Orphaned data in a Parent-Child table Relation - I am providing DDL to re-create the parent and child tables involved and the DDL is a representation of the actual 2 tables involved because I'm not allowed to post the source DDL so I altered the table names and column names so I could. That said, this is a general purpose question that is […] |
SQL Azure - Development |
Dmvs to show missing indexes - Any dmvs(sripts) to show missing indexes in azure sql db? |
Integration Services |
Validating meta data of xls file - Hi Team, We get xls file every day with so many sheets in it. I need to validate only the sheet named with current year. In this case, it is 2020. the main issue is that the user some times add new columns and due to that package is getting failed. So I want to […] |
SSIS package don't running with bat file - Hello i was created simple dtsx package for copy directory files in visual studio this package running success and working but i want to create dynamically running with bat file bat file running but can't working succes please this is my bat file data "C:\Program Files\Microsoft SQL Server\110\DTS\Binn\DTExec.exe" /F "c:\users\zen\documents\visual studio 2012\projects\LoadData\LoadData\Package.dtsx" |
Design Ideas and Questions |
Star Schema draft - I'm trying to figure out if this star schema works for counting the quantity of products in the warehouse for each day. This is my schema......Are the dimension and fact tables alright? |
Buy and store desing - Hi I need to design to register the purchase and enter the products into the warehouse, make transfers between warehouses At the moment I have this |
| |
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved. webmaster@sqlservercentral.com |