Viewing 15 posts - 406 through 420 (of 907 total)
To easy. Why was I trying to make this a registry hack.
Thanks.
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
February 5, 2003 at 10:13 am
In the sysobjects table there is a columns called schema_ver. BOL defines it like this:
Version number that is incremented every time the schema for a table changes.
If you keep...
February 5, 2003 at 7:59 am
I'm guessing your date_entered field is the number of days since 01/01/0000. If this is so, then I think you need to try something like this:
create table test (date_entered...
February 4, 2003 at 8:04 am
You should be able to use charindex, substring and len functions to do this. Try something like:
Select substring(column_to_seach,charindex('Outlays recovered :',column_to_search) + 20,len(column_to_search))
Gregory Larsen, DBA
If you looking for SQL Server...
February 3, 2003 at 10:30 am
You could create a function like so:
CREATE FUNCTION only_num
(@input char(100))
RETURNS char(100)
AS
begin
declare @output char(100)
set @output = ''
while len(@input) > 0
...
February 3, 2003 at 9:49 am
Try something like this, and insert results into a table then test the current_execution_status.
exec msdb..sp_help_job @job_name = '<yourjob>', @job_aspect = N'job'
Gregory Larsen, DBA
If you looking for SQL Server Examples check...
February 3, 2003 at 9:03 am
I have a couple of pivot query examples that might get you started. Check them out here:
http://www.geocities.com/sqlserverexamples/#pivot1
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website...
February 3, 2003 at 8:24 am
Possibly your insert statement did not add any row, but ran correctly. Is it possible your insert statement did not select any rows to be inserted? What does...
February 3, 2003 at 8:06 am
So did my second post, using the LESS THAN 1200 work?
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
January 30, 2003 at 3:02 pm
I misread it again. Looks like you also want to set the EndWork on those original records set to 2400.
Think this should do it:
Update [dbo].[TimeTable]
set [EndWork] = 2400
where...
January 30, 2003 at 2:50 pm
Did I misread your post? Your example shows a record with an EndWork value of less than 1200 (0630 is less than 1200). Try this:
Insert into [dbo].[TimeTable]
([EmployeeID],
[RecordDate],
[Beginwork],
[lunchOut],
[lunchIn],
[EndWork],
[CostCenter])
select...
January 30, 2003 at 2:41 pm
Run this to verify that you do have [EndWork] values > 1200:
select [EmployeeID],
[RecordDate],
0000,
[lunchOut],
[lunchIn],
[EndWork],
[CostCenter] from [dbo].[TimeTable]
where
[EndWork] > 1200
If this command returns no records then there is no records to split....
January 30, 2003 at 1:55 pm
Test this and see if it works:
Insert into [dbo].[TimeTable]
([EmployeeID],
[RecordDate],
[Beginwork],
[lunchOut],
[lunchIn],
[EndWork],
[CostCenter])
select [EmployeeID],
[RecordDate],
0000,
[lunchOut],
[lunchIn],
[EndWork],
[CostCenter] from [dbo].[TimeTable]
where
[EndWork] > 1200
Gregory Larsen, DBA
If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples
January 30, 2003 at 11:54 am
Sometimes a cursor and a temp table is faster. Here is another stab at what you are looking for. Also note that I ran both these examples in...
January 29, 2003 at 2:19 pm
The key was to use raiserror with a state of 127. Thanks. Here is something that works
select zxcvxvsdfgsdfasegfwergbetbetgsefrwefwerwer
go
IF (@@ERROR <> 0)
RAISERROR ('command failed.', 16, 127)
Gregory Larsen, DBA
If you...
January 28, 2003 at 3:48 pm
Viewing 15 posts - 406 through 420 (of 907 total)