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 wOOdy-Soft 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: Leighton21
  • Content: Threads
  • Order by date
  1. Leighton21

    Tail File and Notify

    Hi All, I have this code $computer = gc env:computername Get-Content -Path 'C:\temp\error.log' -Tail 1 -Wait | where {$_.contains("error")} | ForEach-Object -Process {send-mailmessage -SMTPServer "SMTPSERVER" -to "someaddress@someaddress.com" -from "someaddress@someaddress.com" -subject...
  2. Leighton21

    Excel Replace

    Hi Guys, I am using code similar to the following For Each WS In Worksheets WS.Cells.Replace What:=Search, Replacement:=Replacement, _ LookAt:=xlPart, MatchCase:=False Next to try to replace values in a sheet. My question is can you reference the row number of the cell that is currently...
  3. Leighton21

    Set Based Query

    Hi All, I am trying to transfer data from one database table (ODBC linked table non SQL Server) to a SQL table. I have this working and I use a configuration table to determine what data needs to be transferred. The config table is simply [Item Name], [Frequency], [Date Last Transferred] where...
  4. Leighton21

    Table Joins

    Hi All, I have 2 tables Table 1 ItemID Start End Hours D1 01/06/2009 6:12 01/06/2009 6:17 0.10 D1 01/06/2009 7:43 01/06/2009 8:39 0.94 D1 01/06/2009 8:49 01/06/2009 9:45 0.93 D1 01/06/2009 9:49 01/06/2009 9:53 0.07 D1 01/06/2009 10:05 01/06/2009...
  5. Leighton21

    Succesive Duplicates

    Hi all, I am trying to extend the following query to find successive duplicates SELECT Value, COUNT(Value) AS Duplicates FROM TABLE1 GROUP BY Value HAVING ( COUNT(Value) > 1 ) So I have a table that has the follwing data Date ID Value 12/01/2008 1 12 12/02/2008...
  6. Leighton21

    Selecting specific days

    Hi All, I have a calendar table which contains daily values i.e 01-01-2008 01-02-2008 Is it possible without a join (or otherwise) to select every 7th day given an input day so for example if a user selected 01-01-2008 the next date would be 01-08-2008 and so on. Cheers
  7. Leighton21

    Pie Charts

    Hi All, When I create a pie chart and there tends to be a lot of records with small percentages. When this occurs the labels become squashed and overlapped. Is there a way around this or is there a way to not show the label for anything below a certain percentage Cheers
  8. Leighton21

    Aggregate Query

    Hi all, I have the following table (including data) Date Product Weight 12/06/2008 4:15:00 AM A 100 12/06/2008 4:30:00 AM B 100 12/06/2008 5:00:00 AM B 100 I have grouped the data by the hour (i.e. all above is grouped into 1...
  9. Leighton21

    Group By Query

    Hi all, I have the following table (including data) Date Product PrevProd Weight 12/06/2008 4:15:00 AM A A 100 12/06/2008 4:30:00 AM B A 100 12/06/2008 5:00:00 AM B B 100 12/06/2008 5:30:00 AM B...
  10. Leighton21

    PIVOT Query

    Hi All, Is it possible to have two aggregations using the pivot query. for example if you have the following Date Product Pice1 Price2 2008 a 1 2 2008 b 3 4 2009 a 3 4 2009 b 5 6 becomes Date...
  11. Leighton21

    Group by Arbitrary Number

    Hi All, I am trying to create a stored procedure that accepst a number value (in this case the number represents an hour) the results of the data should then be grouped by this value so for example I have the following Date Value 07/01/2008 4:15 200 07/01/2008 4:35 221...
  12. Leighton21

    Crosstab Row and Column Headers

    Hi all, I have a crosstab which currently outputs the following Winter Value1 Value2 01/01/2008 Site1 12 1 Site2 14 22 01/02/2008 Site1 33 33 Site2 45 33 where the row groups are date and then site and...
  13. Leighton21

    Charting Question

    Hi All, I have an SQL TABLE which has a column of dates and a column of values for those dates. some of the values are null and when I create a chart the dates alon the axis appear when the value for that date is null. Is there a formula to filter the dates where the value is null Cheers
  14. Leighton21

    Sql Server Agent

    Hi all, Hopefully a simple question. If I have a sql server agent job running which is scheduled for every minute and the server crashes or is offline due to maintenance, when the server agent starts again will the job catch up?? i.e. will the job run from the last scheduled time? The reason...
  15. Leighton21

    24:00 as a time

    Hi All, I have a query which I am trying to get to work it is as follows Select TIME From TIMES WHERE convert(datetime, runtime, 108) < '12:00' unfortunately this is an existing DB and the runtime is a varchar with data that looks like the following 11:23 23:45 etc one of the values is...
  16. Leighton21

    Time between

    Hi All, Probably an easy one. However here goes given a specific time (configured as 24 hour format and without the date portion). Is it possible (without the date) to see if the time falls within a specified start and end time i.e. given 0500 need to return true if it is between 1700 and 0600...
  17. Leighton21

    MSCOMM/Serial Communications

    Hi All, Just a Question? I have opened a hyperterminal session and then created a vb app with a MSCOMM control. What I was trying to do was to send data to the hyperterminal session through the VB app. I have tried the following code (on a button click) Private Sub Command1_Click() With...
  18. Leighton21

    SWF Preloader Issues

    Hi all, I have a SWF file which I load in an external window with the following code function newWindow(movieswf){ movieWindow = window.open(movieswf, 'movieWin', 'width=280, height=210') movieWindow.focus() } and call with href="javascript:newWindow('Media/Movie/movie.swf')"...
  19. Leighton21

    Query Efficiency

    Hi All, Just a question I have the following query and am wondering as to whether it is as efficient as it could be Select CLI_CODE, PROJ_CODE, Coalesce((select avg(EXPECTEDTA) from PROFJOB_CUIDUSER PJCU, PROFJOB_CUID_SCHEME_ANALYTE PJCSA, PROFJOB_CUID PJC, PROFJOB PJ...
  20. Leighton21

    Criptic Query

    Hi All, Just wondering if this were possible I have a table which contains Information on Electrical Components and when it was assembled similar to the following. ComponentCode, ComponentType, AssembledDate etc First of all I needed to find the number of components assembled within a...

Part and Inventory Search

Back
Top