Viewing 15 posts - 106 through 120 (of 203 total)
select ReportId,
SUM( CASE WHEN CountryId = 1 THEN PRICE ELSE 0 END) AS COUNTRY1 ,
SUM( CASE WHEN CountryId = 2 THEN PRICE ELSE 0 END) AS COUNTRY2 ,
SUM( CASE WHEN CountryId = 3 THEN PRICE...
March 24, 2004 at 4:33 am
Let's make it even smaller
CAST(DATEPART(yyyy, datecol ) AS VarChar(4))
+ '-' + RIGHT('0' + DATENAME( wk, datecol) ,2)
March 24, 2004 at 4:22 am
Yes, it can be at table level. As per BOL (Topic: Using Extended Properties on Database Objects).
For the purposes of specifying extended properties, the objects in a SQL Server...
March 23, 2004 at 10:28 pm
can you restore your database from your production server in test enviornment and then doing the testing ? this will also bring all index / stats etc... in same state...
March 23, 2004 at 4:37 am
Does this file Physically exists on your pc ?
Also what is version of MMC on your pc ? (mmc.exe -> Help -> About )
March 23, 2004 at 4:30 am
I spent a lot of time with the SP and Profiler.
During my tests I added a Query HINT to all statement refering to #tables.
i.e. OPTION ( KEEPFIXED PLAN ) ...
March 23, 2004 at 12:36 am
I prefer to use
SELECT @PhoneID = SCOPE_IDENTITY ()
Refer to BOL for reasons. . . . . .
March 23, 2004 at 12:20 am
If this is going to be used only as a Identification purpose ...
you can either create a small table containing TableName and TableType
or
Use Extended Properties to DEFINE Table Types...
March 23, 2004 at 12:05 am
I think it is already done.
Last email that I recieved from SQL had Email subject
"SQLServerCentral.com - Reply Notification (SP Recompile causing local transaction to be distributed transaction)"
, which is...
March 22, 2004 at 11:58 pm
Do you need to keep running both MSDE and SQL 7 on same box ? As per BOL,
You cannot version switch between an installation of SQL...
March 22, 2004 at 11:55 pm
The actual proc Name does not begin with sp_
and for my test enviornment I renamed procedure to TestProc
Proc code is too long and lengthy which I would make the...
March 22, 2004 at 5:51 am
sum( case dbo.D_VEHICLE_STATUS.LIFECYCLE_STATUS_CODE
when '0' then dbo.F_VEHICLE_STATUS.VEHICLE_STATUS_UNITS
else sum(
( case when dbo.D_PORT.PHYSICAL_PORT_CODE = 'PMA' then
dbo.F_VEHICLE_STATUS.VEHICLE_STATUS_UNITS
else 0 end ) end )
every case must have a end.
March 19, 2004 at 1:39 am
In SQL,
Transact-SQL cursors are limited to fetching one row at a time. API server cursors support fetching blocks of rows with each fetch.
March 18, 2004 at 2:55 am
As per BOL,
Columns per base table is 1024
Columns per SELECT statement is 4096
Columns per INSERT statement is 1024
so if you can find out a way of pivoting...
March 16, 2004 at 11:05 pm
Viewing 15 posts - 106 through 120 (of 203 total)