Viewing 15 posts - 1 through 15 (of 22 total)
Thanks Florian, Got it.Such strange cases need to be ignored.
August 14, 2011 at 5:31 am
The result set is same for the both the queries.
August 13, 2011 at 10:14 pm
Thanks Gail for your update.
Lynn,
Here is the input.
CREATE TABLE TAB1(COL1 INT IDENTITY(1,1),COL2 DATETIME)
DECLARE @I INT
SET @I=1
WHILE (@I<1000)
BEGIN
INSERT INTO TAB1
SELECT GETDATE()
SET @I=@I+1
END
SELECT * FROM TAB1
CREATE TABLE TAB2(COL1 INT IDENTITY(1,1),COL2 DATETIME)
DECLARE...
August 13, 2011 at 12:52 pm
Thanks Lynn I have gone through your post(articles).Let me update the post with exact data and input .Typo it's not right join it's inner join
August 13, 2011 at 12:05 pm
Gail,
Am getting the same result when I select only col1 from both Left and inner join like the below
SELECT Tab1.col1
FROM Tab1
LEFT JOIN Tab2
ON Tab1.col1=Tab2.col1
or
SELECT Tab1.col1
FROM Tab1
INNER JOIN...
August 13, 2011 at 11:52 am
Thanks Gila
Lynn
Regarding your query the first Inner Joins lists records that matches in both tables.LEFT OUTER JOIN returns the all records from table tab1 irrespective of matching records in...
August 13, 2011 at 11:21 am
Hi Stewart,
It's working now.Even the first statement also working.
Thansk a bunch.
December 9, 2010 at 3:11 am
Hi,
It's not working.Is there a way to rename the file.
Thanks,
Nagesh
December 9, 2010 at 12:46 am
Hi,
You need to declare two input parameters for each column
1) columnname
2) datatype.
so that u can dynamically declare them.
November 24, 2010 at 11:05 pm
declare @Cmd varchar(max);
set @Cmd='DECLARE @data XML
SET @data=''<dataSet> <Items><ID>5 </ID> </Items><name>santhose</name></dataSet> '' SELECT
colx.value(''id[1]'',''int'') as EmpId,
colx.value(''name[1])'',''varchar'') as EmpName
FROM @data.nodes(''dataSet/Items'') as tabx(colx)'
exec(@Cmd)
November 24, 2010 at 10:38 pm
Hi,
for the answer A) how will be the performance impact
and which will be the best method of the above three backups that will have low impact.
Thanks in advance.
November 24, 2010 at 5:18 am
For interger columns you can go for the default as 0(zero). You may have Varchar column as null.But make sure that you should not query based on the null column...
November 24, 2010 at 4:03 am
Thanks for that
I learnt new thing stuff function
November 19, 2010 at 2:05 am
SELECT CONVERT(VARCHAR(20),GETDATE,120)
above query not giving the AM/PM at the end
Please check the below one (ignore the previous one)
SELECT (SELECT CONVERT (VARCHAR,GETDATE(),101))+' ' +(SELECT SUBSTRING (CONVERT(VARCHAR,GETDATE(),109),14,27 ))
Output
11/17/2010 2:01:51:833PM
Still am not able...
November 17, 2010 at 4:11 am
SELECT CONVERT(DATETIME,((SELECT CONVERT (VARCHAR,GETDATE(),101))+' ' +(SELECT SUBSTRING (CONVERT(VARCHAR,GETDATE(),109),14,27 ))))
Output
11/17/2010 2:01:51:833PM
Still am not able to remove the milliseconds as it should be below.
11/17/2010 2:01:51PM
November 17, 2010 at 3:25 am
Viewing 15 posts - 1 through 15 (of 22 total)