Viewing 15 posts - 121 through 135 (of 183 total)
I think something like this should do. Use a derived table and then left join with a where null condition to find records not joined.
select t.CodClient,t.Name, (t.Address2 +...
November 6, 2008 at 7:34 am
Can you explain exactly what you need?
SQL will handle multiple updates automatically by locking the table and processing records based on the ACID properties. So I think...
November 6, 2008 at 7:29 am
Self join the table on ClientName, Product, and ArcDate with a date function like ArcDate = DATEADD(m,-1,ArcDate). Then select the distinct record set.
SELECT DISTINCT
ClientName,
Product,
A.ArcDate - B.ArcDate
FROM Tbl A...
November 6, 2008 at 7:26 am
I don't know your answer, but somethign you might want to look at is the property for LogonServer. If you run the set command it will show you the...
November 5, 2008 at 12:44 pm
Primary difference is that when the .bat file is executed from SQL sp_cmdshell is that it runs under the context of the SQL Service account (unless your using a proxy...
October 31, 2008 at 1:18 pm
If you have multiple instances make sure SQL Browser Service is running as I believe it is required to access other instances than the default one. You should also...
October 31, 2008 at 12:12 pm
I think this points out how there is not one way to do things. I agree with rbarryyoung the most. There are really two options. We could...
October 31, 2008 at 10:27 am
I agree with the other individuals that you might be better suited to use two fields of datetime data type and then look at the differences.
If you want to do...
October 31, 2008 at 8:48 am
I would look at the isdate() in the where clause. Is it possible that the query evaluates the first condition and fails, before it eliminates the isdate() criteria. ...
October 29, 2008 at 1:00 pm
Thanks for answering the questions. I changed the value and it changed the running value as well. So seems no restart is needed.
I will take a look at...
October 22, 2008 at 9:52 am
To select from another database use a fully qualified name Database.Owner.Table as long as it resides on the same server and your account has access. If its on another...
October 20, 2008 at 2:56 pm
Might be missing something... but can you do something like this?
select z,
min(case code1 when 'xy' then date else null end),
max(case code1 when 'zx' then date else null end)
from table
where zone...
October 20, 2008 at 2:52 pm
I don't think that there is a clear cut answer to your question. It will depend on the queries you are issuing, the data contained in the tables, existing...
October 20, 2008 at 8:40 am
The MAX() and other functions need a value to evaluate. The nature of NULL is that it is undefined. So if you have three records with quantities...
October 20, 2008 at 7:39 am
Having the groupby include the datemonth() will cause an extra record for each month where there is data. I think you just need to get rid of that logic.
October 3, 2008 at 8:20 am
Viewing 15 posts - 121 through 135 (of 183 total)