Viewing 15 posts - 9,031 through 9,045 (of 26,490 total)
Kyalo (1/7/2013)
January 7, 2013 at 6:29 am
nitin_456 (1/5/2013)
Is there any other way to achieve this without CTE.
Not sure why you don't want the cte version, but this works (though untested):
SELECT A.House_acc ,
...
January 5, 2013 at 10:08 pm
Cadavre (1/4/2013)
Lynn Pettis (1/4/2013)
Actually:
DELETE FROM TABLE WHERE (CREATION_D = DATEADD(DAY, DATEDIFF(DAY, 0, ?? ), 0));
SET NOCOUNT ON;
DECLARE @a DATETIME;
SET @a = GETDATE();
--First
SELECT DATEADD(DAY, 0, DATEDIFF(DAY, 0, @a ));
--Second
SELECT DATEADD(DAY, DATEDIFF(DAY,...
January 4, 2013 at 10:24 am
Cadavre (1/4/2013)
Lynn Pettis (1/4/2013)
Actually:
DELETE FROM TABLE WHERE (CREATION_D = DATEADD(DAY, DATEDIFF(DAY, 0, ?? ), 0));
SET NOCOUNT ON;
DECLARE @a DATETIME;
SET @a = GETDATE();
--First
SELECT DATEADD(DAY, 0, DATEDIFF(DAY, 0, @a ));
--Second
SELECT DATEADD(DAY, DATEDIFF(DAY,...
January 4, 2013 at 10:16 am
Cadavre (1/4/2013)
10e5x (1/4/2013)
Delete from TABLE where (CREATION_D = ?)
CREATION_D is the column i am...
January 4, 2013 at 8:54 am
Not enough single quotes in your dynamic sql:
DECLARE @sql VARCHAR(max)
SET @sql = '
; WITH list_cte (table_name,field_name,fld_id,sql_value,field_value,exporttype)
AS
(
SELECT table_name,field_name,fld_id,CAST('''' AS VARCHAR(8000)) as sql_value, CAST('''' AS VARCHAR(8000)) AS field_value,exporttype
FROM #configdetail
WHERE LEN(LTRIM(RTRIM(table_name))) >...
January 4, 2013 at 8:37 am
SQLRNNR (1/3/2013)
dineshbabus (1/3/2013)
oh.. unique constraint can allow more than one null value.. I don't think so.. Please give me some xample...Here is the example
Took this a bit further. You...
January 4, 2013 at 8:30 am
Sean Lange (1/4/2013)
January 4, 2013 at 8:12 am
karthik_ayyagari (1/4/2013)
For the time being can you write a procedure which can calculate number of weekends between two datetimes so that i can delete the n*48 hrs from the...
January 4, 2013 at 7:22 am
I don't have time right now to do anything real with the code, but if anyone is interested I have reformatted the code to make it a little bit easier...
January 4, 2013 at 6:12 am
Bhuvnesh (1/3/2013)
SELECT CompanyName, 'Low' as Type,
[Sunday],...
January 4, 2013 at 3:53 am
zombieisdead2020 (1/3/2013)
The recursive CTE may not scale well as the length of the strings increase. Both sets of options really need to be tested to determine which is better...
January 3, 2013 at 8:14 pm
zombieisdead2020 (1/3/2013)
declare @t table(id int, string varchar(500))insert @t values (1,'abcABC,0123456789~!@'),(2,'123abcdefghijklmnopqrstuvwzyz');
with cte1 as
(
select id,
0 nbr,
cast(string as...
January 3, 2013 at 5:20 pm
Viewing 15 posts - 9,031 through 9,045 (of 26,490 total)