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 dencom 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: ashab02
  • Content: Threads
  • Order by date
  1. ashab02

    deduping a table

    Hello I have a table with loads of records. What I am trying to do is dedpue the table. I have details in this table but the records can sometimes be slighly different from the previous record. An example would be: ID Field1 Field2 1 Joe Bloggs 2 Joe...
  2. ashab02

    Trying to select a specific record

    Hello I have table which has address changes recorded within it. It has aunique identifying field 'Key' and also has a foreign key 'FKEY'. The table currently looks like this: Key FKEY DateOfChange Add1 Add2 1 100 01/01/2009 1 Test Street TestTown 2...
  3. ashab02

    How to call a step within a Job

    Hello I am writing my own Job within SQL server agent and would like to execute a certain step based on a previous statement. So far I have DECLARE @FLAG varchar(50) SET @FLAG = (select status from test) if @flag = 'Successful' begin 'Want to call a step2 here' end if @flag = 'Fail' begin...
  4. ashab02

    Extracting certain characters from a string

    Hello I have a set of data which contains address details. What I would like to do is get the first letter of the street name but the problem I have is that some of data contains records like 'Flat 4, Hope Lane' 'Flat 4 Hope Lane' The code I have is as follows and it only handles the first...
  5. ashab02

    Problem searching with date criteria

    Hello I have a set of data and when I convert the column with no where clause it works fine, the whole set converts successfully. However when i use a cluase, i.e >= '20080701' then it fails 'Syntax error converting datetime from character string.' I have the following query: select...
  6. ashab02

    Transfer my DTS Packages from one server to another

    Hello I have recently built a new more powerful server and I would like now to migrate my DTS Packages and JOBS from the old server to the newly created server. My new server will contain the same data as the old server. What I would like is to move the packages and also once the packages have...
  7. ashab02

    Getting the date range for the whole month

    Hello I have a problem in the sense that I have a query which currently is reliant on me entering the dates for it to run manually. There are two fields I enter in a table 'CurrentStart' and 'CurrentEnd' and I then link to this table in my main query. What I want to do is automate this process...
  8. ashab02

    Identifying Duplicate entries with different ID'S

    Hello I have a set of data and what I want to do is identify within this data repeat cases with the same address and name details but different ID'S I have so far managed to identify the cases where the same address and name details appear but not able to identify the ID. I want to now attach...
  9. ashab02

    Last working day of the previous month

    Hello I have a query which relies on a criteria, this criteria is the last working day of the previous month, so for example throughout this month I want to pickup the value 30/11/2007 as it is the last working day of the previous month. I currently use a dateadd function but its reliant on me...
  10. ashab02

    Date format

    Hello Having trouble exporting some data into the format I want. I have a datetime column and need to change that so it appears in the following format dd/mm/yyyy. I have tried converting it to a type of 103 but for some reason when I view my exported text document it has the date stamp as...
  11. ashab02

    Building a string from previous dates

    Hello I have a set of data and one case reference may have 10 dates. What i want to do is take the record with the latest date but then also want a column which will list my previous dates with a ',' seperating them. So something like: 12/01/2006, 15/01/2006, 12/05/2007. Can anyone help? Shab
  12. ashab02

    Calculate Average Cases per month

    Hello I have a set of data for a year (2006) and I have a specific column which is a date field. This date field is the date the case was passed to us. I would like now to create an average using this date field to give me a figure for 'Average number of cases per month'. I was wondering how...
  13. ashab02

    Change State of Database

    Hello How do I change the state of a database to 'STANDBY' If the above doesnt make sense how do I chnage the state of a database If somebody has the Query Analyser code then that will be great Shab
  14. ashab02

    View Problem

    Hello I have two views. One of which calculates some costs to date and lists the sum of that along with a reference number. My second view also has costs but this costs field I have also attempted to add the sum of my first view. The problem I am having is that it brings a ridiculously high...
  15. ashab02

    Converting a datetime field to month/year

    Hello I have a view which currently has a datetime field in the following format: 01/07/2003 12:01:44 I would like just the month and year so I would like it to look like: 07/2003. Alterantively I would like to basically filter on all data where it lies between last month. I have tried using...
  16. ashab02

    SQL Server View

    Hello I am currently writing a view in sql server using the front end view building tool and I am trying to within the criteria use the 'IN' Statement which then does a sub query as follows 'IN (SELECT TOP 1 DATE FROM CUSTOMER MA WHERE DATE >'12/05/2006' AND CUSTOMERCODE = MA.CUSTOMER CODE). It...
  17. ashab02

    Date Time conversion

    Hello I need to convert a field called 'DateOfProcedure' to Date format, ideally being dd/mm/yyyy. Currently it has the date and also the time posted in and I cant seem to search on it. Can someone show me how to?
  18. ashab02

    SQL Server View Query Builder

    Hello I am building a query in sql server using the view tool. I was ondering how you convert a date time field that contains the time as well to just the following: dd/mm/yyyy. I've used the cast feature before but unsure where I put this in the query builder window Any help appreciated.
  19. ashab02

    Delete data

    Hello I was wondering if some could help me. I would like to delete data from a series of tables out of my database based on the same criteria "where assigned_date > '10/07/2001'". My question is how do I automate this by using sql from sql technique? shab
  20. ashab02

    Strip specific part of field

    Hello I hope some one can help I have a field which has a number of values in it I would like to strip the specic vales out one by one. Thye contain telephone numbers and an example is below '8888 8888 (Home) : 07777777777 (Mobile)' The format is just like the above. Can someone tell me how...

Part and Inventory Search

Back
Top