Quantcast
Channel: Forum Getting started with SQL Server
Browsing all 7129 articles
Browse latest View live

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 Article


I 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 Article


Is 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 Article

Nightly 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 Article

Extract 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 Article


Filtering 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 Article

Importing 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 Article

Logging

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 Article


Replace 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 Article


Delete 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 Article

Removal 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 Article

sql fail to install

please help meID: 50000                                             Source:setup.rll        TITLE: SQL Server Setup failure. ------------------------------SQL Server Setup has encountered the following...

View Article

Access 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 Article

Pivoting a Query

I have a query with the follow results...

View Article


Image may be NSFW.
Clik here to view.

Connect 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 Article

regarding sqlserver

Hi,i have a tableid     value1       11        22        1i need output like thisid   value1     1,22      1

View Article


Need 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 Article

I 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 Article

Moving 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
Browsing all 7129 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>