Viewing 15 posts - 9,361 through 9,375 (of 26,490 total)
Mindy Hreczuck (9/24/2012)
One solution would be to create a UDF instead of a view and pass in a user guid into that UDF which queries...
September 26, 2012 at 1:01 am
Yep, just this easy:
IF object_id('TempDB..#tTemp1') IS NOT NULL
DROP TABLE #tTemp1
CREATE TABLE #tTemp1(ID int, Name varchar(20))
INSERT INTO #tTemp1(ID, Name)
SELECT 1, 'NewYork'
UNION
SELECT 2, 'Virginia'
UNION
SELECT 3, 'London'
UNION
SELECT 4, 'Sydney'
UNION
SELECT 5, 'Dubai'
SELECT ID,...
September 26, 2012 at 12:55 am
Personally, I'd like to know what you have done so far, but here is a solution anyway. I know you have been give some of the code used already,...
September 26, 2012 at 12:41 am
Abu Dina (9/25/2012)
Luis Cazares (9/25/2012)
But since the rCTE is not scaling well (and it sure won't)...
September 26, 2012 at 12:07 am
Here is my code, reformatted the way I like to it.
with rCTE as (
select
t1.retained,
t1.dropped,
t1.retained as TopLevel
from
...
September 25, 2012 at 11:54 pm
Lynn Pettis (9/25/2012)
Abu Dina (9/25/2012)
But tthe solution doesn't work with the following record set:
drop table dbo.testing
create...
September 25, 2012 at 1:04 pm
Abu Dina (9/25/2012)
But tthe solution doesn't work with the following record set:
drop table dbo.testing
create table dbo.testing...
September 25, 2012 at 6:25 am
Luis Cazares (9/24/2012)
However, the problem is that it's still using a cartesian product to obtain the result.
SELECT...
September 24, 2012 at 1:56 pm
Can TotalDue every be less than 0?
September 24, 2012 at 12:31 pm
mcopa (9/24/2012)
Can I use the Copy Database wizard?
Probably. I have had issues using it myself, so I tend to script the database then use SSIS to transfer data.
September 24, 2012 at 11:41 am
If you are going from 2008 R2 to 2008, you won't be able to use the backup/restore. You will need to script your database on SQL Server 2008 R2,...
September 24, 2012 at 11:15 am
YSLGuru (9/24/2012)
Lynn Pettis (9/20/2012)
YSLGuru (9/20/2012)
Lynn Pettis (9/19/2012)
September 24, 2012 at 11:06 am
Try this:
Update cd
set coreprocesstoken18 = udb.coreprocesstoken18
FROM ContractData AS cd
INNER JOIN
(select accountnumber, sourcesystem, effectivedate, siccode, coreprocesstoken18
from RR_GMC.RCA.dbo.UDBSourceData
where sourcesystem = 'CAN'
and effectivedate = '6/30/2012') as udb ON udb.accountnumber = cd.accountnumber
September 24, 2012 at 10:57 am
Sean Lange (9/24/2012)
SQL_beginner1 (9/24/2012)
Is this a view or a table?
RR_GMC.RCA.dbo.UDBSourceData
Lynn, it's a table.
Both the source and the destination tables have the same columns, and I need to update the column...
September 24, 2012 at 10:34 am
Phil Parkin (9/24/2012)
Lynn Pettis (9/24/2012)
I came up this:--snip
Interesting image that conjures up. I didn't take in the rest of your post. :w00t:
Not feeling well today? 😉
September 24, 2012 at 10:31 am
Viewing 15 posts - 9,361 through 9,375 (of 26,490 total)