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..
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.
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.
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.
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
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...
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?
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!
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.
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.
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!!
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!
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!
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?
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).
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.
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
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?
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?
Hi, I am trying to do this: UPDATE Users SET uniqueurl = replaceAllEmptySpacesInUniqueURL('uniqueurl') What would be the syntax. Any help appreciated. Thanks
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 €œ €? 2) Inserting <pre> tag before the string and </pre> tag after the string (Also tried <Pre> instead of <pre>)
But in all the cases result is same. The Report Viewer control is showing €œ €? instead of space and €œ<Pre>€? tag instead of preserving spaces.
Please provide me a solution so that spaces can be preserved in Report Viewer.
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 %Â
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
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...
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?
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
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.
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.