Viewing 15 posts - 1 through 15 (of 22 total)
In this case it is always better to add new datetime field in the table with default value getdate()
September 4, 2006 at 3:43 am
First take full backup of the database
then use following command
DBCC SHRINKDATABASE('dbname',10,TRUNCATEONLY)
or
BACKUP LOG dbname WITH TRUNCATE_ONLY
April 3, 2006 at 3:52 am
You need to use function to get field in hh:mm format
function D_Time (@S_Time as int)
as
begin
DECLARE @STR INT
DECLARE @QRY VARCHAR(10)
SET @STR=@S_Time
SET @QRY=CAST(@STR/3600 AS VARCHAR(2))+':'
SET @STR=@STR%3600
SET...
March 31, 2006 at 1:55 am
if your parameter is not fixed i.e. if value which you are comparing may contain Single Quotation mark or may not.. in that case before comparing first check for Single...
March 2, 2006 at 3:47 am
There is proper solution for such kind of problem on microsoft site..just go in support.microsoft.com
Simple way you can do like this
select distinct EmpName,EmpDesignation
into table2 from table1
then drop table1 and rename...
March 2, 2006 at 2:32 am
Sergiy , your first Query and My Query is almost same only difference is you have added alias and use that Alias in update statement.
Tell me performance wise is...
February 23, 2006 at 9:13 pm
Join is always faster compare to use of any sub query.
And about second quote... I don't think so that you can update multiple table in single Query
February 22, 2006 at 2:00 am
UPDATE TableA
Set ColumnA = 'Test'
from TableA join TableB on
TableA .ColumnB = TableB.ColumnC
WHERE TableB.ColumnD = @Name
I think this Query should work for you
February 21, 2006 at 11:24 pm
from_date=year(getdate())+'-'+month(getdate())+'-'+'1'
OR
SELECT from_date=DATEADD(d,-(DAY(GETDATE())-1),GETDATE())
to_date=DATEADD(d,-DAY(GETDATE()),DATEADD(m,1,GETDATE()))
February 20, 2006 at 3:29 am
You can not get in single query. but you can use bunch of statement
copy following code in Query analyser
DECLARE @S1 AS VARCHAR(400)
SET @S1=''
SELECT @S1 = @S1+', ' + [field1]...
February 16, 2006 at 4:55 am
modify command like this
SET FldA = cast(FldB as float)/cast(FldC as float)
February 16, 2006 at 4:43 am
At least you should have sa login to add this account. if you have then go in enterprise manager with sa login
there you add new user. select build in administrator...
January 30, 2006 at 10:26 pm
always better to keep ini file at he place where exe file is there or in some folder so if you are using any front end application like vb then...
January 30, 2006 at 2:26 am
Viewing 15 posts - 1 through 15 (of 22 total)