|
|
-
abhIShek BandI Commented 3 Months ago through Ask | 10 Points
Hi Leszek Gniadkowski ,
Thank you very much for your valuable information....
|
-
abhIShek BandI Commented 3 Months ago through Ask | 10 Points
thanks both of you.. for ur present......
|
-
abhIShek BandI Commented 3 Months ago through Ask | 10 Points
Hi Leszek Gniadkowski ,
I didnt get your answer, Let me explain my question clearly.
When i use data type NVARCHAR and select max(id) , am getting output as '-1'
and when i use VARCHAR datatype and select max(id) am getting output as '1'.
Why...
|
-
abhIShek BandI Commented 3 Months ago through Ask | 10 Points
Hi Madhivanan,
We are using below version.
Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)...
|
-
abhIShek BandI Posted 3 Months ago through Ask | 10 Points
How the max value differ based on Datatype.
in the below example if the data type is NVARCHAR , max(id) = -1
if the data type is VARCHAR then max(id) = 1
Can any one tell me how we are getting different results?
CREATE TABLE #TBL(ID NVARCHAR(10))
GO...
|
-
abhIShek BandI Commented 5 Months ago through Ask | 10 Points
create table #tbl(name varchar(100), st time , duration int)
go
insert into #tbl
select *
from (values ('amy smith', '8:00' , 15),
('joe doe', '8:15' , 30),
('abhishek', '10:00' , 15)) as a(a,b,c)
go
...
|
-
abhIShek BandI Commented 5 Months ago through Ask | 10 Points
Hi,
Hope below query is useful.
create table #tbl(name varchar(100), st time , duration int)
go
insert into #tbl
select *
from (values ('amy smith', '8:00' , 15),
('joe doe', '8:15' , 30),
('abhishek', '10:00' , 15)) as a(a,b...
|
-
abhIShek BandI Commented 6 Months ago through Ask | 10 Points
Thank you very much Leszek Gniadkowski ....
|
-
abhIShek BandI Posted 6 Months ago through Ask | 10 Points
2. So the Range is 19-22.Last record is 25. so the range is 25-25.Hope i explained clearly.Can any one give the solution for this. Its bit urgent.SELECT NUMBER INTO #TEMPFROM master..spt_values WHERE TYPE='P'AND number BETWEEN 1 AND 25AND numb...
|
-
abhIShek BandI Commented 7 Months ago through Ask | 10 Points
Thanks Jacob for explanation and ref link....
|