Viewing 15 posts - 2,581 through 2,595 (of 2,894 total)
Try this:
DECLARE @TblName NVARCHAR(1000)
SET @TblName = 'YourTableName'
DECLARE @sql NVARCHAR(MAX)
SET @sql = ' SELECT ''Minimal Values'''
SELECT @sql = @sql + ', MIN([' + isc.COLUMN_NAME + ']) AS ' + ' [MinOf'...
July 5, 2010 at 5:15 am
It is not very good practice to call a column IsPaused to store start time of the Pause as it is totally missleading (and looks stupid, question: IsPaused? answer: 1...
July 5, 2010 at 5:00 am
doobya (7/4/2010)
create table dbo.TimeLog (
[TimeLogID] int identity
,[EmpID] int not null
,[LoginTime] datetime not null
,[LogoutTime] datetime
,[PauseDuration] int not null
,[SessionDuration] int...
July 4, 2010 at 3:49 pm
doobya (7/4/2010)
declare @timeLog table (SNO int, EMPID int, [STATUS] char(10), [DATE] Datetime, [DURATION] int)
the logout logic...
July 4, 2010 at 3:22 pm
scott.pletcher (7/3/2010)
For the emps with matching in/out and pause/resume rows [and presumably you edit for those who don't match up], you don't have to go thru all that....
If I will...
July 4, 2010 at 3:19 pm
July 3, 2010 at 4:17 pm
Yes, you need to convert everything into varchar (actually, you would need to do it anyway even using your cursors). Yes you can do it with money, numerics and datetimes....
July 2, 2010 at 3:35 pm
The very common result of trying to get data by hands without using appropriate tool is:
Steve Jones - Editor (7/2/2010)
... Scribbles on disks...
And, as mentioned by Steve, DBCC utilities comes...
July 2, 2010 at 10:03 am
ankur_dba (7/2/2010)
...1)If i am to retrieve data stored by me in a table, without using any tool (and SSMS ofcourse), how can i do it?
...
I do really like...
July 2, 2010 at 9:18 am
vbradham (7/2/2010)
...Using sql 2000 so has to be T-sql. Thanks will try it.
...
How you get this bar separated data in a first place?
Does it come from GUI or loaded from...
July 2, 2010 at 8:26 am
You do allow sql injection in every place where you perform string concatination. To avoid it - use sp_executesql.
What is your table structure and what are you passing in @Demographics...
July 2, 2010 at 8:10 am
Back it up and restore it as database with different name
July 2, 2010 at 7:31 am
Paul White NZ (7/2/2010)
Oh, and in case you were wondering, very very few professional DBAs know the precision and scale formulas - or even that they exist, so don't sweat...
July 2, 2010 at 7:19 am
Sample of schema you have? Some data for representing a query which you don't like? What you would like instead?
Please click on the link at the bottom of my signature...
July 2, 2010 at 7:03 am
Viewing 15 posts - 2,581 through 2,595 (of 2,894 total)