Viewing 15 posts - 1,156 through 1,170 (of 1,228 total)
Hamid-Sadeghian (2/16/2010)
No.This is a real number.Because this number is referenced.When Accountant archive voucher this number is reference in the archive.
Voucher number is a business entity, it could just as easily...
February 17, 2010 at 3:35 pm
SELECT 'step1' AS Step, tab1.*, tab2.*
FROM tab1
INNER JOIN tab2 ON tab2.postalCode = tab1.postalCode
UNION ALL
SELECT 'step2' AS Step, tab1.*, tab2.*
FROM (
SELECT tab1.*
FROM tab1
LEFT JOIN tab2 ON tab2.postalCode = tab1.postalCode
WHERE tab2.postalCode IS...
February 17, 2010 at 2:38 pm
In addition to the corrections which Lynn pointed out:
If @CurrentPartNumber<>@PartNumber
begin
--Do something
...
February 17, 2010 at 12:50 pm
lmu92 (2/13/2010)
ChrisM@home (2/13/2010)
lmu92 (2/13/2010)
And here's what I came up with (@ Chris: yes, a bunch of CTE's again :-D)Who needs CTE's? 😛
Maybe someone who looks at execution plans and wonder...
February 13, 2010 at 11:54 am
Tim Januario-145496 (2/13/2010)
You actually can't do what you are trying to do very easily.
You can, and it looks ok, but you wouldn't want to;
DECLARE @CurveId varchar(60)
SET @CurveId = ','...
February 13, 2010 at 10:48 am
Hi Elias
Thanks again for testing this out. It's a good improvement, but still way short of expectations. Looks like time for plan B :blush:
May I suggest you send me a...
February 13, 2010 at 9:51 am
surya-434952 (2/12/2010)
Hi i have two tables Periods
A single date doesn't constitute a period. I've assumed that a "period" is represented (in the periods table) as follows:
startdate is the date...
February 13, 2010 at 5:25 am
lmu92 (2/13/2010)
And here's what I came up with (@ Chris: yes, a bunch of CTE's again :-D)
Who needs CTE's? 😛
SELECT p.PeriodStart, p.PeriodEnd, da.Dept, da.Acct,
ISNULL(s.[Date], p.PeriodEnd), ISNULL(s.Credit, 0) AS Credit,...
February 13, 2010 at 5:14 am
Hi Elias
Here's version 2. The facility string store has been removed and replaced with conventional processing. Collateral balances are only stored when they need to be, and are removed when...
February 13, 2010 at 4:55 am
Please edit and correct your sample data script. There's a UNION ALL on the last SELECT for #periods, when this is corrected there are further errors:
Msg 207, Level 16, State...
February 13, 2010 at 2:29 am
Luckbox72 (2/12/2010)
SET @query=
'SELECT * Into #tempTable FROM
(SELECT RepID, State
FROM RepBDState) src
PIVOT (count(State) FOR State IN ('+@listCol+')) AS pvt'
EXECUTE (@Query)
select * from #tempTable
and when run I get the following
(236...
February 12, 2010 at 3:21 pm
Jeff Moden (2/12/2010)
@sqlserver12345,Any feedback on this? Did any of this work for you?
This is what happens when candidates are left alone in a room with a written test and...
February 12, 2010 at 3:07 pm
Hi Elias
Thanks for giving it a try. "Make it work, make it fast, make it pretty". There's plenty of scope for improvement.
Firstly, as you suggest, perhaps only one string store...
February 12, 2010 at 2:35 pm
Dupe = ROW_NUMBER() OVER(PARTITION BY Col1 Col2 Col3 Col4 Col5 Col6 ORDER BY Col1 Col2 Col3 Col4 Col5 Col6 Col7)
If you set up your sample as a CREATE TABLE...
February 12, 2010 at 2:05 pm
Hi Elias
Thanks for being so patient.
Don't forget - always test.
-- data setup
DROP TABLE #Working
DROP TABLE #zzzCovers
CREATE TABLE #zzzCovers(
[CollateralID] [nvarchar](50) NOT NULL,
...
February 12, 2010 at 8:01 am
Viewing 15 posts - 1,156 through 1,170 (of 1,228 total)