Answer Questions
a23rd complicated query
Hi Guys I Have not been able to solve this problem from quiete a while now. I am using sql server 2005. I have got a table which contains these columns - start date, end date and volumes if the month in the start date is same as that of end date, the volume remains same, else if the months in the two dates are different, then i have to distribute the volume in such a way that some part will go in the first month and the rest in the other month.. i have to somehow calculate (or prorate) the volume according to the no of days in each month I have to perform a query on this table so that I can group the volumes for different months and different years. Here is the sample data... Service Start Servi ...Show All
YvesR Delayed Send
Hi My application sends notifications by creating a once-off subcription, then raising an event in Notification Services. This causes the notification to be issued immediately. I want to be able to create a notification that is not sent until some time in the future. I'm not sure if I should be looking at ScheduledRules or EventRules. Has anyone done anything similar Thanks Robert. Event driven rules produce notifications as events come into the notification application. Scheduled rules create notifications according to the schedule defined in the subscription. Take a look at the ScheduleRecurrence and ScheduleStart properties of the Subscription class. HTH... Joe ...Show All
sandeepam positive and negative signs
i have account_entries table which has the following fields: debit_or_credit entry_amount and I want when inserting every field to check if the inserted row was assigned to (D)ebit and (C)redit it should change the entry_amount accoridanly. maybe something like trigger plz help... But don't you actually want: create table stuff ( entry_amount decimal(10,2), debit_or_credit char(1), effective_value as (case when debit_or_credit = 'D' then entry_amount else -entry_amount end) ); go insert into stuff values (50,'D'); insert into stuff values (50,'C'); select * from stuff; /* Results */ entry_amount debit_or_credit effective_value --------------- --------------- --------------- 50.00 D ...Show All
textman Deadlock at trigger
a trigger need to insert or update record at the other table in high traffic environments however, the deadlock happens; ie, a trigger running twice at the same time want to need to insert record at the table. i trid to change isolation as SERIALIZABLE or REPEATABLE , but i cannot solve the problem. i guess the "while loop" affects the result because i try to cancel the loop and execute smoothly. How to solve the deadlock Thx ----------------------------- i used the following commands to change isolation level: SET TRANSACTION ISOLATION LEVEL SERIALIZABLE begin transaction commit transaction ----------------------------- the code are as follows: declare setskuCursor cursor local static for select item, qua ...Show All
DKB Team Foundation server SP1 installation issue
i have downloaded team foundation server SP1 from the internet VS80sp1-KB926738-X86-ENU.exe and tried to insytall on my server but a window keeps appearing to me saying " The upgrade patch cannot be installed by the windows installer service because the program to be upgraded ma be missing " before that i had installed : a team foundation server beta SP1 " VS80sp1-KB922996-X86-Beta-ENU.exe" Visual studio 2005 SP1 "VS80sp1-KB918525-X86-Beta-ENU.exe" and it was sucessfully downloaded and now i want to upgrade these beta releases to SP1 but this issue stops mee anyone knows why this window keeps appearing Dear i have uninstalled the ...Show All
learnerplates SQL 2005 v9.0.2047 (SP1) - The query processor could not produce a query plan
Hi Everyone: *Before* I actually call up Microsoft SQL Customer Support Services and ask them, I wanted to ping other people to see if you have ever ran into this exact error "Internal Query Processor Error: The query processor could not produce a query plan. For more information, contact Customer Support Services." I would have searched the forums myself, but at this moment in time, search is broken :( If anyone has run into this error before, what conditions would exist that this could happen That is, if I can sniff this out with suggestions from the community, I would be happy to do so. It is an oddity because if I alter a couple subqueries in the where clause [ i.e., where tab.Col = (select val from tab2 wh ...Show All
Johnny Raved HELP! Cannot pass GUID's through variables?
I have a project that uses GUID's througout and I'm completely stumped. 1) I create a "batch" GUID to batch the records I'm about to process. 2) I call a web service on a remote machine, and reserve the batch records by inserting the batch GUID into a string ---works fine 3)I call another web service that returns the rows that I just reserved as XML objects and insert into a string variable 4)I need to use the "batch"GUID variable which is typed as a string (DT_WSTR) as an added column so in a Data Flow Task I do the following: a) use the XML string variable as the source of a XML Source Task -- works (now that I'm passing custom objects and not a dataset -- curious as to why I can't consume a dataset but thats a different question) This ...Show All
B.Huard An internal error occured on the report server (rsInternalError)
hi, I have enabled custom authorization in SQL server 2005 reporting services. If i try to view the reports thru report manager by using the url http://localhost/reports then i'm getting the error message as "An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help Get Online Help The event log file is full" If i try to view the reports by using reportserver url http://localhost/reportserver then its working fine. Please help me in resolving this issue. The log file is as follows <Header> <Product>Microsoft SQL Server Reporting Services Version 9.00.1399.00</Product> <Locale>en-US< ...Show All
Japu Count rows imported by bulk insert
I have a stored procedure which will run automatically. I've got try...catch code in the procedure, but I found a bug with the code where if there are any import errors, it doesn't recognize that that there was an error and it runs through the try code as through there was no problems. (I reported the bug). I added some code using @@rowcount to check if there were rows imported, and if not, it moves the data file to a error folder so I know there was a problem with the import. But this only checks if at least one row was imported, not if all the rows in the datafile have been imported. (i.e. if the first row imported correctly, and the second did not, it still sees it as successful). The problem is some of the data files hav ...Show All
anilpatel32 Need help in starting out
Hi Everyone: I am just starting out on SSIS, and have the following business challenge that I would like to solve utilizing SSIS. There are two SQL Server data stores, one would be the source, and other would be the destination. I need to grab some data from store 1, and insert that data into store 2. Here are my questions: 1) Before i move the data to store 2, i have to check some criterias by callin some sps, and then the end result would need to be inserted into the destination database. Can anyone tell me how would i setup the control flow, to accomodate that in SSIS 2) Can someone email me a sample package that does something similar I just need a starting point so i can build the design of my package. Basically i need to ...Show All
WolfgangEngel Transfer database from SQL Server 2000 / 7.0 to SQL Server 2005 Express Edition
I want to transfer a database located on a older SQL server version mentioned above to an SQL 2005 Express Edition. On a SQL Server 2005 Standard Edition, I did this with the Copy database wizard. But when I try to specify an Express Edition as the destination server I get message telling me that no sql agent is running on the destination server and here I stand What can I do in in this case Thanks for any help Armin Satya SKJ wrote: If not you can either perform a BACKUP & RESTORE statement to get that backup, also make sure to transfer the logins from that server as the logins will be mismatched once you have the copy on destination server. Is it possible to transfer a datab ...Show All
Jamie Thomson Dimensions, Table Joins, and Missing Elements
I have situation where I'm using a element in SQL table which down the hierarchy. Such as: Table1 primary key | Table 2 foreign key primary key | Table 3 foreign key The column I using for a dimension is in table 3. Now the problem is that not every row in table 2 is going need to have data in table 3. In other words, all of table 2 primary keys are not necessarily going to have a reference foreign key in Table 3. Now that is all correct and is the nature of the project I'm working on. In regular SQL, select statements work just fine... meaning that selecting an element in Table 3 would display that element and also make Table 3 act as a filter via an INNER JOIN. Now the problem is that AS ...Show All
IlCapo Call an EXE from an SSIS package?
Hi. Is it possible to call an executable that resides on another server from an SSIS package If that's not possible, is it possible to call an EXE that resides on the SQL Server box itself Thank you Thanks, Phil. That's what I needed. arc_dev wrote: Hi. Is it possible to call an executable that resides on another server from an SSIS package If that's not possible, is it possible to call an EXE that resides on the SQL Server box itself Thank you Look at the Execute Process task in the control flow for locally located .exe's. ...Show All
Leahx Query Performance
How to monitor the Query performance for the AS2005 I am use the Performance Monitor to monitor it, but there have too much counters for the AS2005, such as MSAS 2005 MDX, MSAS 2005 Thread, MSAS Store Engine Query.... Which counters are the best to use for monitor the query performance. For getting some ideas on how to increase query performace you should definitely take a look at the recently released Performance Guide. You have several ways to investigate query and overall server performance: 1. Run SQL Server profiler and capture all MDX-related and progress report events that happen during query execution. For that you should only have a single query running on your server so that other queries wouldnt influence the resul ...Show All
Sam Jost Annualizing Measures
In the financial services world, a common requirement is to annualized a value. We've made several attempts at this. The challenge comes when using a standard Date hierarchy (Year, Quarter, Month, Date). We need to annualized a measure based on a running total of the last 6 months. We also need to take into account the early dates of the warehouse where X Months might not be available by multiplying the aggregate it by Y divided by the count of non-empty members. This seems to work for this part of the problem: Create Member CurrentCube.[Measures].[Rolling 6m Contribution] AS Case When COUNT(LASTPERIODS(6, [Date].[Month].CurrentMember), EXCLUDEEMPTY) + 1 < 6 Then Aggregate(LASTPERIODS ( 6, [Date].[Month].CurrentMember),[Me ...Show All
