Viewing 15 posts - 16 through 30 (of 44 total)
if you need the number of characters of your_column, try len(your_column) or max(len(your_column)) if you want to determine the max across the table
February 25, 2008 at 6:40 am
Sandy,
my answer to "Can I store in 2008-02-22 14:55:11.733 format by using datetime datatype" is no, you cannot.
you would have to store that value as char()... ...
February 22, 2008 at 2:51 am
hi
if you must store the data in that format, use a column type char(23) with default value: convert (char(23), getdate(), 121)
hope i understood your requirement right and that the solution...
February 22, 2008 at 2:10 am
GilaMonster (2/22/2008)
SELECT TOP 1 f.forumid, forumname
FROM Forums f
LEFT JOIN Threads t ON f.forum_id=t.forum_id
LEFT JOIN (SELECT forum_id, MAX(postdate) as last_postdate FROM Threads GROUP...
February 22, 2008 at 1:46 am
hi
if you do not care which of the two simultaneous posts are displayed you can use this
SELECT f.forum_id, forumname, threadname,postdate
FROM #Forum f
LEFT JOIN #Threads t ON f.forum_id=t.forum_id
JOIN (
SELECT...
February 22, 2008 at 1:04 am
you need to setup the sql agent service to run under a domain user account
February 21, 2008 at 6:37 am
run
select serverproperty('ProcessID')
on the specific instance
that returns the "Process ID of the SQL Server service. ProcessID is useful in identifying which Sqlservr.exe belongs to this instance." (quote from BOL)
use...
February 21, 2008 at 1:30 am
hi
that is because the trigger, as you wrote it, deals with only one record.
try rewriting it using joins
if you do not figure it out, i'll try to help later this...
February 20, 2008 at 8:44 am
you have to add the simple quotes to the string
so, the string changes to:
set @STR = 'SELECT * from Employee WHERE empid=''' + @Empid + ''''
the quotes are...
February 20, 2008 at 6:50 am
i have typed extra characters in the key, please try again as i have corrected it
still, please be notified that i have not tested this query 🙂
February 19, 2008 at 9:58 am
try getting the info from the windows registry
something like:
EXEC xp_regread 'HKEY_LOCAL_MACHINE',
'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon',
...
February 19, 2008 at 7:57 am
if your sql server is not clustered, for the computer name you can use
select serverproperty('MachineName')
otherwise use select serverproperty('ComputerNamePhysicalNetBIOS') - see BOL, serverproperty function for details
February 19, 2008 at 7:33 am
i think you should create the database for each student, bind the login to it(i mean, give permission to the database only for the login and set the db as...
February 15, 2008 at 4:24 am
you want to change the default database for the login or to set the login as dbo for their database?
if you can explain a bit please
February 13, 2008 at 5:00 am
hi
i would have restored a full backup of the production database as the test database
dragos
February 13, 2008 at 1:13 am
Viewing 15 posts - 16 through 30 (of 44 total)