How To Insert A Space After Each Manager Starts.

Jul 20, 2005

hi,
guys
i have query which given below output given below

manager personlevel person name
20851 Howard Wilson1
20852Howard Wilson2
20853Howard Wilson3
20854Howard Wilson4
20855Howard Wilson5
60861Andrew Saxon
60862Andrew Saxon
60863Ian Thompson
60864Ian Thompson
60865Phil Dargan

what i want is after a manager ends i want a null to be inserted for
each of there columns
so that i can distinguish that when a new manager starts

so thatt output looks like this

manager personlevel person name
20851 Howard Wilson1
20852Howard Wilson2
20853Howard Wilson3
20854Howard Wilson4
20855Howard Wilson5
null null null
60861Andrew Saxon
60862Andrew Saxon
60863Ian Thompson
60864Ian Thompson
60865Phil Dargan

Brlliant minds any solution for this..
i know can i loop through the records and do it
and check for a new manager
but i want a better solution ..
give me your ideads folks..

Regards,
Navin Mahindroo

View 3 Replies


ADVERTISEMENT

SQL Server Named Instance Starts Slowly - Error With Resource Manager

Oct 26, 2007

We have two instances of SQL Server 2005 - SP1 installed on one server. The default instance starts very slowly. When looking at the log I can see the delay is due to Resource Manager based upon the following error.

Message
Resource Manager Creation Failed: 0x8004d102
(XACT_E_DUPLICATE_GUID)

What does this mean?

What would cause this to happen?

How do I resolve the problem?


Thanks, Dave

View 7 Replies View Related

Lock Manager Out Of Space

Aug 31, 2007

Hi,

I'm getting an error which I'm pretty sure I can avoid for now, but I'd like to understand the underlying issue.

I'm have SQL CE 3.1 on Win XP and am replicating a reasonably large set of data with SQL Server 2005 using merge replication. The initial replication works fine, and brings the SQL CE database to around 800MB. Subsequent delta syncs are also fine. However, if I re-initialise the subscription, it chugs away for a while, grows the local database to just over 1Gb then errors with the following message:

The lock manager has run out of space for additional locks. This can be caused by large transactions, by large sort operations, or by operations where SQL Server Compact Edition creates temporary tables. You cannot increase the lock space.

I can avoid this issue by either deleteing the .sdf file and recreating the subscription from scratch, or by splitting the publication into smaller sets, and re-intialising each one seperately. Obviously SQL CE uses some sort of temporary or "lock" space to manage the re-initialisation. Is, as the error message suggests, there no way to increase this? How much space is there - ie what is the threshold overwhich I need to split up the update operations into multiple steps.

I'm assuming this is a SQL CE limitation, hence posting this here rather than under the replication forum.

Cheers

View 4 Replies View Related

Giant White Space Shows Up When Viewing In Report Manager Only

May 16, 2006

Hello

I have created a report that works how I want it in the visual studio 2003 designer. I have deployed it to our test box (sql server 2k, reporting services with sp2) and when we preview the report, there is a giant white space between the graph in the report and the matrix object below it. This white space was not in the designer. It only shows when previewing the report. If you print from the report manager, it does not print the white space.

Is there a way to remove it from the report manager when the report is previewed? I am sure users will complain when they see this.

Thanks.

Ben

View 2 Replies View Related

How To INSERT A Space?

Oct 8, 2007

Hi, how does one normally insert a space in a statement like this: INSERT INTO table (column0, column1, column2)
VALUES (getdate(), 'blah', CONVERT(VARCHAR(19), GETDATE(), 120) + 'blahblah')In column2 the output looks like ' 2007-10-08 20:19:08blahblah', but I want it to be like '2007-10-08 20:19:08 blahblah' (two spaces between date and text).Thanks,Chris 

View 5 Replies View Related

How To Generate Insert Statements In SQL Manager?

May 9, 2008

I rememeber they used to have this option to generate data script for the table in SQL 2000, but I can not find it in SQL 2005.
I need to move one table from one database to another, but I need to generate SQL Insert Statements...
 

View 12 Replies View Related

Failed Insert Via Enterprise Manager

Dec 6, 2004

Hey guys..

Trying to insert a row via Enterprise Manager I get "object does not exist" error.. However it works on another server?!?

