I am using the following SQL code for inserting multiple rows of data in a table. The data is passed to the stored procedure using an XML variable :
INSERT INTO MyTable
SELECT SampleTime = T.Item.value('SampleTime[1]', 'datetime'),
Volume1 = T.Item.value('Volume1[1]', 'float'),
Volume2 = T.Item.value('Volume2[1]',...
Possible Duplicate:
How to backup SQL Server Agent jobs?
Hi,I want to backup my sql server 2005 Agent jobs to another server,
How can I backup and restore SQL Server 2005 Agent job schedules?
...
How do I get the desired result in T-SQL like ....
like
I have a Record like
UseriD InDate outDate
1 3/12/2010 3/12/2010
1 3/12/2010 3/13/2010
1 3/19/2010 3/30/2010
2 3/2/2010 3/3/2010
2 3/3/2010 3/4/2010
2 3/4/2010 3/29/2010
3 2/2/2010 2/28/2010
so...
Hi
I have this SP
USE [TestDB]
GO
/****** Object: StoredProcedure [dbo].[sp_test] Script Date: 06/12/2010 11:47:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_test]
@id uniqueidentifier
AS
BEGIN
select * from TestTbl where ProductId= @id
END
I then went to the SP with ms sql 20...
I work for a non-profit organization where we send volunteers to aided schools everyday. I am creating a site to display this info and am using SQL server express. I want some help regarding a query so here's my first post
We have 15 volunteers currently who will go to 4 different schools to teach. Here are some conditions:
We have to...
I have this procedure
CREATE Proc [dbo].Salse_Ditail
-- Add the parameters for the stored procedure here
@Report_Form varchar(1) ,
@DateFrom datetime ,
@DateTo datetime ,
@COMPANYID varchar(3),
@All varchar(1) ,
@All1 varchar(1) ,
@All2 varchar(1) ,
@All3 varchar(1) ,
@...
what the IIS featuer need to install in pc have windows 7 home to work sql server 2005 (32 bit) ssrs not work
i change all windows featuer in the PC
what i need to install in pc
...
Hi,
My Linked server is setup correctly , I am able to perform below query.
INSERT INTO [RemoteServer].[Table]
SELECT * FROM [LocalServer].[Table]
However when I do the same thing within transaction
BEGIN TRAN
INSERT INTO [RemoteServer].[Table]
SELECT * FROM [LocalServer].[Table]
COMMIT TRAN
I get Errors like
O...
How to make an SQL query if there are 30 records in table and I want to pick rows from 12 to 20 where 12 and 20 are row numbers not Ids.
Ids Code
5 ABC
6 SDF
8 WSA
10 FSD
15 IOP
.
.
.
.
80 AWS
...
The intention of following (simplified) code fragment is to return one random row.
Unfortunatly, when we run this fragment in the query analyzer, it returns between zero and three results.
As our input table consists of exactly 5 rows with unique ID's and as we perform a select on this table where ID equals a random number, we are st...
Is the database transaction log automatically truncated after we create a backup and the DB is in full recovery mode? Or do we need to make 2 different backups, let's say 1 in full recovery mode and a different one for the log file.
...
It is possible to extract all tables and rows of each table with one query or software in microsoft sql server?
thanks
...
Hi,
I have a SqlServer2005 table "Group" similar to the following:
Id (PK, int)
Name (varchar(50))
ParentId (int)
where ParentId refers to another Id in the Group table. This is used to model hierarchical groups such as:
Group 1 (id = 1, parentid = null)
+--Group 2 (id = 2, parentid = 1)
+--Group 3 (id = 3, parentid = 1)
...
Does anybody have any suggestions on how to improve the following statements:
insert into ProductInfo with (rowlock) (orderid, productname)
select 66673, FileInfoId
from ProductInfo with (nolock) where
ProductId = 66671 and
IsEligableForCopy = 1 and
ProductFileInfoId >= 2768395941 and
...
Following is the script of table. Accessing data from this table is too slow.
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Emails](
[id] [int] IDENTITY(1,1) NOT NULL,
[datecreated] [datetime] NULL CONSTRAINT [DF_Emails_datecreated]
DEFAULT (getdate()),
[UID] [nvarchar](250) COLLATE Latin1_Ge...
Hi,
We have sql 2005 32 bit running on win 2003 64 bit box containing 5 gb RAM.
Is there a way that sql starts using more than 2 gb? some switch or some setting in sql server?
When I go to my sql server properties and try to increase the max server memory to > 2GB, it reverts back to old 2 GB.
Thanks,
Anand
Correction - Guys: I nev...
I installed SQL Server 2005 express on two computers. I installed SQL Server Management Studio Express on both computers. I ran each instance of Management Studio and connected to SQL Server using Windows authentication (one computer's connection example: "A-63A9D4D7E7834\SQLEXPRESS"). I created a database named "test1" and created a ...
Very complex query been trying to construct it for few days with more real success.
I'm using SQL-SERVER 2005 Standard
What i need is :
5 CampaignVariants from Campaigns whereas 2 are with the largest PPU number set and 3 are random.
Next condition is that CampaignDailyBudget and CampaignTotalBudget are below what is set in Campaign ...
Using Reporting Services in SQL Server 2005: Is there a way to count only records that are not null; similar to "COUNTA" in Excel? I would think this would be very simple process, but nothing I have tried has worked. For example, I have tried using the following expression for "Completed", which is one column I am trying to count:
=count...
Is there a list anywhere that lists all the variables I can use in file names for report subscriptions from within SQL Server Management Studio? I currently use @timestamp in my file names, but would like to use other options or even remove parts of the time stamp (for example, just use the date, not the time).
...