Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Development |
Group and total by column Name - Guys, How do i group the below by type and date so i have a total for each day for each person by each type. So the desired results should look like: INTO #SampleData2 FROM ( VALUES ('2019-01-01', 'Dave', 'Break', 797), ('2019-01-01', 'Dave', 'Break', 746), ('2019-01-01', 'Dave', 'Break', 511), ('2019-01-01', 'Bethan', 'Break', 631), ('2019-01-01', 'Bethan', […] |
What is wrong with my code? - Here is my code: CREATE TABLE ProjectCodes ( ProjectID varchar(22), ProjectName varchar(25), Level char(1), [Project Classification] varchar(14), [Project Type] varchar(11), Billable char(1), DEFAULT 'Y', [Allow Charging] char(1), DEFAULT 'Y', Active char(1), DEFAULT 'Y', [Contract No] char(17), [Task Order No] char(17), CONSTRAINT PK_ProjectCodes_ProjectID PRIMARY KEY CLUSTERED (ProjectID ASC) ) The error message is: Msg 142, […] |
SQL error : Message 207 - Can anyone help me understanding this particular werror : Msg 207, Level 16, State 1, Procedure SP_FlagTests_CY, Line 266 Invalid column name 'BaseSolvencyBuffer_CYMinus1'. |
Computed Columns Formulas - So, I'm trying to figure out what's the best approach for this: (FIelds:) A - currency B - Equals A C - (A+B)/2 D - Checkbox: If on, C=C/2 (meaning, not a new field, just turns C into Half of C) I need this fields to be "persisted", so that I can use them on […] |
understanding behavior [with persist_sample_percent=on] on maintenance process. - When creating a table [s1].[tmp_t1], inserting some data into same table (~500 rows) from table [s1].[t1], dropping [s1].[t1], and renaming [s1].[tmp_t1] to [s1].[t1] as a part of a maintenance process, I am seeing update stats without using the persisted option and n rows that i last executed manually. I am wondering why the query optimizer […] |
empty table is large - I have a table used for staging during ETL. It is empty most of the time, but on occasion, during data loading, it can get quite large. Even after all records are deleted, the table is still very large & this is making table scans very slow regardless of how many rows it has. Table […] |
SQL Server 2016 - Administration |
Migration from MS Sql Server 2016 => PostgreSQL 9.6.12 - Looks like this is going to be a thing for me sooner rather than later and I'm just starting to think about how to go about this. Does anyone have any good reference material or know about any conversion apps that are worth the effort? Also, does anyone have any advice for keeping a PostgreSQL […] |
SQL Server Agent stops unexpectedly - SQL 2016 Enterprise running on Server 2012 We migrated a lot of ETL jobs to a new server and after about a week of running the agent stopped on us one morning. This happened again about 4 days later. Nothing in the agent or SQL logs. in both cases the event viewer showed an application […] |
Administration - SQL Server 2014 |
Change Character - I need to change Varchar column from 100 to 200 for one of the table Table has 80 Million records and allows Null values. I don't have test server to test, so i am curious how long it will take to Alter Column from 100 to 200 Varchar |
Development - SQL Server 2014 |
Is there CLEAN function, or similar, similar to the Excel function> - The Tables I use often times have control characters in them, like CRs and LFs. The data also has spaces. I know how to remove spaces, but how can I a function like CLEAN (in Excel) in my SSMS report?? possible? thanks |
SQL 2012 - General |
https://first2fitness.com/brilliance-sf-cream-uk/ - Seventy five percent of our skin is included water and collagen. Our skin is presented to cruel UVA and UVB radiation bringing about age spots, barely recognizable differences, and wrinkles. As we age, our bodies produce less and less collagen, prompting the arrangement of wrinkles and scarcely discernible differences. Most enemy of maturing items use […] |
SQL Server 2008 - General |
how to get 0 if records have empty or null values when column datatype is numeri - Hi I have one doubt in sql server how to get 0 when records have empty or null values when column datatype is numeric in sql server else get max(id) values in sql server Table : empid CREATE TABLE [dbo].[empid]( [id] [numeric](11, 0) NULL ) ON [PRIMARY] GO INSERT [dbo].[empid] ([id]) VALUES (NULL) GO INSERT […] |
SQL Azure - Development |
Azure SQL MI Question (tempdb issue) - We are getting following error while dumping data from Databricks into SQL MI. "Error : Could not allocate space for object 'dbo.SORT temporary run storage: 140799153471488' in database 'tempdb' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting […] |
Reporting Services |
Comparing list to only show Names that have not turned in something - I have 2 Data Sets. One that shows The peoples names and when they have turned in there field logs. Then I have a data set that is just a list of names. How can i compare the two data sets to only show the names of the employees that have not turned in a […] |
Integration Services |
How to run package (catalog) from PowerShell with Environment variable in DTExec - Hello Everyone, I am new to PowerShell. I don't even know the basics. I have used the below script and able to run the package successfully. But the problem with this script is it just triggering the package and returning the execution id. Not sure whether the package got succeeded or not. https://docs.microsoft.com/en-us/sql/integration-services/ssis-quickstart-run-powershell?view=sql-server-2017 Later I […] |