The table name is aa.aabc .. So i know what the problem is.. it thinks that aa is the owner.. I can insert using query analyzer by using the following syntax: insert into [aa.aabc] ... but it fails using: insert into aa.abc .. for obvious reasons..

I'm guessing it has something to do with the differences in the server config between the 2 servers as to why one server you can insert via enterprise manager and the other you cant..

The collation is different as the ANSI warning and padding in the connection info..

Can anyone else help me fix this problem, so that I can insert using enterprise manager?

Cheers

View 2 Replies View Related

DTS Designer Gives Error When It Starts

Jul 10, 2002

Thanks in advance for any help you may offer.

I have never seen this error before... When I click on DTS to either open an existing package or create a new one I get the following errors: Error in the DLL, DTS Design Error. When I try to create a new DTS it gives me the errors but still opens but I'm missing all of the connection objects except for MS data link and other connection. I had no problems designing and executing the packages from a development box. I'm not even refering to the typical scheduling problems that exist when SQL Agent is configured incorrectly!

View 2 Replies View Related

How To Start A Job When Database Starts In 6.5

Mar 8, 2001

We need to start a job automatically when SQL Server 6.5 automatically starts.
Like adding a user into tempdb.

Is there any clue?

View 1 Replies View Related

Run SQL Job Each Time Agent Starts

Aug 22, 2007

In SQL 2000 you can schedule a job to run each time the agent starts. I don't see that option now in 2005.

Does anyone know what happened to that or how to achieve that. I could do a stored proc with the proc option I guess but why did they remove that functionality or maybe I am not seeing it.

Thanks

View 1 Replies View Related

SQLMail On A Cluster Starts But Then Stops

Nov 11, 1998

I am trying to move SQLMail from a standard SQL 6.5 server to a virtual clustered SQL Server. The exchange profile has been set up and the services are running on a domain login. Exchange is also running as a clustered service which is being used successfully from the standalone SQL Server with SQL Mail.

However, when the SQL Mail service is started on the Clustered SQL Server, the service starts for about 5 seconds and then stops. The logs report that SQL Mail started but no messages are recorded to state that why the service has stopped again.

Any clues anyone please?

View 1 Replies View Related

Query Analyzer Starts Slow

Apr 16, 2006

why query analyzer is starting really slow on my computer?
i wasnt like this before. what can i do to make it run fast as before.

View 5 Replies View Related

Data Starts To Repeat When I Add A Dimension.

Jun 27, 2006

Hello, I€™m creating a cube with Analysis services 2000 and SQLServer 2000 that has the following structure:
The fact table has a primary key and some measures:


Fact_Table

PKFact (the primary key)
Measure 1
Measure 2

And I have some dimensions, but I€™ll put here the one of interest, this dimension has a foreign key to the fact_table, this is because it is really a €œdetail€? of the fact table, the interesting thing here is that this dimension not only has a foreign key to the fact_table, but also is a parent-child dimension:


Dimension_Table

FKFact (the foreign key to the €œPKFact€? field of the fact table)
PKId (The id of the field for the parent-child relationship)
FKParentId (the foreign key to this same table, this is, the parent of the field)
TheLevel (the data€¦)

So, if I create the cube without the Dimension_Table (of course, I have more dimensions), the cube shows the data correctly, but when I include this dimension, the data of the fact_table starts to be repeated once for each row in the dimension table (once for each row that has the relation PKFact €“ FKFact of course), Somebody knows how I can avoid this data being repeated? I€™ve tried a lot of things but none works.. Please help!!

Thanks in advance.
Odin_Dark@yahoo.com.mx

View 1 Replies View Related

Query To See If An Int Field Starts With A Certain Number

Nov 3, 2006

How would I write a query on a table containing a column of ints, where I want to retrieve the rows where that int value starts with a number? I know that you can do this with strings by using "....WHERE thisfield LIKE ('123%')", but if 'thisfield' is an int, how would I do this? Thanks!

View 3 Replies View Related

SSIS - When A Packet1 Starts Packet2

Sep 12, 2007



Hi,

What happensi if packet2 is already running, and at the same time packet1 starts packet2?

I'm just curious

Thank you.

View 1 Replies View Related

