Viewing 15 posts - 9,721 through 9,735 (of 10,144 total)
What's your point, Karthik? Chris knows exactly what the output will be for any pair of numbers entered into his query...
July 31, 2008 at 4:17 am
Hi Jo
If this is a training exercise then you are going to learn loads about normalisation and database layout, at least until you throw your computer out of the window...
July 31, 2008 at 3:51 am
Chris, Karthik's corrected code has the same functionality but was it by design? 😛
July 31, 2008 at 3:43 am
How are you passing in your ID's?
Here's a possibility:
SELECT a.Col1
FROM table1 a
INNER JOIN (
SELECT 1 AS RowID, 2 AS col_ID UNION ALL
SELECT 2, 1 UNION ALL
SELECT 3,...
July 31, 2008 at 3:39 am
Hi Jo
This is intended to replace your stored procedure. Please note that it's untested because I don't have your data, you should test the output against your sproc.
SELECT VBR_ID, VDR_ID,...
July 31, 2008 at 3:18 am
Hi Jo, yes it is, thanks.
I'll use the view, and select from it to create the temp table with the calculations incorporated into it. Ideally you would query from...
July 31, 2008 at 2:23 am
karthikeyan (7/31/2008)
select
a.N as AccountNum
,b.N...
July 31, 2008 at 2:13 am
I see your point Karthik.
Chris's code generates repeats of 100, yours generates repeats of 1000 (multipled by the row count in your tally table). Do you think it's possible...
July 31, 2008 at 2:05 am
Hi Jo
You could convert the cursor-based update of the temp table to a set-based update like this:
UPDATE #TMP_VBR
SET
tempr1 = CASE WHEN tempr1 <> 0 THEN tempr1 + tempreti...
July 31, 2008 at 1:55 am
Test them, Karthik!
The main difference that I can see is that Chris's version will always give 10,000 rows. The number of rows your version will give, will depend on how...
July 31, 2008 at 1:39 am
karthikeyan (7/30/2008)
Create View v1as
Select Eno,Ename from e1.dbo.emp
where Eno = 5
Union All
Select Eno,Ename from e1.dbo.empmast
where Eno = 5
Now,
Select Eno,Ename from v1
Karthik, why not just join the two tables on Eno?...
July 31, 2008 at 1:19 am
VENUGOPAL.RR (7/30/2008)
i have two tables with different number of rows and no identity columns in each one
i want to join them and retrieve in single table
please help me...
July 31, 2008 at 1:17 am
James A. Lawrence (7/30/2008)
July 31, 2008 at 12:02 am
Viewing 15 posts - 9,721 through 9,735 (of 10,144 total)