How Do I Identify Object Modification Date Under Sql7 And 2000

May 23, 2001

I used to rely heavily on the sysobjects.crdate under mssql 6.5 to identify the last time an object was updated (primarily sprocs, but also tables and views). With the Sql7 Alter command, there doesn't seem to be any easy way to tell the last time an object was changed. Is this data stored out on any of the system tables/information views?

View 1 Replies


ADVERTISEMENT

Finding Table Modification Date

Oct 10, 2001

Is there a way to find out when the last modification or change to data in a table occured ? How about the last change of a view ?

We'd like to be able to extract data to another table based on a view. Then, at a later date, check to see if the first table or view has changed since the last extract. If not, then we don't need to re-extract the data, we know it hasn't changed.

View 1 Replies View Related

SQL Server 2008 :: How To Track Modification Date On Specific Table

Jul 13, 2015

I would like to know about the DML process (Insert/update /delete) in a particular table .. it is like change tracking but I also want to know the modification date

I know CDC ( Change data capture ) but unfortunately it needs SQL 2008 developer/enterprise edition and my SQL server is SQL 2008 STANDARD edition.

View 5 Replies View Related

DTS & ActiveX Can't Create Object Problem W/ SQL7

Jan 17, 2002

I've created a DTS package which exec's perfectly throught the DTS interface, but when I try to run the same package in a Job using DTSRun, I'm getting the following error...
####
DTSRun: Loading... DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSActiveScriptTask_1
DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: ActiveX component can't create object: 'CreateObject'
Error on Line 15
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts.hlp
Help context: 1100

Error Detail Records:
Error: -2147220482 (800403FE); Provider Error: 0 (0)
Error string: Error Code: 0
Error Source= Microsoft VBScript runtime error
Error Description: ActiveX component can't create object: 'CreateObject'
Error on Line 15
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts.hlp
Help context: 1100
DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1
DTSRun: Package execution complete.

####

The 1st part of the actual ActiveX script within the DTS package is...

'************************************************* *********************
' Visual Basic ActiveX Script
'************************************************* ***********************

Function Main()

' check to see if the capscan file exists. check for the first
' else do not proceed

'Function Main()

dim oFSO
dim x

' instantiate the Scripting Object
set oFSO = CreateObject("Scripting.FileSystemObject")

' Open the file
set x = oFSO.OpenTextFile("C:directoryfile0.txt")

x.close

Main = DTSTaskExecResult_Success

End Function

######

note: the exact same configuration works perfectly on the test server.
Both servers have same version of NT4, SQL7, VBscript, MDAC.

Anyone with any ideas???

View 1 Replies View Related

In A String Field Identify Not Date Records?

Apr 15, 2008

Hi All,

I have a table called Table1 with a field called DateString with a nvarchar type. The records are like this;

DateString
1/11/2007
9/27/2006
2/22/2008
1/10/2007
11/13/2007
8/21/2007
5/23/2007
2/16/2007
12345678900
11/20/2006

It may not have date records which are just string like in this example is 12345678900. I need a SQL script which can identify those records which are not of date type. Please help.

Thanks,

Zee

Thanks a million..

Zee

View 4 Replies View Related

Transact SQL :: Query To Identify Overlapping Date Rows

Aug 18, 2015

I have a table with multiple rows per staff person.  Each of these rows has staff_id, start_date, and end_date.  Per staff, if any start_date comes between the start_date and end_date of a different row, or if any end_date comes between the start_date and end_date of a different row, then I have to flag these records as being identical. 

How can I do this?  I have tried doing a Cross Apply because I thought that would do Cartesian product (comparing every row), and I've also tried temp tables. But I haven't gotten either of these to work. Here is some dummy data:

