Viewing 15 posts - 841 through 855 (of 1,923 total)
If your answer is YES for Dan's question, you might want to add AND T1.CilentID = T2.ClientID along with the T1.ROW = T2.Row+1 clause afterOUTER APPLY statement.
Hope that...
April 11, 2011 at 1:44 pm
Not an efficient solution, but does what you requested for
; WITH CTE AS
(
SELECT T1.Row
, T1.TransactionStatus
, T1.TransactionType
, CASE WHEN OutApp.TransactionStatus = 3 THEN 0
ELSE T1.VALUE
...
April 11, 2011 at 1:39 pm
How about this?
; WITH CTE AS
(
SELECT SELL.*, BUY.COST , BUY.TAXES , BUY.DATE BUY_DATE
, RN = ROW_NUMBER() OVER( PARTITION BY BUY.VEHICLE ORDER BY BUY.DATE DESC)
FROM #SELL SELL
INNER JOIN...
April 11, 2011 at 12:49 pm
I have been planning to write the code for this requirement since i saw this thread. But time dint permit me. But now, it has 😀
Lets first set-up the test...
April 9, 2011 at 12:20 pm
Something like this?
SELECT * FROM YOURTABLE
WHERE
( DAY(YOURCOLUMN) IN ( 2, 3, 4, 5 ,6) AND YOURCOLUMNTIME BETWEEN '10' AND '6' )
...
April 8, 2011 at 12:28 pm
Try this then:
DECLARE @Date DATETIME = GETDATE()
SELECT CASE LEFT( CONVERT(VARCHAR(50),@Date,107),3)
WHEN 'Jan' THEN REPLACE( CONVERT(VARCHAR(50),@Date,107) ,'Jan' ,'January')
...
April 7, 2011 at 5:35 pm
Like this:
DECLARE @Date DATETIME = GETDATE()
SELECT CONVERT(VARCHAR(50),@Date,107) DayInWords
April 7, 2011 at 5:12 pm
How abt this?
DECLARE @Date DATETIME = GETDATE()
DECLARE @DatePart INT = DATEPART(WEEKDAY , @DATE)
; WITH Numbers (N) AS
(
...
April 7, 2011 at 3:54 pm
How about this?
Declare @TheXMLCol XML =
cast( '<RegMultiStringLists> <RegMultiStringList Name="Type" KeyPath="" KeyFlag="0"> <Value>msdrm.dll</Value> <Value>CIAgent.DLL</Value> <Value>CIStore.DLL</Value> ...
April 4, 2011 at 6:16 pm
Like this:
select SERVERPROPERTY('ProductVersion' ) as version
, SERVERPROPERTY('Edition' ) As Edition
, SERVERPROPERTY('EngineEdition') As EngineEdition
, SERVERPROPERTY('MachineName' ) AS MachineName
, SERVERPROPERTY('ProductLevel' ) AS ProductLevel
, SERVERPROPERTY('ServerName' ) AS ServerName
April 4, 2011 at 11:52 am
Look up SERVERPROPERTY function; that will give u every detail abt your installation
April 4, 2011 at 11:48 am
this is not enuf.. We need sample data and expected output.. and your business process to arrive at the expected output..
April 1, 2011 at 1:51 am
What according to you is odd data? provide sample data, sample table structure as CREATE TABLE script and most importantly, your expected output..
April 1, 2011 at 1:17 am
Try this:
declare @WSUrid numeric
declare @WSUrnam varchar (100)
declare @WSPrice1 varchar (100)
declare @WSPrice2 numeric
declare @WholesalePrice decimal...
March 31, 2011 at 12:34 pm
Viewing 15 posts - 841 through 855 (of 1,923 total)