Viewing 12 posts - 1 through 12 (of 12 total)
Elliott W (2/23/2010)
1. Temp table names have no meaning (might just be example).
2. DG1, DG2, and DG3 should have been trimmed when they were inserted into #temp5.
Suggestions/Issues
1. [highlight=#ffff11]You...
February 24, 2010 at 3:30 am
I assume, after truncating the stage tables you are refilling them in one shot. In that case there will be performance gain in scenario 2.
Two reasons:
1. Indexes need not...
February 17, 2010 at 4:21 am
If you want to show sales by account and product family and year on columns, you can create a matrix report in SSRS using a query like:
SELECT ...
February 16, 2010 at 6:53 am
You can use SQL Server Import and Export Wizard. Right click on your source database, select Tasks->Export. The wizard will guide you.
February 16, 2010 at 5:12 am
Can you provide table structure and sample data?
February 16, 2010 at 4:53 am
What about using the following query to check the log size?
select sum(size*8/1024) LogSize from sys.database_files where type = 1
February 16, 2010 at 12:43 am
WITH CTE_temp(P_Sequ,description,c_sequ,Level,nodepath)
AS
(
-- Root
Select t1.P_Sequ,t1.description,t1.c_sequ,0 As Level, '0.'+ CAST(t1.P_Sequ AS VARCHAR(MAX)) nodepath
from tabA t1
where c_sequ = 0
UNION ALL
-- child
Select t2.P_Sequ,t2.description,t2.c_sequ,Level+1 As Level,
nodepath + '.' + CAST(t2.P_Sequ AS VARCHAR(MAX)) nodepath
from...
February 15, 2010 at 4:21 am
If you just want to capture new value in a variable:
DECLARE @newValue VARCHAR(10)
UPDATE myTable
set @newValue=myField=
CASE
WHEN myField='A'
THEN 'X'
ELSE 'D'
END
WHERE myID= 100
February 8, 2010 at 3:16 am
I think you are looking for ISO week number. Check following links:
http://www.sqlservercentral.com/articles/Advanced+Querying/onthetrailoftheisoweek/1675/
http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/iso-week-in-sql-server
February 5, 2010 at 3:59 am
If I understood your question properly, the following query will work:
SELECT * FROM ORDERS WHERE DATE IS NOT NULL
and (CLIENT not in ('X','Y')
or (CLIENT in ('X','Y') and CURRENCY...
February 5, 2010 at 12:23 am
Viewing 12 posts - 1 through 12 (of 12 total)