Viewing 15 posts - 406 through 420 (of 844 total)
A DBA walks into a restaurant, then runs screaming from the building. Why? All of the tables were empty.
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
May 2, 2018 at 11:04 am
What do you get when you cross a shark with a porcupine? A SQL(sea quill). Or SQL BITeS
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
May 2, 2018 at 8:13 am
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 19, 2018 at 2:54 pm
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 17, 2018 at 12:29 pm
Try this:SELECT L.Entity, L.Account,
COALESCE(R.Local_Currency_ID, L.Report_Currency_ID) AS Local_Currency_ID,
L.Report_Currency_ID,
L.Amt AS USAmt,
COALESCE(R.Amt, L.Amt) AS Amt
FROM (SELECT U.Entity, U.Account, U.Currency AS Report_Currency_ID,...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 17, 2018 at 11:51 am
CREATE TABLE #CIM_FACT
(
YearYYYY nvarchar (4) not null ,
Period nvarchar (10) not null,
Entity nvarchar (10) not null,
Account nvarchar (10) not null,
currency nvarchar (10) not null,
Amt Decimal (18, 2) not null
);
Insert INTO #cim_Fact
VALUES ('2018','January','ENT_1000','1588','USD Total',-888823191.97),
('2018','January','ENT_1000','1591','USD...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 17, 2018 at 10:07 am
You don't need the loop if you combine Sean's code with the answer you got from your other post.
https://www.sqlservercentral.com/Forums/1932209/How-do-I-count-the-number-of-occurrences-the-character-P-in-the-string
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 16, 2018 at 3:25 pm
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 11, 2018 at 10:53 am
Not sure, but give this a try:SELECT L.Entity, L.Account,
R.Local_Currency_ID,
L.Report_Currency_ID,
L.Amt,
R.Amt
FROM (SELECT U.Entity, U.Account, U.Currency_ID AS Report_Currency_ID, R.Amt
FROM Your_Table AS U
WHERE Currency_ID...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 11, 2018 at 10:09 am
There may be a better way, but here you go:DECLARE @yearMonth CHAR(7);
DECLARE @prioryearMonth CHAR(7);
SET @yearMonth = '2017-06';
SET @prioryearMonth = CONCAT(CAST(LEFT(@yearMonth, 4) AS...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 10, 2018 at 1:47 pm
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 6, 2018 at 2:06 pm
Do you know why Jeff had to get out of the construction business?
He refused to use RBAR!
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 6, 2018 at 9:43 am
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 3, 2018 at 11:56 am
Click on your profile name, up in the right corner. In your Profile look under 'Topics' for posts you've started. Click on 'Replies' for those that you've replied to.
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 3, 2018 at 10:44 am
ELTL, Is the way I would describe how I prefer to handle this data. Trying to figure out what record in a delimited file has the bad value(using ETL) when...
-------------------------------------------------------------
we travel not to escape life but for life not to escape us
Don't fear failure, fear regret.
April 3, 2018 at 7:57 am
Viewing 15 posts - 406 through 420 (of 844 total)