if exists (select * from tempdb.dbo.sysobjects o where o.xtype in ('U') and o.id = object_id(N'tempdb..#staff_records')
) DROP TABLE #staff_records;
create table #staff_records
(
staff_id varchar(max),

[Code] ....

View 12 Replies View Related

Reporting Services :: Identify Latest Address Using FIRST And Date Commands

May 22, 2015

I would like to display the most recent seasonal address on my report. Here is the scenario,

I can search the SSMS and identify all available addresses. the recent sometimes appear at the top, in middle or at the bottom of the address list.I used a stored PROC to and a tempdb to find the initial search of all the addressesThen I used top 1 to select the address that I'm looking for. For situation where I have multiple addresses, is there a way to identify the latest address using FIRST and date commands.

View 2 Replies View Related

SQL7 SP3 Release Date

Nov 26, 2001

Hello,

I am trying to remember the release date for SQL7 SP3 to resolve a problem. Please could somebody let me know?

Thanks in advance,
Chris.

View 1 Replies View Related

Log Viewing On SQL7/2000

Oct 25, 2001

It was possible to read the transaction log on SQL 6.5 with DBCC LOG and find out what was going on. Is there any way to do this in SQL 7.0/2000 or do you now have to rely on SQL Profiler? I have noticed that SQLProbe has a log viewer in it and would like to know how they did it.

View 1 Replies View Related

Gotchas For Upgarding From Sql7 To 2000

Mar 27, 2001

Does anyone know where I can locate a list of gotchas for upgrading SQL 7 to 2000. I'm not sure there are many?

View 1 Replies View Related

Urgent: Move A SQL 2000 Database To SQL7

Nov 1, 2001

Hi,

I have a SQL2000 database that I want to move to SQL7. What's the best
way to do that?

Many thanks.

View 1 Replies View Related

Extended Memory For SQL7 On Advanced Server 2000

Jan 24, 2002

Could anyone inform me how much the conventional memory SQL7 Enterprise on Advanced Server 2000 can have?
The SQL is on an active/active cluster. Currently each runs at 2GB of memory, with available memory for failover. I am planning to add another 2GB to each SQL node. Is this possible? Are there any configurations I need to do? Do I need to set AWE enabled? and How much?

Your help is greatly appreciate.
Jim

View 4 Replies View Related

File Copy To Windows 2000 From NT Server Running Sql7

Jul 20, 2005

We are running SQL 7 on a Windows NT Server. If you copy a 25Mb filefrom this machine to a W2K server, the file copy takes over 5 minuteson a 100Mpbs switched network.Copying the same file to another NT server takes only seconds, andcopying the same file to the W2K server from the 2nd NT server, (whichis not running SQL) takes only seconds also.Has anyone any ideas as to why file copying between this machine and aW2K one will take so long. It is repliacted on 5 further w2K machines.

View 1 Replies View Related

Creating Object In SQL 2000 Server DB

Dec 20, 2006

I opened SSMSexpress and attached to my sql 2005 database and automatically created the scripts for creating all the object in a SQL 2000 DB.  The objects seem to be created but I did get script messages.  Are these messages harmless?thanksMilton
Msg 208, Level 16, State 1, Procedure Requestview, Line 3
Invalid object name 'dbo.requests'.
Msg 15135, Level 16, State 1, Procedure sp_validatepropertyinputs, Line 147
Object is invalid. Extended properties are not permitted on 'dbo.Requestview', or the object does not exist.
Msg 15135, Level 16, State 1, Procedure sp_validatepropertyinputs, Line 147
Object is invalid. Extended properties are not permitted on 'dbo.Requestview', or the object does not exist.

View 2 Replies View Related

Can I Restore Just 1 SQL Server 2000 Object?

Jan 22, 2002

Is there a way to restore a "single" object in SQL Server 2000? (I only need 1 table and 1 stored procedure restored -- however it appears as though I need to restore the ENTIRE DB to get to these!)

thx.

View 2 Replies View Related

Bulk Import Images To Binary Object In SQL 2000

Apr 3, 2006

I have a web application that I am rebuilding. I have many picture files that want to take off the file system and move into SQL as a blob. I will create an index of uids against the file names but need a good way to bulk add the files to the database... any hints on code or tools would be a great help.
Thanks
 
Bill

View 1 Replies View Related

Copy 2000 Database Invalid Object Name Issue

Nov 2, 2007

Hi

I'm trying to copy a s2k db to s2005 64 bit db.


I setup the copy db as a schedule but it keeps failing which invalid object name which i think would suggest that the import table is not there?? even thought it is there I have checked the structure of the table which looks fine.

Does anyone have any ideas to get around this?? Or can I do some other checks?


Many Thanks


Robert


OnError,SEA-SRV-00009,NT AUTHORITYSYSTEM,sea-srv-00008_SEA-SRV-00009_Transfer Objects Task,{524DBB9C-783A-4989-8239-7825B10BF060},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,0,0x,ERROR : errorCode=-1073548784 description=Executing the query "

CREATE view [dbo].[vw_tf_stock_take_scanned] as
select dbo.i_st_stakedt.inputref, dbo.i_st_stakedt.whse, dbo.i_st_stakedt.stockcode, dbo.i_st_stakedt.ticketref,
dbo.i_st_stakedt.bin, dbo.i_st_stakedt.checkqty, dbo.i_st_stakedt.updated, dbo.i_st_stakedt.status,
dbo.i_st_stakedt.createdon, dbo.i_st_stakedt.createdat, dbo.i_st_stakedt.filler
from dbo.i_st_stakedt inner join
dbo.i_st_stakehd on dbo.i_st_stakedt.inputref = dbo.i_st_stakehd.inputref
where dbo.i_st_stakehd.status not in ('X','P')



" failed with the following error: "Invalid object name 'dbo.i_st_stakedt'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
StackTrace: at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer()
at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()
OnError,SEA-SRV-00009,NT AUTHORITYSYSTEM,SAS_mig,{40DA50FD-2E47-4B84-99D8-6FFDB0A4DD8D},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,0,0x,ERROR : errorCode=-1073548784 description=Executing the query "

CREATE view [dbo].[vw_tf_stock_take_scanned] as
select dbo.i_st_stakedt.inputref, dbo.i_st_stakedt.whse, dbo.i_st_stakedt.stockcode, dbo.i_st_stakedt.ticketref,
dbo.i_st_stakedt.bin, dbo.i_st_stakedt.checkqty, dbo.i_st_stakedt.updated, dbo.i_st_stakedt.status,
dbo.i_st_stakedt.createdon, dbo.i_st_stakedt.createdat, dbo.i_st_stakedt.filler
from dbo.i_st_stakedt inner join
dbo.i_st_stakehd on dbo.i_st_stakedt.inputref = dbo.i_st_stakehd.inputref
where dbo.i_st_stakehd.status not in ('X','P')



" failed with the following error: "Invalid object name 'dbo.i_st_stakedt'.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
helpFile= helpContext=0 idofInterfaceWithError={8BDFE893-E9D8-4D23-9739-DA807BCDC2AC}
StackTrace: at Microsoft.SqlServer.Management.Dts.DtsTransferProvider.ExecuteTransfer()
at Microsoft.SqlServer.Management.Smo.Transfer.TransferData()
at Microsoft.SqlServer.Dts.Tasks.TransferObjectsTask.TransferObjectsTask.TransferDatabasesUsingSMOTransfer()
OnProgress,SEA-SRV-00009,NT AUTHORITYSYSTEM,sea-srv-00008_SEA-SRV-00009_Transfer Objects Task,{524DBB9C-783A-4989-8239-7825B10BF060},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,0,0x,Database transfer failed for 1 database(s).
OnProgress,SEA-SRV-00009,NT AUTHORITYSYSTEM,sea-srv-00008_SEA-SRV-00009_Transfer Objects Task,{524DBB9C-783A-4989-8239-7825B10BF060},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,100,0x,Transfer objects finished execution.
OnTaskFailed,SEA-SRV-00009,NT AUTHORITYSYSTEM,sea-srv-00008_SEA-SRV-00009_Transfer Objects Task,{524DBB9C-783A-4989-8239-7825B10BF060},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,0,0x,(null)
OnPostExecute,SEA-SRV-00009,NT AUTHORITYSYSTEM,sea-srv-00008_SEA-SRV-00009_Transfer Objects Task,{524DBB9C-783A-4989-8239-7825B10BF060},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,0,0x,(null)
OnWarning,SEA-SRV-00009,NT AUTHORITYSYSTEM,SAS_mig,{40DA50FD-2E47-4B84-99D8-6FFDB0A4DD8D},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,-2147381246,0x,SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
OnPostExecute,SEA-SRV-00009,NT AUTHORITYSYSTEM,SAS_mig,{40DA50FD-2E47-4B84-99D8-6FFDB0A4DD8D},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,0,0x,(null)
PackageEnd,SEA-SRV-00009,NT AUTHORITYSYSTEM,SAS_mig,{40DA50FD-2E47-4B84-99D8-6FFDB0A4DD8D},{91AA3955-85BF-4DA1-B2BC-0A14787BE06D},11/2/2007 11:02:24 PM,11/2/2007 11:02:24 PM,1,0x,End of package execution.

View 10 Replies View Related

Data Modification

Sep 6, 2000

I am trying to migrate a system across and need some help tidying data and merging info.
Firstly if I have some companies with the suffix 'Limited' and some with 'Ltd' ie BBC Ltd and BBC Limited. How do I change all these to read the company name and then Ltd??
Secondly I am pulling info from a table which has company name duplicates into a table that also may have company details relating to that company name. I wish to add the details if the company name doesn't exist in the table and also only input the once from the source table. I am using cursors for this. My scripts see below is adding every record. Any ideas why??
Thanks for any suggestions


CREATE PROCEDURE check_company2
AS
declare
@id varchar(50),
@company_name varchar(50),
@business_type varchar(50),
@hardware varchar(50),
@operating_system varchar(50),
@networks varchar(50),
@pcs varchar(50),
@terminals varchar(50),
@test_companies_id varchar(50)
begin
declare s_completelist_cur cursor for select [company name],[business type],[hardware],[operating system],[networks],
[pcs],[terminals] from s_completelist
open s_completelist_cur

fetch next from s_completelist_cur into @company_name, @business_type, @hardware, @operating_system, @networks,@pcs, @terminals
while (@@fetch_status=0)

begin
print @company_name
select @test_companies_id from companydetails c where c.company_name = @company_name
if @test_companies_id is not null

begin
print 'match found'
end
else
begin
insert into companydetails ( company_name, business_type,hardware, op_system, network, pcs, terminals)
values (@company_name, @business_type,@hardware, @operating_system, @networks, @pcs, @terminals)
end

fetch next from s_completelist_cur into @company_name, @business_type, @hardware, @operating_system, @networks,@pcs, @terminals
end
close s_completelist_cur
deallocate s_completelist_cur
end

View 1 Replies View Related

Mass DTS Modification

Aug 13, 2004

I have a series of DTS packages.
Each package has 20 queries.
Each query has a server name.
Is there a way to change the servername without editing each query in each DTS package.
I'd like to copy the template DTS package, then perform the modification.

Thanks

View 2 Replies View Related

Need Help With String Modification

Feb 23, 2004

Im trying to basically take an email address user@domain.com that is in a row and basically split it up or get 1 side.

Im trying to find the command if it exists or a way to do this in tran sql to basically give me everything left or right of the '@' symbol, is there an easy way of doing this? Thanks!

Chris

View 7 Replies View Related

Trigger Modification

Jul 26, 2007

I have converted Access database to sql express. Access Database had AutoNumber FIelds for which trigger was generated by Upsizing wizard.

Now when I import data from client the autonumber field value changes because trigger is fired which distroys all links

I want to modify trigger so that it generates new number only when it is not supplied in a insert command.

Please help. Code is given below. Also suggest how to save because when I use save, it asks for a new .sql file name and a new file is generated instead of modifying the same trigger



set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[T_AcControlLimit_ITrig] ON [dbo].[AcControlLimit] FOR INSERT AS
SET NOCOUNT ON
DECLARE @randc int, @newc int /* FOR AUTONUMBER-EMULATION CODE */
/* * RANDOM AUTONUMBER EMULATION CODE FOR FIELD 'IntAcControlCode' */
SELECT @randc = (SELECT convert(int, rand() * power(2, 30)))
SELECT @newc = (SELECT IntAcControlCode FROM inserted)
UPDATE AcControlLimit SET IntAcControlCode = @randc WHERE IntAcControlCode = @newc

View 2 Replies View Related

Modification Logs

Jun 13, 2007

Is there a way to determine when a file was changed/modified? We're onSQL 2000 and I need to know when a view was modified and by whom.Thanks!

View 1 Replies View Related

Parameter Modification Within Mdx

Feb 14, 2007



Is it possible to modify a parameter value within a dataset using mdx?

lets say the param values of @bucket = 6

how would you go about writing @bucket + 1

so @bucket now would equal 7

is this possible?

View 1 Replies View Related

Modification Of The Primary Key !!

May 23, 2007

Hi

I have binded a DataGradView (DGV) with a Dataset (DS) , i execute and modify on the DataGradView the primary key (IDObj) and also the two other columns, by clicking on the UpDate button i call the function UpDateTable :







public void UpdateTable(string nameTable)
{
// con : ma connection OLE Ã un fichier Access 2003
// DS : dataSet
// DAdp : Dataadapter
// nameTable : nom de ma table



OleDbCommand comdUPDATE;

string CommandText = "UPDATE " + nameTable + " SET IDObj=@IDObj ,NameParent=@NameParent,TypeObj=@TypeObj WHERE IDObj=@IDObj";

comdUPDATE=DAdp.UpdateCommand = new OleDbCommand(CommandText, con);

// IDObj : clé principale
comdUPDATE.Parameters.Add(new OleDbParameter("@IDObj", OleDbType.VarChar, 50));
comdUPDATE.Parameters.Add(new OleDbParameter("@NameParent", OleDbType.VarChar, 50));
comdUPDATE.Parameters.Add(new OleDbParameter("@TypeObj", OleDbType.VarChar, 50));

comdUPDATE.Parameters["@IDObj"].SourceVersion= DataRowVersion.Original; //!!!
comdUPDATE.Parameters["@NameParent"].SourceVersion= DataRowVersion.Current;
comdUPDATE.Parameters["@TypeObj"].SourceVersion= DataRowVersion.Current;

comdUPDATE.Parameters["@IDObj"].SourceColumn = "IDObj";
comdUPDATE.Parameters["@NameParent"].SourceColumn = "NameParent";
comdUPDATE.Parameters["@TypeObj"].SourceColumn = "TypeObj";

DataSet modifiedDS = DS.GetChanges(DataRowState.Modified);


try
{
con.Open();
DAdp.Update(modifiedDS.Tables[nameTable]);
DS.Clear();
DAdp.Fill(DS, nameTable);
con.Close();

}
catch (Exception e)
{
MessageBox.Show(e.Message.ToString());

}
finally { con.Close(); }

}









But i have this exception : Concurrency violation : the update command affected 0 of the expected 1 records.




how is it possible to modify a primary key witch is the reference of that modified row?





Thanks for help

View 8 Replies View Related

Copy SQL7 To SQL7

Dec 5, 1998

How can I copy a SQL 7 database from one server to another? Please tell me all the ways because I've tried the obvious and it doesn't work. (backup and restore - won't go from one server to another, DTS transfer object Wizard - does a whole pile of errors and doesn't do stored proceedures and trigures). Thanks for help in advance. Also, what is the email address to post to the listserv and where is the FAQ for SQL7? Most of my listserv's tell you where to post right at the bottom of the digest I get - any chance you guys would do that with this list? Thanks again.

View 6 Replies View Related

Modification In Database One By One Record

Jan 26, 2007

My problem is related to database and data.
I building a project in ASP.NET 2.0 with the help of VWD  in which i have certain records and each record has
 a unique id with it.Now my problem is that when a user wants to edit a certain record i want the user to enter
 a record id for that record. Now if  the record id matches any record in the database then that record should be 
dislayed in another page  with and edit option with it.
 
 
 

View 1 Replies View Related

Please Help With This View - Small Modification

Nov 17, 2005

I have listed a view below and a portion of the result set that is returned when I run the code in Query Analyzer.  This is part of a timesheet application that logs hours per SCHLSTUID per SECTIONID per week.  This returns the SCHLSTUID(user's ID), SECTIONID, Date that the week starts, the first date that time was logged.  The user could be in several SECTIONID's for the same week.  I need to modify this so that it returns the date that the first time was logged for any of the SECTIONID's per week.  I know that this is probably something simple that I'm overlooking but I just can't get it to work correctly.Example:  SCHLSTUID   SECTIONID   ATTSTARTDT                     FirstTimeEnteredDOn601868445      EN4AR001      2005-09-18 20:59:21.120    2005-09-19 20:59:21.120601868445      MAA1R001      2005-09-18 20:59:21.120    2005-09-18 20:59:21.120This would need to return 2005-09-18 20:59:21.120------------------------------------------------------------------------------------------------------601868445      EN4AR001      2005-10-02 20:59:37.427    2005-10-02 20:59:37.427601868445      MAA1R001      2005-10-02 20:59:37.427    2005-10-02 20:59:37.427This would need to return either 2005-10-02 20:59:37.427------------------------------------------------------------------------------------------------------601868445      EN4AR001      2005-10-09 20:59:37.823    2005-10-09 20:59:37.823601868445      MAA1R001      2005-10-09 20:59:37.823    2005-10-13 20:59:37.823This would need to return 2005-10-09 20:59:37.823----------------------------------------------------------------------------------------------------------------------------------------------------CREATE VIEW dbo.vExportStartWeekASSELECT     TOP 100 PERCENT schlstuid, sectionid, ATTSTARTDT, MIN(TimesheetDate) AS FirstTimeEnteredOnFROM         (SELECT     schlstuid, sectionid, ATTSTARTDT, ATTSTARTDT AS TimesheetDate, sunmns AS TimeEntered                       FROM          TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, ATTSTARTDT AS TimesheetDate, sunhrs AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 1, ATTSTARTDT) AS TimesheetDate, monmns AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 1, ATTSTARTDT) AS TimesheetDate, monhrs AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 2, ATTSTARTDT) AS TimesheetDate, tuemns AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 2, ATTSTARTDT) AS TimesheetDate, tuehrs AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 3, ATTSTARTDT) AS TimesheetDate, wedmns AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 3, ATTSTARTDT) AS TimesheetDate, wedhrs AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 4, ATTSTARTDT) AS TimesheetDate, Thrmns AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 4, ATTSTARTDT) AS TimesheetDate, Thrhrs AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 5, ATTSTARTDT) AS TimesheetDate, Frimns AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 5, ATTSTARTDT) AS TimesheetDate, Frihrs AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 6, ATTSTARTDT) AS TimesheetDate, Satmns AS TimeEntered                       FROM         TimeSheetDailyAttendance                       UNION ALL                       SELECT     schlstuid, sectionid, ATTSTARTDT, DATEADD(d, 6, ATTSTARTDT) AS TimesheetDate, Sathrs AS TimeEntered                       FROM         TimeSheetDailyAttendance) TimesheetDatesWHERE     (TimeEntered <> 0)GROUP BY schlstuid, sectionid, ATTSTARTDTORDER BY schlstuid----------------------------------------------------------------------------------------------------------------------------------------------------This is a portion of what is returned:SCHLSTUID   SECTIONID   ATTSTARTDT                     FirstTimeEnteredDOn601868445      EN4AR001      2005-09-18 20:59:21.120    2005-09-19 20:59:21.120601868445      MAA1R001      2005-09-18 20:59:21.120    2005-09-18 20:59:21.120601868445      EN4AR001      2005-09-25 20:59:36.670    2005-09-25 20:59:36.670601868445      EN4AR001      2005-10-02 20:59:37.427    2005-10-02 20:59:37.427601868445      MAA1R001      2005-10-02 20:59:37.427    2005-10-02 20:59:37.427601868445      EN4AR001      2005-10-09 20:59:37.823    2005-10-09 20:59:37.823601868445      MAA1R001      2005-10-09 20:59:37.823    2005-10-13 20:59:37.823----------------------------------------------------------------------------------------------------------------------------------------------------Thank you for any help that you can give me.Scott

View 3 Replies View Related

Simple Db Modification Question

Mar 13, 2004

Is there a quick way to convert all table and column names in MSSQL7 from upper case to lower case?

View 5 Replies View Related

Automatic Creation And Modification Log

Jul 20, 2005

Hi there,I need some help in order to reduce the amount of code needed toimplement the logging of INSERT and UPDATE in my application'sdatabase.In every table of my database I have four fields (CreatedBy,CreatedTime, ModifiedBy, ModificatedTime), these fields allow me totrace the users who create and modify the registers in my application.I know that I can add in every stored procedure a piece of code whouses the app user as a parameter, and insert these information in theregister. But I would like to go beyond these method. I imagine thereis a better way of doing it, and I don't like to use triggers. Isthere any method, within the SQLServer functionality, that allows meto automate this process?So, any help would be very appreciated!!Thank you very much in advance!

View 1 Replies View Related

Dynamic Table Creation/Modification

Oct 1, 2006

I'm wondering if there is a control available for creating/modifying db tables through a web interface. I want for users to be able to add/remove, rename, and change the datatype of certain fields in a database table. I've been searching all day online if such a control exists in asp.net but haven't found anything. 

View 1 Replies View Related

How To Trace Modification On SQL Server 2005

Mar 6, 2008

Hello ;Can any one point me how to trace any modification made on a certain tabeles with in any data base?what i mean is if i have table "a" and i add updated some rows with it ... is there a way to figure iut the old data and the new data?simply i can create another table "history_on_a" which will be filled by a trigger when any updates happen ...this solution will consume my hard disk so is ther a built in funtion with sql ?so if any one can tell me what to search for or any idea 

View 1 Replies View Related

View Based On Table Modification

Aug 8, 2013

I have been inserted one row in to table called as Teachers..

vTeachers is the View ctreated on Teachers Table.

When i Inserted one row in to Table Teachers i didn't see that row in vTeachers View.

How can i get that newly inserted values in to my View?

View 4 Replies View Related

Get Alert On Modification Of Database Objects

May 31, 2007

Hi All,

We having the SQL SERVER 2000 Production server. We need to cofigure the alert on the production server that if any objects schema or SP got changed then server should fire the alert to all of DBA mailid.


Is there any way to sent the alert.

Thanks in advance.

BPG

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved