Viewing 15 posts - 451 through 465 (of 2,462 total)
So having 3 schemas in one database? is this the right thing to do or should I have a 3 separate database completely?
It depends.
I have seen this done both...
-- Itzik Ben-Gan 2001
September 22, 2016 at 12:24 pm
erouse (9/21/2016)
Jeff Moden (9/16/2016)
erouse (9/16/2016)
This is my data now.
LABORLC
152685A B C D E
152969A B
This is what...
-- Itzik Ben-Gan 2001
September 21, 2016 at 3:16 pm
What Nicholas proposed will work provided that CN= always comes before OU=. Working with AD, I've see that this is not always the case. If this is how it is...
-- Itzik Ben-Gan 2001
September 20, 2016 at 3:00 pm
dbodell (9/20/2016)
-- Itzik Ben-Gan 2001
September 20, 2016 at 1:03 pm
dimpythewimpy (9/20/2016)
CREATE FUNCTION [HSIP].[Isnumeric]
(
@sResponse_string varchar(250)
)
RETURNS BOOLEAN
AS
BEGIN
RETURN
DECLARE @Output AS INT
select @Output= CASE @sResponse_string
WHEN @sResponse_string= ISNUMERIC(REPLACE(REPLACE(@sResponse_string, ',',''),'$',''))...
-- Itzik Ben-Gan 2001
September 20, 2016 at 12:27 pm
I have used SSRS for like this (as both a data input and for data retrieval) and think SSRS is terrible for this. The main problem is that you have...
-- Itzik Ben-Gan 2001
September 19, 2016 at 2:45 pm
drew.allen (9/19/2016)
JALLYKAMOZE (9/19/2016)
i need to convert a time format to another formateg. if the time format is 6, how can i convert it to 0600
please assist
TIME data DOES NOT...
-- Itzik Ben-Gan 2001
September 19, 2016 at 1:17 pm
JALLYKAMOZE (9/19/2016)
i did this:
DECLARE @Starttime...
-- Itzik Ben-Gan 2001
September 19, 2016 at 12:51 pm
Assuming the 6 in your example represents an hour you could do this:
DECLARE @time varchar(10) = 24;
SELECT MAX(CONCAT(REPLICATE(0,2-LEN(@time)),@time,'00'))
WHERE @time BETWEEN 0 AND 24;
This returns the time in military format;...
-- Itzik Ben-Gan 2001
September 19, 2016 at 12:17 pm
My solution:
-- sample data
DECLARE @sampleData TABLE (stringID int, string varchar(1000));
INSERT @sampleData
VALUES
(1, 'Day20ReminderCampaign2016_09_15_13:46:57'),
(2, 'Day3ReminderCampaign2016_09_19_02:28:39');
--Solution
SELECT
stringID,
part1 = SUBSTRING(string,1,split-1),
part2 = STUFF(REPLACE(SUBSTRING(string,split,8000),'_',''),9,0,' ')
FROM
(
...
-- Itzik Ben-Gan 2001
September 19, 2016 at 9:54 am
You can't assign the results of a query that returns multiple rows or columns to the value of a variable. This is not allowed:
DECLARE @sRESPONSE_STRING VARCHAR
set @sRESPONSE_STRING = (SELECT...
-- Itzik Ben-Gan 2001
September 19, 2016 at 9:43 am
...if I have 100 different favorite types stored in this way, that's going to be a very wide non-clustered index.
That is a potential design problem - I would consider...
-- Itzik Ben-Gan 2001
September 16, 2016 at 2:00 pm
Vendor Databases are generally not designed by database gurus which is a good thing, it helps keep us database people employed.
For a situation like this, clustered indexes, non-clustered indexes...
-- Itzik Ben-Gan 2001
September 15, 2016 at 3:14 pm
Ben Teraberry (9/15/2016)
A while back I did a C# CLR function...
-- Itzik Ben-Gan 2001
September 15, 2016 at 2:16 pm
Gazareth (9/15/2016)
DECLARE @table TABLE (stateName varchar(20), Count1 int, TotalChargeOffAmount int);
INSERT @table
VALUES
('Alabama',5,1000),
('Arizona',2,4000),
('Arkansas',3,5000);
SELECT
stateName,
Count1,
TotalChargeOffAmount,
100.0*Count1 / SUM(t1.[Count1]) OVER...
-- Itzik Ben-Gan 2001
September 15, 2016 at 1:52 pm
Viewing 15 posts - 451 through 465 (of 2,462 total)