Viewing 15 posts - 451 through 465 (of 2,458 total)
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, ',',''),'$',''))...
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...
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...
September 19, 2016 at 1:17 pm
JALLYKAMOZE (9/19/2016)
i did this:
DECLARE @Starttime...
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;...
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
(
...
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...
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...
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...
September 15, 2016 at 3:14 pm
Ben Teraberry (9/15/2016)
A while back I did a C# CLR function...
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...
September 15, 2016 at 1:52 pm
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,
[% of Total Count] = ((Count1*1.)/CountTotal)*100
FROM @table t1
CROSS...
September 15, 2016 at 11:22 am
Phil Parkin (9/15/2016)
Steven.Grzybowski (9/15/2016)
Jeff Moden (9/14/2016)
Best way to fix this is to have a pork chop dinner with the people that are providing the data. 😉
I wish I could....
September 15, 2016 at 7:21 am
Alternatively, you could create a specialized version of DelimitedSplit8K_LEAD[/url] that handles this (I'll let you come up with a better name;-)). My modification is bold/underlined.
CREATE FUNCTION [dbo].[DelimitedSplit8K_LEAD_XX]
--===== Define I/O...
September 14, 2016 at 3:53 pm
What lptech posted may help. This is a pretty simple task. The way I would approach it is to:
1. Create a script task (whatever language works for you) that compares...
September 14, 2016 at 3:14 pm
Viewing 15 posts - 451 through 465 (of 2,458 total)