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 SkipVought 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: *

  • Users: salma
  • Order by date
  1. salma

    Query to ignore overlapping dates

    Hi AA Unfortunately the counter is not always sequentially ordered and may contain gaps so it can't be used in that way :( Hi Vongrunt, In my sample data I need the three rows returned seperately. 1 2005-01-01 01:00:00 2005-01-01 01:01:00 2 2005-01-01 01:05:00 2005-01-01 01:10:00...
  2. salma

    Query to ignore overlapping dates

    I am working on the assumption that if a fault ends at a particular time and another starts at that exact same time, both records would be valid. I will ultimately be calculating fault durations. I already have this query but because I have all the symptomatic faults in the results it is...
  3. salma

    Query to ignore overlapping dates

    Hello I have a table that stores start and end times for machine faults. The times often overlap because when one fault occurs it can cause a knock on effect and trigger several other fault conditions. I need to query this table and only bring back the rows showing the first fault in the...
  4. salma

    SQL Server CAL Licencing

    Hi James Thanks for the quick response. What you say makes perfect sense to me and is how I originally perceived it ... it's just that I've had conflicting answers from different parties! guess it's one of those grey areas MS love so much thanks Salma
  5. salma

    SQL Server CAL Licencing

    Hi I feel that I understand MS CAL licencing whereby any client accessing the server either directly or indirectly requires a CAL (either Device or User CAL or a Processor licence). However if you export data from SQLServer into a CSV file, is a CAL required for anyone who views that CSV file...
  6. salma

    append

    you can query the two tables seperately and then use a UNION command to merge the results eg. SELECT c1 FROM Table1 UNION SELECT c1 FROM Table2 there are several options for the UNION command which can be found in the SQLServer Books Online
  7. salma

    Local Variables in Stored Procedure

    sorry forgot the datatye declare @local_var_name datatype e.g. declare @temp int
  8. salma

    Local Variables in Stored Procedure

    declare @local_var_name Be sure to start the var name with an '@' or it won't validate thanks Salma
  9. salma

    isql Utility

    run the following command at the start of the query set nocount on note this command is 'sticky' which means it lasts for the session
  10. salma

    Stored procedures/triggers to automatically run

    not too sure this is what you want but ... you can run VBScript code using the Windows Scripting Host (WSH) engine (CSRIPT.EXE). This is available as a free download from Microsoft's website and once installed and registered, allows you to run any VBScript from a file. All you need to do is...
  11. salma

    dynamically assigning a value to a variable

    not sure if it's a typo in your mail but the stored procedure is named sp_execute_sql (note the extra underscore). Gets me every time :)
  12. salma

    Stored procedures/triggers to automatically run

    The stored procedure is easy enough to create using the getdate() function to find data older than two months You can then create a job in SQLExecutive (accessed from Enterprise Manager) to run your sp and create a schedule to run it daily. The HOW TO section of SQL Server Books Online details...
  13. salma

    dynamically assigning a value to a variable

    You need to use the stored procedure sp_execute_sql instead of the execute command This stored procedure will simply run any SQL statement that is passed to it. The only thing to bear in mind is that if you pass a variable, it has to be of type unicode Modified Script declare @tablename...

Part and Inventory Search

Back
Top