Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. memdiscount

    COM + objects are not being destroyed in Win 2003

    Thanks, Actually, it means in this solution we are supposed to change all the methods in each components, which is similar to the same solution which I mentioned in my post. I am looking for some fix which will aviod that changes in components we have more than 100 components which may have...
  2. memdiscount

    COM + objects are not being destroyed in Win 2003

    Hi; Thanks for the reply, Where and how I am supposed to add this line. Thanks Essa Mughal
  3. memdiscount

    COM + objects are not being destroyed in Win 2003

    Problem: Recently, we found the issue of Dot Net COM+ components not destroyed properly. Symptom Objects got created but not destroyed after use. Object = Nothing is not destroying the object in some scenarios. This could lead to the hanging of the component or the server and a reboot...
  4. memdiscount

    Full transaction log

    Hello; There are couple of things you can do: 1- You need to set the database properties to set the file growth of transaction log by 10 % automatically. Which is called Autogrowth of the file, means when there is a need to increase the file size due to heavy processing then the size will be...
  5. memdiscount

    How to identify a field in a cursor

    You are missing this part FETCH NEXT FROM CURSOR1 INTO @variable01, @variables02... You need to declare variables for each field to save each value into those variables. Just select those values which you want to use in a loop and define variables for each field. See this example for the...
  6. memdiscount

    coalesce compared to isnull

    It means if you pass 2 or more than 2 arguments (which is only possible with COALESCE ) then it will return you first non-null value from passed arguments: ******************************** For Example: Select COALESCE ('ABC', Null, 'XYZ') it will return you 'ABC' which is the first non-null...
  7. memdiscount

    Using output parameters

    The Error is not due to Output parameter, error shows that it is with the query.... --SUM UP the volume for each currency(FirstCcy) Select @Volume1 AS CcyVolume, @FirstCcy AS Ccy Into #A GROUP BY @FirstCcy Group by works on table, you are not selecting anything from any table, so you...
  8. memdiscount

    SQL 2000 Server Agent Job Migration

    Hi; About sysjobhistory, you will not get the history, those will be brand new jobs for that new server.... I won't be worried about history on new server. The rest of the items will be added when you run that script to create jobs.... Try for one job first and then for the rest of the...
  9. memdiscount

    SQL 2000 Server Agent Job Migration

    Hi; 1- Create script of all the jobs in one file, or up to if you want to do one by one then create one file for each job 2- Script has server name, find replace server name with your new server name carefully and make sure you must have proper users as well in new servers. 3- Run the script...
  10. memdiscount

    Create a stored procedure with a select inside

    Becuase the hardest part must have resolved by you easily........ Nice to know it worked for you. Thanks
  11. memdiscount

    Testing SQL Timeout

    Hi; I don't think so, it is not possible in stored procedure. However, timeout actually deals with connections, so if you are calling stored procedure then there is a connection timeout property of command object in VB.NET or C# , you can increase your connection timeout when you call that...
  12. memdiscount

    Create a stored procedure with a select inside

    Hi; This join should work, try and let us know. Assuming you have relationship in two tables with id columns if not then change join to username. ************************* CREATE PROCEDURE [dbo].[UserIDGet1] -- Add the parameters for the stored procedure here @username...
  13. memdiscount

    Filter object types

    This is much cleaner... **************************** SELECT DISTINCT Cast( a.name as varchar(50) ) AS 'Object Name' , CASE WHEN a.type = 'U' THEN 'Table' WHEN a.type = 'P' THEN 'Stored Procedure' WHEN a.type = 'V' THEN 'View' WHEN a.type = 'FN' OR a.type = 'IF' OR...
  14. memdiscount

    Filter object types

    Hi; These are the definition of these types: C = CHECK constraint D = Default or DEFAULT constraint F = FOREIGN KEY constraint L = Log FN = Scalar function IF = Inlined table-function P = Stored procedure PK = PRIMARY KEY constraint (type is K) RF = Replication filter stored procedure S =...
  15. memdiscount

    How can I select data with input date and data with 1 month previous?

    Hi ; Thanks SQLSiter for explaining my code. snoopy80 you can use left join in the above query. ***************************** Select i.Item , Isnull(Sum(Qty),0) as CurrentQty , Max(A.LastMonthQty) from item i left Join ( Select Item, Isnull(Sum(Qty),0) as...
  16. memdiscount

    How can I select data with input date and data with 1 month previous?

    I like the first solution as well, Thanks Borissov. However, it is only for input date, you can change it to support date ranges. Thanks
  17. memdiscount

    How can I select data with input date and data with 1 month previous?

    Hi; I have created your data, here and see the query. -- crate table Create table Item (Item varchar(20), itemdate datetime, qty int) -- insert data Insert into Item Select 'AAA' , '5/1/08' , 10 union all Select 'AAA' , '5/15/08' , 20 union all Select 'AAA'...
  18. memdiscount

    Subquery in where clause returning more than 1 row

    Hi; You don't have to use sub query here. You can use like this: Select 0, m.LINK from MNAMES m Left Join GEOBASE g on g.LINK = m.LINK Left Join PHONES p on m.LINK = p.LINK Left Join Vehicles v on m.LINK = v.OWNER Where @FNAME = '-1' OR...
  19. memdiscount

    Select * sysjobs

    You will find it in System databases - > msdb - > tables - > system tables Thanks
  20. memdiscount

    Take only Seconds from DateTime column

    Hi; Just for your reference, you can play with datepart function as well to make get your required part of the datetime: select datepart(yy, '1900-01-01 13:01:45.002') select datepart(m, '1900-01-01 13:01:45.002') select datepart(dd, '1900-01-01 13:01:45.002') select datepart(hh, '1900-01-01...

Part and Inventory Search

Back
Top