SQL Server Service Always Starts Automatically

May 2, 2008



I have a laptop with vista and sql 2005. When i start my computer, after it boots up and is ready to go, I look in the task manager at the process tab. Some sort of SQL Server component is running and eating up about 50k's worth of memory. What is it and how do set either Vista or SQL Server to not start whatever this is unless I do it manually(oh yeah...how would I turn it on?)and what are the ramifications of not having it start up when i start my laptop?

I know it is a rather rambling question, but its the best I can describe it. Thanks in advance for your help!

View 4 Replies View Related

SQL Server Service Starts Then Stops

Mar 30, 2008

I have just installed SQL Server 2005. The machine had an expired version of SQL Express on it which I removed. Now when i go to open the Management Studio it says it can't connect. When I check the service, it is set to automatic using the local account but is not running. When I start it, it throws an error stating that it started and then stopped. The first error record in the log file states:

Server TCP provider failed to listen on [ 'any' <ipv4> 1433]. Tcp port is already in use.

Could this be causing the problem? How do I check to see what is using 1433? In general, what the heck did I do wrong during the install? One article said something about the new installation thinking it was still the expired version. Could there be something left in the registry from the old version of Express causing this?

Thanks in advance for the help

View 20 Replies View Related

SQL Server Agent Starts And Then Stops

Jan 13, 2007



SQL Server 2005 installed on Windows Vista Ultimate

When I try to start the agent, it return with the message that the service started and then stopped. On investigation I found that the Windows Event Log service won't start, returning the error:

"error 4201: the instance name passed was not recognized as valid by a WMI
data provider"


(I have posted this on Windows Vista forums but had no response).


Thanks for your help

View 2 Replies View Related

Full Text Query Starts Slow

May 2, 2006

I've created a FullTextCatalog on one of my Databases and added a full text index on one of my text columns.

The first time I run a query against the data it takes roughly 40-45 seconds to return data. After that it blazes and runs in under a second. If I don't query it for 20-30 minutes, it will take 40-45 seconds again and then fly until the next break.

Is there a configuration setting somewhere that I'm missing on this? Currently the Index is only about 5MB so it should take that long to read in when I'm querying it.

I don't think it has anything to do with size because the actual return can contain anywhere from 10-80K rows and the speed is about the same.

I'm using Standard edition on a 2003 Standard Server if that plays into the potential problem at all. We're currently downloading and installing the new Service Pack to see if that fixes it, but for some reason I'm not holding my breath. I'm assuming that there is something we need to change in the configuration.

Let me know if I'm missing any pertinent information. Thanks.

View 2 Replies View Related

SQL Server 2012 :: Check To See If Job Has Finished Before Job Starts?

Jun 23, 2015

I have a job I want to run everyday but before this job starts and I want to check and see if another job has completed before I start this job. i would like to do this in the job steps in SSMS. step 1 is job 'xxxxxxx' running if no go to step 2 if yes exit

View 3 Replies View Related

The Identifier That Starts With...is Too Long. Maximum Length Is 128

Jun 23, 2006

Hi, i'm trying to run a stored procedure:"EXECUTE dbname.dbo.spGid 'KFT', '0000000011,0000000012', 'merch,DSMT','2006-02-01 00:00:00', '2006-02-28 00:00:00'"and gives me this error:The identifier that starts with"EXECUTE dbname.dbo.spGid 'KFT', '0000000011,0000000012', 'merch,DSMT','2006-02-01 00:00:00', '2006-02-28 00:00:00'"is too long. Maximum length is 128.Anyone could help?

View 1 Replies View Related

Service Starts Then Stops-Reporting Services

May 3, 2007

Hello,



I tried deploying a Report Model Project and received an error:




"TITLE: Microsoft Semantic Model Designer
------------------------------

A connection could not be made to the report server http://localhost/ReportServer.

------------------------------
ADDITIONAL INFORMATION:

The request failed with HTTP status 405: Method not allowed. (Microsoft.ReportingServices.SemanticQueryDesign)

------------------------------


When I checked services I realised that Reporting Services wasn't started. I tried starting it and received a message:



"The Sql Server Reporting Services (MSSQLServer) started and then stopped. Some services stop automatically if they have no work to do.........."



