Viewing 15 posts - 46 through 60 (of 215 total)
Good question.simple and straight forward answers.
November 8, 2012 at 2:41 am
ananda.murugesan (10/24/2012)
I m using SQL 2K8 R2 64 bit-version.
IF EXISTS(SELECT 1 FROM sys.objects where name='NewTable' and type='U')
begin
DROP TABLE NewTable
end
GO
select *
into NewTable from...
October 24, 2012 at 7:38 am
You mentioned status field explicitly in select query and put * so there is already one status is filed there.so please remove first status.
This query will execute sucessfully
IF EXISTS(SELECT 1...
October 24, 2012 at 4:21 am
declare @var varchar(20)
set @var = '24-Oct-2012'
print @var
declare @date varchar(30)
set @date = convert(date,@var,105)
print @date
SET @date=RIGHT('0'+CAST(DAY(@date) AS VARCHAR(2)),2)+'/'+RIGHT('0'+CAST(MONTH(@date) AS VARCHAR(2)),2)+'/'+CAST(YEAR(@date) AS VARCHAR(4))
print @date
October 24, 2012 at 3:51 am
select status, *
into NewTable from tbl_contract_emp_master TR inner join
TBL_IRIS_IMAGES_MASTER tm on tr.guid=tm.guid
and EP_NO in ('104536884','104541256','104564417','t12035676','104567770','104556221','104567536')
select * from NewTable
October 24, 2012 at 3:24 am
Using SSMS you can add dynamically using this script.
host_name() function will return
the computername.
declare @hostname varchar(200)
select @hostname=HOST_NAME()+'\inst'
select @hostname
exec sp_addserver @hostname
October 24, 2012 at 1:56 am
for understanding this question i had taken 10 min.but got it wrong.I select 3 options.omitted seconded option.did not observed carefully.question contructed poorly.but still i think its good question.
October 18, 2012 at 10:02 am
For understanding this question I had taken 10 minutes. I have given wrong answer. I selected 3 options out of four. I omitted second option (2, NULL, 0). I didn’t...
October 18, 2012 at 7:28 am
Thanks for good question. Error is because of data type. SQLserver implicitly convert float into integer for @b-2 variable. Hence divide by zero error encountered.
October 11, 2012 at 10:41 pm
Nice Question. I think it’s not easy. First I thought that it should return 5 rows. Then I observed all rows contain 1.so I given answer for 25.
September 27, 2012 at 11:06 pm
Viewing 15 posts - 46 through 60 (of 215 total)