Viewing 15 posts - 871 through 885 (of 1,228 total)
Faye Fouladi (4/27/2011)
The following sql statement gives this error:...any idea what is wring?
Thank you
Yep, it took about 4 seconds.
Put a PRINT statement right before the EXEC:
PRINT @SoftwareQuery
and have...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 11:25 am
Igor Savin (4/27/2011)
CREATE TABLE TAB1
(
curr tinyint NOT NULL ,
ddate smalldatetime NOT NULL ,
rate decimal(15, 4) NOT NULL ,
primary key (curr, ddate)
)
If "rate" didn't change in comparision...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 10:58 am
Hunterwood (4/27/2011)
I don't know why, but it seems as if the CTE first follow one branch to the top, before following the next, but then all by a sudden...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 7:44 am
ASFSDJG (4/27/2011)
Yes I got the solution !!SELECT Column1
FROM
(SELECT ROW_NUMBER() OVER (PARTITION BY Column1 ORDER BY Column1) As RNO, Column1
from
<Table_Name>)A WHERE RNO = 1
Here's another solution.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 6:09 am
with actuals as (...),
goals as (...)
INSERT INTO tmp_f_contrib_annual_agg (
--put column list in here
)
select
...
from actuals a
full outer join goals g
on g.credit_org_key =...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 5:47 am
Hunterwood (4/27/2011)
...Now I think you can figure it out... 🙂
/Markus
Hi Markus
I can't figure out how you have a 3.n in your third recursion.
Reference: http://msdn.microsoft.com/en-us/library/ms186243.aspx
Edit: added reference.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 5:18 am
A recursive CTE can be difficult to interpret. I find it helps to map out the first few iterations using chained CTE's like this;
;WITH CTEAnchor (x) AS (SELECT x =...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 5:05 am
Edit: Moved here.
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 5:01 am
-- Create some sample data
DROP TABLE #Temp
CREATE TABLE #Temp (Name VARCHAR(5), Attendances INT, Did_Not_Attends INT)
INSERT INTO #Temp (Name, Attendances, Did_Not_Attends)
SELECT 'North', 1, 2 UNION ALL
SELECT 'North', 2, 3 UNION...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 3:04 am
martintalero (4/26/2011)
The following code worked for me./* INSERTs companyid and industryid INTO INDUSTRYASS table */
INSERT INTO IndustryAss (CompanyId, IndustryId)
SELECT DISTINCT dbo.company.CompanyId, dbo.industry.IndustryId
FROM Company, Industry, dbo.source
WHERE dbo.source.company=dbo.Company.CompanyName and dbo.source.Industry=dbo.industry.IndustryName
GO
Here's the old...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 27, 2011 at 1:51 am
martintalero (4/26/2011)
Thanks guys it worked.
Martin, please can you post the code which works? This gives useful feedback to those who have responded to your request for assistance, and may also...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 26, 2011 at 3:39 pm
LutzM (4/26/2011)
bitbucket-25253 (4/26/2011)
GilaMonster (4/26/2011)
I don't do epic verse.Though... (read attached at your own risk, very amateur attempt)
I take exception to the words "very amateur". Read both and thoroughly enjoyed...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 26, 2011 at 3:37 pm
Grant Fritchey (4/26/2011)
ChrisM@home (4/26/2011)
Is it me, or are the posted questions from developers working on medical systems a little worrying?
I used to work for a medical software company. it was...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 26, 2011 at 3:35 pm
Is it me, or are the posted questions from developers working on medical systems a little worrying?
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 26, 2011 at 2:19 pm
krypto69 (4/26/2011)
This statement -
select distinct glaccount, 'ACCOUNT NOT FOUND' ErrorReason
from dynamicsgp_utilities.dbo.V_sfvouchers
where (sfid like 'EM-%' or sfid like 'EXP-REP%') and sfid not in
(
select pordnmbr...
For better assistance in answering your questions, please read this[/url].
Hidden RBAR: Triangular Joins[/url] / The "Numbers" or "Tally" Table: What it is and how it replaces a loop[/url] Jeff Moden[/url]
April 26, 2011 at 2:14 pm
Viewing 15 posts - 871 through 885 (of 1,228 total)