I also tried to start the service from Configure Report Server and received an error:



"System.ServiceProcess.TimeoutException: Time out has expired and the operation has not been completed.
at System.ServiceProcess.ServiceController.WaitForStatus(ServiceControllerStatus desiredStatus, TimeSpan timeout)
at ReportServicesConfigUI.Panels.ServerInformationPanel.StartStopServiceTask(Boolean start)"





Any idea why this is happening? Should I install SP2?







View 3 Replies View Related

How To Replace Empty Space Or White Space In A String In A Stored Procedure

Nov 14, 2007

Hi,
 I am trying to do this:
UPDATE Users SET  uniqueurl = replaceAllEmptySpacesInUniqueURL('uniqueurl')
What would be the syntax.
Any help appreciated.
Thanks
 

View 1 Replies View Related

Mutilple Space Gets Converted To Single Space In Report Viewer Control

Feb 23, 2007

I am generating a Report from Sql Data Source in Sql Server 2005 and viewing the Report in Report viewer control of Visual Studio 2005.
The data in the Data Source contains string with multiple spaces (for example €œ Test String €œ) but when they get rendered in Report viewer control, multiple spaces gets converted to single space €? Test String €œ.

I tried following solutions
1) Replacing spaces with €œ&nbsp;€?
2) Inserting <pre> tag before the string and </pre> tag after the string (Also tried &lt;Pre&gt; instead of <pre>)

But in all the cases result is same. The Report Viewer control is showing €œ&nbsp€? instead of space and €œ<Pre>€? tag instead of preserving spaces.

Please provide me a solution so that spaces can be preserved in Report Viewer.

View 1 Replies View Related

Transact SQL :: How To Find Space Available Or Send Space Alerts In Percentage

Nov 26, 2015

I am using the below script to get space alerts  and now i am interested in sending alerts  if for any drive space available is Less than 10% or 15%.. how to convert beelow code to find in % 

Declare @Drives Varchar(20)
DECLARE @Spaces Varchar(50)
DECLARE @availableSpace FLOAT
DECLARE @alertMessage Varchar(4000)
DECLARE @RecipientsList  VARCHAR(4000);
CREATE TABLE #tbldiskSpace

[Code] ....

View 3 Replies View Related

SQL Server Column Name Starts With A Number. C# Throws Error.

Mar 21, 2006

I have a table in sql server 2000 which has a column whose name starts with a number("2ndName").I have a c# code which updates the table by filling a Dataset.When I issue an update, it throws the following error:-"Incorrect Syntax near 2"Query I use to build the adapter is "SELECT id, Name, [2ndName] FROM MyTBL WHERE 1 = 3" and the statement issued to update is "objAdapter.Update(objDSDB, "MyTBL")" when it throws the error "Incorrect Syntax near 2".Any help to resolve this is appreciated.Thanks in advance.Jai

View 3 Replies View Related

Analysis :: Range Function - How To Get Last 60 Days Before A Month Starts

Apr 20, 2015

I am trying to get the last 60 days before a month starts. I have a set that is returned from the query below :

SELECT
   non empty
   [Measures].[TRANSACTIONS Count] on 0,
   non empty ([TRANSACTIONS].[Days].[Days],                                                          
                                     [TRANSACTIONS].[Transaction Month].[Transaction Month])  on 1 from [cube]   

I can get the cummulative count of last 60 days before month 2 by hardcoding the day of transaction of start of month like below :

WITH MEMBER
 [Measures].[Cumm Account Count]
AS
(
    AGGREGATE( [TRANSACTIONS].[Days].CurrentMember:NULL ,[Measures].[TRANSACTIONS Count])
)

 SELECT
   non empty [Measures].[Cumm Account Count] on 0,
   non empty [TRANSACTIONS].[Days].&[3]:[TRANSACTIONS].[Days].&[3].lead(60) on 1 from  [cube];
 
and for subsequent months by using the dates that the following month starts. How can I achieve the above result without having to use the day numbers, I tried to use the tail function (to get the months and star date) but it wont work because the range function  accepts members only...

View 4 Replies View Related

Trans Log-&>space Allocated 27GB, Space Used 100MB

Mar 2, 2005

