Viewing 15 posts - 301 through 315 (of 444 total)
TheSQLGuru (12/4/2014)
December 5, 2014 at 12:58 am
🙂
Would you prefer it throwing exception on non-ASCII symbol assignment to VARCHAR ?
December 4, 2014 at 6:36 am
Do you mean something like this?
declare @AAA_Mytable TABLE(
[TermCalendarID] [int] NOT NULL,
[RegYear] int NOT NULL,
[StudentUID] [int] NOT NULL,
[QualYear1] [nvarchar](120) NULL,
[QualYear2] [nvarchar](120) NULL,
[QualYear3] [nvarchar](120) NULL,
[QualYear4] [nvarchar](120) NULL,
[QualYear5] [nvarchar](120) NULL,
[Rollover] [int]...
December 4, 2014 at 1:49 am
Based on my, may be not full, understanding of what you need
-- CREATE Archive
drop table [dbo].[Rel_ArchiveDepartment_Entities];
go
drop table [dbo].[ArchiveDepartment];
go
-- some cols made NULLable
CREATE TABLE [dbo].[ArchiveDepartment](
[SubjectID] [int] IDENTITY(1,1) NOT NULL,
[SubjectName] [nvarchar](1024)...
December 3, 2014 at 1:15 am
Try SELECT ... FOR XML
This is an example
Select
(select [@width]=150
, [@height]=20
, [@align]='center'
, [a/@href] =N'http://intranet/VA/Lists/Department Managers VIPTest Accounts/DispForm.aspx?ID='+Cast(isnull(id,0) as varchar(5))
, [a] = Cast(isnull(id,0) as varchar(5))
for xml path('TD'), type)
,(select
=150
,...
December 2, 2014 at 6:12 am
A version when no rows needed for the year where no data for the given interval exists.
declare @t table (id int identity(1,1), dt datetime, amt MONEY)
insert into @t (dt,...
December 2, 2014 at 3:58 am
Your procedure returns two result sets when the row is inserted. You may need to call SqlDataReader.NextResult() to read the second one.
December 2, 2014 at 2:02 am
Now I want to insert folders and subfolders into this parent table:
CREATE TABLE [dbo].[ArchiveDepartment](
[SubjectID] [int] IDENTITY(1,1) NOT NULL,
[SubjectName] [nvarchar](1024) NOT NULL,
[SubjectDescription] [nvarchar](1024) NULL,
[CreationDate] [datetime] NOT NULL,
[ParentID] [int] NOT NULL,
[OrganizationID] [int]...
December 1, 2014 at 7:11 am
You may build XML structured as requiered. Find samples here
http://www.databasejournal.com/features/mssql/article.php/3885251/Creating-XML-in-SQL-Server.htm
Post DDL and sample data if more assistance is needed.
November 28, 2014 at 6:24 am
Encode values according to priority, max-aggregate priority, and decode it. Something like this
select orderID
,case max(case Items.status
when 'rejected' then 1
when 'accepted' then 2
when 'awaiting' then 3
end)
when...
November 28, 2014 at 2:24 am
I've played with some real data (half a million cities around the world from http://dev.maxmind.com/geoip/legacy/geolite/) and have really got great perfomance gain when using sargable geo rectangle predicate against plain...
November 26, 2014 at 1:14 pm
It's my fault in previous script. Between predicate should be
JOIN tl on geo.latitude between tl.lead_lat - @dmiles*1.610/110.0 and tl.lead_lat + @dmiles*1.610/110.0
Now if you are still...
November 25, 2014 at 6:13 am
Have you tried to install
http://www.microsoft.com/en-us/download/details.aspx?id=13255
?
Note MS says it's for 2003R2.
November 24, 2014 at 7:04 am
Even when building the system from scratch they may be using old libraries or tricks they aren't willing to give up. Radix 60 arithmetic or something.
November 24, 2014 at 4:15 am
Viewing 15 posts - 301 through 315 (of 444 total)