1
vote
1answer
48 views

inserting into temporary table

In first step i am creating structure of the table, Second step i am inserting data from one table into the 1st table, third step also i am inserting data from another table to first table, fourth ...
0
votes
1answer
22 views

How to create multiple REMOTE SQL servers easily?

I want to create 4-5 REMOTE SQL servers for a learning purposes. I want to avoid all installation, admin, troubleshooting tasks. I want all this FOR FREE. How do I do this ? The purpose behind ...
0
votes
1answer
35 views

SQL Server identity column skipping ids on insert - no errors detected in logs

I am using SQL Server 2008 to maintain a database where I have an userAcccounts table where the user details are stored while registering on the website. The userID column is an integer with identity ...
0
votes
3answers
55 views

How to create dynamic SQL querries inside CURSOR

I have to dynamically create a query inside cursor DECLARE @id VARCHAR(10) declare @loc varchar(25) set @loc = '/MainItem/SubItem'; declare @querry varchar(max) DECLARE myCursor CURSOR LOCAL ...
2
votes
0answers
21 views

Maximum memory setting in Sql Server [migrated]

Firstly, apologies if this is not the right forum for the question. I'm running Sql Server 2008 and a web based application, on a single dedicated server, with only 2Gb of memory available. As is ...
0
votes
0answers
33 views

Manipulating Data in Joins

Diagram: Query for join: SELECT DISTINCT c.CustomerID, c.FirstName , sh.DueDate, p.ProductID,p.ListPrice FROM SalesLT.Customer c INNER JOIN SalesLT.SalesOrderHeader sh ON c.CustomerID = ...
0
votes
0answers
39 views

Why is error 22051 from sp_send_dbmail not caught by a CATCH block?

So I have a sql stored proc: CREATE PROC sp_SendConfirmedPurchasesEMail ( @RecID INT ) AS ... msdb.dbo.sp_send_dbmail @profile_name = @ProfileName, ...
-1
votes
0answers
33 views

Deleted a file accidentally, I need to remove it's entry, I don't need it's data because it contains only indexes [migrated]

I have a C# program to deal with a big database, I need the databas not to be the buttle-nick of my program, in the database, to increase performance, I have created a filegroup with a single data ...
-1
votes
1answer
40 views

Searching an MS SQL database for a specific word [duplicate]

I've been scouring online for an example of how to do this but haven't found anything at all. All the queries I've found assume you know what table you want to search. I'm looking for a SQL query to ...
0
votes
0answers
38 views

Find datewise records by status for multiple records within same day

I am using sql server 2008 R2. I am having a table TblStatusMaster that have (Id, StatusName). Id is primary-key that is auto-increment and statusName can be in "Active, InActive, Screening, ...
1
vote
1answer
24 views

Is it possible to make a script for certain number of rows in Sql Server 2008?

I have a table with 100k+ rows of data. Is it possible to generate script (inserts) using MSSQL Server 2008 for only last 1000 rows of data? e.g. Tasks > Generate Scripts... is making inserts for all ...
2
votes
1answer
39 views

Not able to get the stored procedure's result in variable in sql server? [duplicate]

i have a Hierarchy of stored procedures calling one in another as below: 1 2 3 Now what i am doing is: first of all i am showing the 1st level sp . Create proc proc_test3 ( @Id ...
0
votes
1answer
23 views

Sql Server Value Method Returning only one value not multiple

I am trying to return multiple element values into rows and I am running into the below issue of it not returning all instances in rows, I have isolated the issue down to a singleton problem. I have ...
0
votes
2answers
32 views

How do I insert a default value as part of a SQL Server View definition?

I have a number of different views which use the same underlying table, but each uses a different default value for the FK. So for my attempted code: ALTER VIEW [dbo].[vwTest] AS SELECT Id, ...
1
vote
1answer
12 views

SQL Server : returning the related xml with value, nodes methods

I have a the below sample XML schema that I am querying from in SQL Server 2012. I have a table with a XML column. I want to include the snippet of xml when each row is returned. Below is the ...

1 2 3 4 5 41
15 30 50 per page