Viewing 15 posts - 61 through 75 (of 96 total)
Yes...discipline and a "big stick". We've been using VSS for version control of all DDL and sql code for a while now. Periodically our Audit Team does a...
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 9:08 am
Just glancing over this quickly...
You have several attributes in your table ddl as tinyint, however you do an implicit conversion of decimal datatype in your stored procedure.
I'd guess altering your...
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 9:03 am
create #table
(
date datetime,
hours numeric(10,2)
)
--insert some stuff into #table
declare @start_date datetime
--set your start date if you want
select @start_date = min(date)
from #Table
declare @results table
(
week int primary key,
hours numeric(10,2)
)
insert @results
select datediff(day,@start_date,date)/7+1 WEEK,sum(hours)
from...
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 8:33 am
Create a view of the table that enforces your access rules.
If you have your DDL....I could help you further.
HTH
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 7:20 am
If I'm understanding you...this should work...
Update time_check2
set TimeLastRun = @mydate,
TimeNextRun = dateadd(minute,skdDuration,@myDate)
from time_check2 c
join
(
SELECT AlertNumber from time_check2 where DATEDIFF(MINUTE,timeLastRun,@myDate) = Schedule_Duration
)q
on q.AlertNumber = c.AlertNUmber
HTH
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 7:17 am
I agree with Allen....if you are looking for a command line solution...create a DTS package and run it using dtsrun.
HTH
Mathew J Kulangara
sqladventures.blogspot.com
February 3, 2006 at 7:11 am
..or using [Information_Schema] views may be more apt...You'll save yourself a headache in migrating to SQL Server 2005.
Mathew J Kulangara
sqladventures.blogspot.com
February 2, 2006 at 11:43 am
I don't believe so.
Of course I assume you mean..
SELECT Distinct Person_Name, Count(*) From Person_table
Group BY Person_Name
Mathew J Kulangara
sqladventures.blogspot.com
February 2, 2006 at 11:40 am
use open row set....
Here is an example..
select k.*,x.* FROM
OPENDATASOURCE
(
'MICROSOFT.JET.OLEDB.4.0',
'DATA SOURCE="x:\LOCATION\X.MDB";
USER ID=ADMIN;PASSWORD='
)...TABLE_INACCESS k
join some_table x
on x.some_field = k.some_field
..or you can make a linked server
Mathew J Kulangara
sqladventures.blogspot.com
February 2, 2006 at 8:36 am
Not exactly what your looking for..but here's something I wrote to address a similar issue..
--##1 HAS SOME SUBSET OF THE ATTRIBUTES OF ##2
DECLARE @CHILD_FLAG INT
DECLARE @QUERY NVARCHAR(100)
SELECT * INTO ##2...
Mathew J Kulangara
sqladventures.blogspot.com
February 2, 2006 at 8:22 am
Where are you "registering" the local name ?
Mathew J Kulangara
sqladventures.blogspot.com
January 31, 2006 at 12:45 pm
Although the Henderson series of Guru vooks are must haves for anyone working with Sql Server, it's a bit intimidating for the beginner. Instead try something like the...
Mathew J Kulangara
sqladventures.blogspot.com
October 12, 2005 at 8:19 pm
Murarch's book on T-sql and SQL Server is a great Newbie Book. It assumes you know Nothing at ALL, and has lots of examples. There's lots of stuff in there...
Mathew J Kulangara
sqladventures.blogspot.com
October 5, 2005 at 8:52 am
Bob..
Does 'Camel 1' comprise one field or 2 ??
did you mean
select description, {id}
from FEATS_PictureTEST order by newid() ??
Mathew J Kulangara
sqladventures.blogspot.com
August 10, 2005 at 3:18 pm
Your DDL would be helpful here....
Mathew J Kulangara
sqladventures.blogspot.com
August 10, 2005 at 2:24 pm
Viewing 15 posts - 61 through 75 (of 96 total)