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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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
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...
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
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...
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...
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...
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?
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.
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
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.