Hi.. I was doing a good maintenance on my DB and my trans log LDF keep growing until 30GB but my DB data file MDF is only 2GB. I found the two following method to reduce my log size.

Method 1: I used veritas to backup log file with truncate
Method 2: I used the shrink database option in Enterprises manager to shrink it (file chosen=log , use default option)

After doing that, I found my LDF log file is still about the same size=27GB but when I see clearly, from the shrink database windows, the log spaced used reduced to only 100MB, the allocation log space is still 27GB. Why? How to make the LDF smaller to be the around the same size as the space used 100MB?

View 1 Replies View Related

Double Space Replaced With Single Space By Dbms ??!

Jul 20, 2005

This is driving me bananas. Can't find any info on this anywhere....SQL 2000 seems to replace double space with a single space when I seta varchar field to " " (2spaces), it only stores " " (1space). Whyon earth would microsoft do this? If I save 2 spaces - I WANT TO SEE2 SPACES!!!!Can anyone help? Is this a database setting? Is this due to usingvarchar?Any help appreciated.Colin Hale

View 2 Replies View Related

Transact SQL :: How To Update ItemOrder With Ascending Numbers Starts With 1 For Child Items

Jul 23, 2015

I have a below table,

DECLARE @TBL TABLE (ItemId INT IDENTITY(1,1), ItemName NVARCHAR(20), ParentItemName NVARCHAR(20), ItemOrder INT, ReportId INT)
INSERT INTO @TBL (ItemName, ParentItemName, ItemOrder, ReportId)
VALUES('Item1', NULL, 1, 5),('Item1-Child1', 'Item1', 0, 5),('Item1-Child2', 'Item1', 0, 5),('Item2', NULL, 2, 5),
('Item11', NULL, 1, 6),('Item12', NULL, 2, 6),('Item12-Child1', 'Item12', 0, 6),('Item13', NULL, 3, 6)
SELECT * FROM @TBL

Here,
1. for all ReportId, child items's ItemOrder  = 0
2. example, for ReportId = 5, both child items ("Item1-Child1" & "Item1-Child1") of parent "Item1" has ItemOrder = 0

I need to,
1. update all child items with ascending numbers starts with 1 against each parent and each report.
2. for each different parent or different report, order by should starts with 1 again.

View 2 Replies View Related

Problem With Space Allocated For Transaction Log Space

Dec 5, 2001

Hello,

Somebody know how to reduce the space allocated for the transaction log space for my SQL_DB ?

3700 MB allocated but only 100 MB used and 3600 MB are free !

Transaction log properties :
Automatically grow file are filled
file growth by percent = 5%
maximum file size - restrict filegrowth = 3700 MB (we can't reduce it !)

Thank you for your precious help !
Khaix from Brussel.

View 1 Replies View Related

Suppress Multiple Space To Single Space..

Nov 14, 2006

How do we suppress multiple spaces to a single space in T-SQL

E.G.

Field: FullName

e.g.

WOMENS HEALTH RIVER VALLEY
JOHN FAMILY MED GROUP
HERSH STWEART P.
PARK HEIGHTS MEDICAL CENTER
KOPP WHITEFIELD E

The o/p wanted is

HERSH STWEART P.



Thank you.


View 3 Replies View Related

Merge Repliction - Run Stored Procedure When Merge Agent Starts

Jul 23, 2005

I have database on SQL Server 2000 set up with a merge publication.This publication is configured with a number of dynamic filters toreduce the amount of data sent to each client. Each client has ananonymous pull subscription. The merge process can be triggered by thewindows sync manager and my application.To improve performance I have created some helper tables to hold themapping between user login and primary keys of selected entities.For the replicated data to be correct the contents of the helper tablesneeds to be up to date.I need to fire off a stored procedure on the publisher beforereplication starts to verify that this data is up to date. I can notsee any documented way of doing this however I have been experimentingwith some unorthodox systems.Firstly has anyone any ideas?I have been considering adding a trigger to some of the tables used bythe Microsoft replication code - yes I know this is very nasty.My problems arise because executing this stored procedure will causesome data to be updated. In updating data we could create a newgeneration in the database. I must therefore run my stored procedurebefore any the Microsoft code makes any generation checks / updates.Anyone done anything similar, Anyone have any better ideas?Any comments would be gratefully received.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved