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...
you ould use a union query where by you take your firt query then followed by Union all and then right a second query with the left outer join where the param is null
Does this make any sense?
Hello
Yes I'm aware of this but the problem is that i'm doing a check from something that is populated from another source so it will netiher be a failure or success. It will just be some code that needs to be executed at the start and from the result do one of two things.
What I have is 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...
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...
thanks mate, looks like what I need but will only be able to test fully next month but looking at it all seems ok with this code
you truly are a coding king
Tnaks for your help
Shab
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
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.