Sql query to execute and import the result to csv file
Can you please share any code snippet that willExecute sql select query and automatically import the results to csv files
View ArticleI want to how use order by clause row wise
Hi friends, i want to know how to use order by clause in row wise for example, suppose the rows is 10 20 30 40 so the output is should be 10 20 30 40
View ArticleIs there a way I can shorten the below query into a single query?
I have the below query. IS there a way I can put this into one single query? If not, can I shrink it further anyway? Please advice. DECLARE @highRegion TABLE(regionId INT, countR INT) DECLARE...
View ArticleNightly backups - (2008 R2)
I deleted a couple of databases from our system, however, they are still being backed up nightly. How can I delete them from our nightly backup plan? I've right clicked on the database and selected...
View ArticleExtract total rows affected by running a query
Hi,I'm using the below to get the difference between two tables:Select * from Table1ExceptSelect * from Table2If there is a discrepancy between 2 tables, this query returns the difference. I want a...
View ArticleFiltering Rows in SQL server Query
Hi EveryoneI am new to SQL,I wrting a query which I will at the later stage create a report but my query is creating duplicate records,I have tried the group by and the sub selects but this still bring...
View ArticleImporting data in to SQL Management 2012
HII have now managed to convert my bcp files to text, however they all contain loads of @**@ & *@@*mixed in with the data.I have built my tables, however I am struggling to import the data as text...
View ArticleLogging
I'm trying to log who changes job owners in SQL Server Agent. I have looked at SQL Server Agent logs and SQL Server logs and did not see anything that highlights that.Where can I find that information?...
View ArticleReplace multiple spaces with one space
i have searched for other theads on this but not been able to make them work. i have several fields that have multiple spaces betweent the City State and Zip Code. i want to be able to make only one...
View ArticleDelete the values passed as parameters from a certain table (In memory native...
I'm trying to make a simple delete in In Memory SQL (Hekaton).My objective of this native stored procedure is to delete from dbo.SimpleQueuethe elements that were passed as parameters (@MsgIds).I've...
View ArticleRemoval auto schema at creation of table
Hi there! I've done already the schemas for all the tables a you suggested. But when I created a new table the dbo prefix (dbo.ADM.NewTable) appears. I'd like this dbo not to automatically appear...
View Articlesql fail to install
please help meID: 50000 Source:setup.rll TITLE: SQL Server Setup failure. ------------------------------SQL Server Setup has encountered the following...
View ArticleAccess to network resources from SQL management console
Hallo.I have an existing instalation of SQL server in a domain environment.SQl server is installed with default settings/network service/.I'm writing script in which i need to copy some files from...
View Article"enabled" in job schedule.
If you right click on a job name under SQL Server Agent, Jobs, jobexample and selectPROPERTIES; you'll get to Job Properties for jobexample. If you selectSchedules, and double click on one of the...
View ArticleConnect to Server box
Hi, Every time I start SSMS 2012 the "Connect to Server" box is partially obscured in that the top of it, the move bar can't be accessed. I've manually moved it using "alt+space" then "M" followed by...
View Articleregarding sqlserver
Hi,i have a tableid value1 11 22 1i need output like thisid value1 1,22 1
View ArticleNeed to Parse Name Field with anywhere from zero to four delimeters
Thanks in advance. I have a name field that might contain one name or up to five names that are separated by a forward slash '/'. I have found code that can do for FirstName and LastName, but nothing...
View ArticleI Cannot Install SQL Server 2014 Express on Windows 10
I Cannot Install SQL Server 2014 Express on Windows 10, the error msg occurred such as "...cannot start SQLBrowser service...". How to fix it?
View ArticleMoving Database instance - Larger storage area
Hello,I have a SQL server with multiple instances on it and would like to move one of them to a drive with more storage. I have SQL 2010 on a server with 2 partitions.The database is located on the C:...
View Article