logo
down
shadow

SQL-SERVER QUESTIONS

Select * from x where column is quarter
Select * from x where column is quarter
I hope this helps . A way is to use MONTH() and DAY()
TAG : sql-server
Date : November 22 2020, 03:01 PM , By : Wilson G
How to grant unsafe assembly to a username found dynamically?
How to grant unsafe assembly to a username found dynamically?
will be helpful for those in need I have to register a DLL in a SQL Server from a legacy project, the bad thing is that I don't have the DLL nor the source code, just what I have is the binary string obtained from the Create Scripts option on my data
TAG : sql-server
Date : November 21 2020, 03:00 PM , By : Alex
How can I loop though columns by name in an SSIS Script component?
How can I loop though columns by name in an SSIS Script component?
it helps some times Simple Workaround You can store columns name in a List(of string) using loops , and use Row.GetType().GetProperties() to manipulate columns dynamically.
TAG : sql-server
Date : November 19 2020, 03:01 PM , By : rus
SSRS Export to Excel Filter To Many Tabs
SSRS Export to Excel Filter To Many Tabs
I hope this helps . The best I can offer is to:Add a parent group, and group by Department.
TAG : sql-server
Date : November 18 2020, 03:01 PM , By : Roberto Ramirez
SQL Server 2012 Management Studio hangs
SQL Server 2012 Management Studio hangs
like below fixes the issue The actual solution in this case was a simple restart of the server. I would recommend that this is the first thing that is tried if this is at all possible.
TAG : sql-server
Date : November 18 2020, 03:01 PM , By : NaVry
Can NOLOCK cause DISTINCT to fail?
Can NOLOCK cause DISTINCT to fail?
Hope that helps Sure this can happen. The engine is smart enough to know that since ID is your primary key it isn't going to waste resources looking for duplicates. However, you have introduced the dreaded NOLOCK hint. And you said that TableB is bei
TAG : sql-server
Date : November 18 2020, 03:01 PM , By : Ethan H. Cleveland
SSRS Mobile Reports Distinct Count
SSRS Mobile Reports Distinct Count
it helps some times Mobile reports are extremely limited compared to paginated reports. As you suggested, there's no way to do a distinct count in the visualization, you would need to do it in the dataset beforehand.
TAG : sql-server
Date : November 18 2020, 03:01 PM , By : John
Append api data to Amazon AWS SQL Server database
Append api data to Amazon AWS SQL Server database
To fix the issue you can do I'd love to be able to import/append json api data straight in to a SQL Server database running on Amazon AWS so that I can analyse it. The data source I want to import, on an hourly basis is: , One way to do itAWS console
TAG : sql-server
Date : November 15 2020, 03:01 PM , By : razan
Merge columns together from multiples tables, columns not in order
Merge columns together from multiples tables, columns not in order
hop of those help? I have 3 SELECT FROM and I would like to merge the 3 results in one table, I can't use one select*from and use JOIN for the 3 tables. , Try this
TAG : sql-server
Date : November 15 2020, 03:01 PM , By : D.Mantas
Why Can't I See SQL Server Compact After I Install It?
Why Can't I See SQL Server Compact After I Install It?
Hope that helps SQL Server Compact is not a software that you open and start working on it, instead rightly said by @Jacob in comments, that we need Management Softwares like ssms (sql server management studio) in order to access contents and work on
TAG : sql-server
Date : November 14 2020, 03:01 PM , By : Gaurav chauhan
SQL Server - Where Like statement with variable returning no results
SQL Server - Where Like statement with variable returning no results
it fixes the issue I have a table with dates formatted as strings in the following manner YYYY-MM-DD. The data contains several years worth of data and I would like to pull just the current year using the following query: , You forgot the trailing wi
TAG : sql-server
Date : November 14 2020, 03:01 PM , By : Samuel H
SQL query to find non-matching fields in certain rows
SQL query to find non-matching fields in certain rows
wish helps you My SQL Server table is something like this:
TAG : sql-server
Date : November 13 2020, 03:01 PM , By : Aleš Kóra
SQL Server - Select between 2 dates of type DD/MM/YYYY
SQL Server - Select between 2 dates of type DD/MM/YYYY
this will help To query a range of dates, use the DATE-datatype instead of VARCHAR.If datatype of column ORDERDATE is DATETIME:
TAG : sql-server
Date : November 13 2020, 03:01 PM , By : Ivan Bistricki
SQL Geography Datatype , checking Point in Polygon , STIntersects producing wrong result
SQL Geography Datatype , checking Point in Polygon , STIntersects producing wrong result
Any of those help In order to "fix" this, we need to make some form of assumption. If the assumption cannot be "instruct the users to enter polygons that obey the left-hand rule" then we have to use something else.Here, I'm assuming that the correct
TAG : sql-server
Date : November 13 2020, 03:01 PM , By : Viet
A positional parameter cannot be found that accepts argument
A positional parameter cannot be found that accepts argument
may help you . Through the double quotes in double quotes your command was split in three parts "$d = Get-Date; Get-childItem " c:\ServerManagement\Logs\SQL Server Agent " -recurse -include *.log | Where {($_.lastwritetime -le $d.Addhours(-120))} | R
TAG : sql-server
Date : November 12 2020, 03:00 PM , By : Burhan Mullamitha
Array var in SQL Server 2008
Array var in SQL Server 2008
this will help I'm trying to figure out how to create a var in Sql Server which contains an array of values, searched here in Stack but nothing consistent... this is how I imagined it could be like: , You can do it with table
TAG : sql-server
Date : November 12 2020, 03:00 PM , By : Sonu Chopra
Using a variable in a sqsh script is not working while querying in sql server
Using a variable in a sqsh script is not working while querying in sql server
wish helps you To explain what is happening here you should take a look at the SQL buffer that is being send to the server after variable expansion. In order to do that you should skip the ';' shortcut and provide '\go -e' on the next line instead (w
TAG : sql-server
Date : November 12 2020, 03:00 PM , By : James Tyson
Error Executing Query String
Error Executing Query String
I hope this helps . Below query gives an error like: , You need to make sure it is contained in single quotes:
TAG : sql-server
Date : November 10 2020, 03:01 PM , By : starxedsteph
SQL view with substring in WHERE clause?
SQL view with substring in WHERE clause?
it should still fix some issue Hm ok with CREATE VIEW it worked. Probably it is really a problem with the builder. for the hints.
TAG : sql-server
Date : November 10 2020, 03:01 PM , By : Liam McDonald D
Specify Xml index storage location in Sql Server
Specify Xml index storage location in Sql Server
Hope this helps From the Creating XML Indexes:
TAG : sql-server
Date : November 10 2020, 03:01 PM , By : leon1526
How to push Spark dataframe to Sql Server table when set_identity is off?
How to push Spark dataframe to Sql Server table when set_identity is off?
like below fixes the issue Able to resolve this issue after reaching out to Vaibhav offline who had already implemented the solution. I am posting the same here for others to use in future.Make a local copy of SaveTable() and dependent functions from
TAG : sql-server
Date : November 07 2020, 03:01 PM , By : Gashna
Create index error -The object name contains more than the maximum number of prefixes. The maximum is 2
Create index error -The object name contains more than the maximum number of prefixes. The maximum is 2
Any of those help Since the excellent link that Jacob referred to is down I was able to get the page to load but it is horribly slow. Here is the answer from Grant Fritchey:
TAG : sql-server
Date : November 05 2020, 03:01 PM , By : Chetan
T-SQL: Minimum number of characters to remove/replace so that one string is substring of another
T-SQL: Minimum number of characters to remove/replace so that one string is substring of another
fixed the issue. Will look into that further The oddity of "both" last names vs "one" last name is quite strange and probably nearly impossible to solve. But things like 'Johnsen-Smith' and 'Johnson-Smith' is quite easy using SOUNDEX. https://docs.mi
TAG : sql-server
Date : November 03 2020, 03:01 PM , By : DanielB
sql query that gets the difference between 2 recent rows for every row item that occurs more than once in a table
sql query that gets the difference between 2 recent rows for every row item that occurs more than once in a table
I wish this helpful for you Sql query that gets the difference between 2 recent rows for every value that occurs more than once in a table. for example , Here is a solution:
TAG : sql-server
Date : November 02 2020, 03:01 PM , By : friday
SSIS conditionally import if source is available
SSIS conditionally import if source is available
it helps some times This is easy enough to accomplish. You have to check for other database tables before dropping is a simple command and here that is:Pulled the query from here
TAG : sql-server
Date : November 01 2020, 03:01 PM , By : Sergei Melnikov
How to set SQL user password when deploying database project using CI/CD pipeline
How to set SQL user password when deploying database project using CI/CD pipeline
Hope this helps This plug-in in Azure Marketplace maybe useful.You can also create logins using PowerShell and include conditional execution.
TAG : sql-server
Date : November 01 2020, 03:01 PM , By : lilian douglas
SQL: How can I Parse firstname, lastname and title from fullname?
SQL: How can I Parse firstname, lastname and title from fullname?
it fixes the issue I have a column named Employee name in table 1 , Here's one example.
TAG : sql-server
Date : October 31 2020, 04:00 PM , By : Divyesh Patel
Should I store XML declaration in database and return using WebApi
Should I store XML declaration in database and return using WebApi
With these it helps Scenario: , I've identified these rules as best practices:
TAG : sql-server
Date : October 31 2020, 04:00 PM , By : voltel
SSIS Foreach loop error on CSV files
SSIS Foreach loop error on CSV files
around this issue Your columns appear to be in different orders. I replaced the tabs with pipes and got the following:Working:
TAG : sql-server
Date : October 31 2020, 04:00 PM , By : XingMo Li
Azure SQL as Publisher
Azure SQL as Publisher
hope this fix your issue You can make use of SQL Data Sync. To learn how to setup and configure it, please use this article.Hope this helps.
TAG : sql-server
Date : October 30 2020, 04:01 PM , By : Olivia
SSRS 2016 Mobile Reports Error with missing dataset
SSRS 2016 Mobile Reports Error with missing dataset
it should still fix some issue In the Report Portal you can manage the settings of the Mobile Report just like you would with paginated reports. You can set the dataset that it's pointing to there without editing the report. As you might suspect, the
TAG : sql-server
Date : October 28 2020, 04:01 PM , By : Ashok Kumar
SQL 2005: Optimize upsert-like Stored Procedure using Cursor, possible?
SQL 2005: Optimize upsert-like Stored Procedure using Cursor, possible?
it helps some times Don't think you need a cursor at all, as the data is not dynamically changing. You should be able to do this with a set based approach. Below is an example using CTE, with a left join to only insert those that do not exist in the
TAG : sql-server
Date : October 28 2020, 04:01 PM , By : Darin Mao
SQLSERVER - How to list Procs created by a particular user?
SQLSERVER - How to list Procs created by a particular user?
hope this fix your issue SQLSERVER How to list Procs created by a particular user? , Please try below. Hopefully it will help.
TAG : sql-server
Date : October 24 2020, 08:10 PM , By : Sujay Majumder
SSIS Expression to get last day of the month given YYYYMM
SSIS Expression to get last day of the month given YYYYMM
This might help you Assuming that this column is being input to the Derived column as a DT_DBDATE date type, the following expression will get the last day of the month. This expression essentially parses out the year and month first, uses these to b
TAG : sql-server
Date : October 24 2020, 08:10 PM , By : Matt Lee
how to sum up all time values on a given date?
how to sum up all time values on a given date?
I wish this help you Close. An integer variable can only accept a single value. To get the single value, you group and sum on each of the sub selects:CREATE PROCEDURE SumOnDateReport @QueryDate nvarchar(50) AS DECLARE @total_sec INT DECLARE @HourTime
TAG : sql-server
Date : October 24 2020, 08:10 AM , By : Nguyễn Huy Đức
Text Clause Explanation
Text Clause Explanation
this one helps. According to the documentation, when using PATH mode of FOR XML,
TAG : sql-server
Date : October 23 2020, 08:10 PM , By : Snapperface
SQL Server 2016 - Can't to log into SSMS after install
SQL Server 2016 - Can't to log into SSMS after install
With these it helps Solved: Looks like I installed SQL under DOMAIN\Administrator instead of COMPUTERNAME\Administrator.Logging into the server as the domain account Administrator resolved the issue.
TAG : sql-server
Date : October 23 2020, 08:10 AM , By : 2linteriordesign
SQL Server table with different case in PowerShell SMO vs SSMS
SQL Server table with different case in PowerShell SMO vs SSMS
fixed the issue. Will look into that further This seems to be a quirk of using the Item method to retrieve the table from the SMO Tables object. The first time you retrieve the table, it seems to return the table with the casing provided in the metho
TAG : sql-server
Date : October 22 2020, 08:10 AM , By : Bill Zimmerly
Transpose and Create Variables
Transpose and Create Variables
I hope this helps . If you have an known, or maximum number of observations, you can use a PIVOT in concert with Row_Number() (assuming TIME is the proper sequence)If the number of observations/columns is not known, then you'll have to use some dynam
TAG : sql-server
Date : October 21 2020, 08:10 AM , By : Simon
SQL : Output multiple left joined rows as one record for csv file
SQL : Output multiple left joined rows as one record for csv file
around this issue If you have a fixed number of equipment for stock (I assume 3 for this ) You can do a pivot using GROUP BY.
TAG : sql-server
Date : October 20 2020, 08:10 PM , By : Heinrich
Removing Date From Date/Time Column
Removing Date From Date/Time Column
should help you out I have a column, [RESULT_DT_TM] which contains both date and time values. It looks like like this: , Simply
TAG : sql-server
Date : October 20 2020, 08:10 AM , By : user2173666
Subquery a Cast Function
Subquery a Cast Function
wish help you to fix your issue Since you are mixing datatypes... perhaps a conditional aggregation would be more useful.Example
TAG : sql-server
Date : October 19 2020, 08:10 PM , By : user2173876
Set based stacking update query
Set based stacking update query
it fixes the issue Using ZLK's query from the comments, I converted it to an UPDATE statement that you can run after each time records are added to the table.
TAG : sql-server
Date : October 19 2020, 08:10 AM , By : user2173973
Can someone explain the `BypassPrepare` connection-parameter used when building an ETL via SSIS and VS?
Can someone explain the `BypassPrepare` connection-parameter used when building an ETL via SSIS and VS?
Any of those help First of all, it is important to remember that BypassPrepare is a property of Execute SQL Task, not a database connection.The property allows you to toggle design-time SQL syntax check, which can be done for you by VS automatically
TAG : sql-server
Date : October 18 2020, 08:10 PM , By : Trishla Prasad
What is the optimal way to get only latest ID's from table in SQL
What is the optimal way to get only latest ID's from table in SQL
wish help you to fix your issue I'm trying to get only a single row per Appointment Number in a table storing a history of appointments. It works fine with a few rows but then gets slower? Is this the best way to do this kind of check and I'm just mi
TAG : sql-server
Date : October 18 2020, 08:10 PM , By : user2174154
How to join JSON with table?
How to join JSON with table?
I hope this helps . I have a master table with column names for example: , Given a setup like this:
TAG : sql-server
Date : October 18 2020, 08:10 AM , By : user2174345
Transforming a sql table into its inverse
Transforming a sql table into its inverse
Does that help Kind of a unusual requirement if these are the actual data.Anyway, do a SELF CROSS JOIN or INNER JOIN on the same table and check for State not match
TAG : sql-server
Date : October 17 2020, 08:10 PM , By : user2174652
Azure SQL Database Pricing
Azure SQL Database Pricing
it helps some times TL;DR: Azure SQL pricing is "flat": first you choose a performance level for your database which has a fixed cost (e.g. S6 for $580/mo or S1 for $30/mo), and this is billed by the second. Azure does not bill your account for actua
TAG : sql-server
Date : October 17 2020, 08:10 AM , By : brianpaulrue
Log Reader error while adding a node in SQL Server peer to peer replication
Log Reader error while adding a node in SQL Server peer to peer replication
like below fixes the issue Adding the resolution for the benefit of anyone who faced this issue on SQL 2012: We engaged MS support on this. Apparently their stored prcedure "sp_dropsubscriber" misses some tables sometimes. In our case, this entry was
TAG : sql-server
Date : October 16 2020, 08:10 PM , By : B D
Correct way to convert Month Name and Year to complete date SQL Server
Correct way to convert Month Name and Year to complete date SQL Server
I wish this helpful for you I have data in the format below. , I think it's as simple as this:
TAG : sql-server
Date : October 16 2020, 08:10 AM , By : user2175190
Select records that appear twice, with a slight difference
Select records that appear twice, with a slight difference
fixed the issue. Will look into that further I have quick question on a select I'm trying to do. , Using aggregation:
TAG : sql-server
Date : October 15 2020, 08:10 PM , By : user2175237
tsql display value on first row of each group
tsql display value on first row of each group
I hope this helps you . Assuming I got two tables, one is trip and another one is amount table. , use the logic below
TAG : sql-server
Date : October 14 2020, 02:24 PM , By : Huan
shadow
Privacy Policy - Terms - Contact Us © voile276.org