Viewing 15 posts - 91 through 105 (of 132 total)
Dave
This is ugly but it looks like it gives you what you want.:
select a.empid, a.start_date_time, a.end_date_time
from
table_a a
inner join (
select orig.*, datediff(dd, orig.end_date_time, x.min_start_date) as day_diff, dateadd(dd, datediff(dd, orig.end_date_time, x.min_start_date), orig.end_date_time...
March 14, 2007 at 2:24 pm
quick question, you said the following:
The first row END DATE TIME = 01/04/2006
The second row START DATE TIME = 01/07/2006
you would not want these records since it is greater than three...
March 14, 2007 at 1:46 pm
Dave
If I have time, I would be happy to try to write up some SQL for you but I am not totally clear on what your resultset should look like.
March 12, 2007 at 7:33 pm
Jacqueline
Just a follow up, my client did apply the SP2a to their SQL Servers and this task worked successfully, provided I had the database users already created on the destination...
March 11, 2007 at 6:02 pm
this should be a starting point to work with, i named the table table_a for your three fields:
select
orig.*, datediff(
March 9, 2007 at 2:08 pm
Jacqueline
I am curious, did downloading SP2 help you with this SSIS task? I am currently working with a client and we are running into issues stating that the user currently...
March 8, 2007 at 7:12 pm
sure, use the sp_changeobjectowner sp:
EXEC sp_changeobjectowner 'table_name', 'dbo'
February 26, 2007 at 11:42 am
this may be a little hard coded but you are talking months here, which will not be changing anytime soon. however, you may want to look into a time table...
February 23, 2007 at 2:25 pm
i am guessing that the avgcost field is already calculated. with that being said, this should help at least get you down a path:
select orig.itemid, orig.year, orig.avgcost
from
(select itemid, year, avgcost
from...
February 23, 2007 at 2:00 pm
In SSIS there is a Transfer SQL Server Objects task that will allow you to copy over database objects. In there, you see the option for Copy All Views or...
February 23, 2007 at 1:48 pm
without knowing your data, this query may get you what you want:
SELECT ItemId, year, AvgCost
FROM dbo.tblItemAvgCost
WHERE (AvgCost <> 0)
and year = (select max(year) from dbo.tblItemAvgCost where avgcost<>0)
February 23, 2007 at 1:04 pm
sure, reset your sql string to each of the new queries that you want to execute and then update your temp table with the execution for each piece OR create...
February 22, 2007 at 7:19 am
what sql is reading is the literal value of @column_name and checking to see if that is null or '' and i take it that is not what you want....
February 21, 2007 at 5:30 pm
your issue in the script is that the blank quantity var will only either be 1 or 0 and that is based upon the @column_name being null or <> '', which...
February 21, 2007 at 12:05 pm
good information to know. thanks robert
February 21, 2007 at 8:00 am
Viewing 15 posts - 91 through 105 (of 132 total)