Viewing 15 posts - 331 through 345 (of 444 total)
What if the query returns
1 CID 01/01/2015 NULL NULL
1 CID 01/02/2015 NULL NULL
1 CID 01/03/2015 AH 01/25/2015
1 CIE 01/01/2015 NULL NULL
?
November 18, 2014 at 3:09 am
kriskumark96 (11/17/2014)
The three queries is of the same tables with different where condition are used , so that we cannot have a join or cross join on it
Or
Is there any...
November 18, 2014 at 2:53 am
... and recompile inline TVFs of that kind (return Select * ...) too. If you just hoped to go this way. 🙂
November 17, 2014 at 6:09 am
There's one more option to update IDENTITY i.e. using ALTER TABLE ... SWITCH. To be safe intermediate table column is declared as PRIMARY KEY. So original IDENTITY column must...
November 17, 2014 at 3:30 am
Hardly we can do much without at least a table definition (CREATE TABLE) and a sample row which is not / is selected before / after ALTER TABLE.
November 17, 2014 at 2:37 am
Please provide step by step description of what you are doing to get different number of rows from the same table, starting CREATE TABLE.
November 17, 2014 at 1:58 am
in SSMS you should create two new query windows (connected to the same DB) and run
BEGIN TRAN
UPDATE tbl_Test2 SET Col = 1 WHERE Col = 1
WAITFOR DELAY '00:00:05'
UPDATE tbl_Test1...
November 17, 2014 at 12:59 am
Suppose @arg is the country application is requesting on user's behalf
select case @arg when 'USA' then State when 'Canada' then Province end as [State or...
November 14, 2014 at 6:02 am
CREATE TABLE #TEMP_TABLE
([COL2][VARCHAR] (50) NULL,,
[COL3][VARCHAR] (50) NULL,
[COL4][VARCHAR] (50) NULL)
definitely will not compile, please correct procedure code.
November 14, 2014 at 5:44 am
Try something like
declare @Period1_Total float = null;
declare @Period2_Total float = 85675786781.9;
declare @Period3_Total float = 0;
select n = coalesce(
0 + cast(0*@Period1_Total as int)
,1 + cast(0*@Period2_Total...
November 14, 2014 at 2:59 am
Jason-299789 (11/14/2014)
DECLARE @t table (Col1 char(25), col2 char(25),col3 char(25))
INSERT INTO @t (col1, col2, col3) VALUES
('AB' , 'BC' ,'DA')
SELECT
Cav.Value
,CASE...
November 14, 2014 at 2:13 am
Eirikur Eiriksson (11/14/2014)
November 14, 2014 at 1:51 am
VSP (11/13/2014)
Eirikur Eiriksson (11/12/2014)
Koen Verbeeck (11/12/2014)
David Burrows (11/12/2014)
However max(rate) over( partition by product) will not work if the rate varies +/- and the latest value by date is needed
In that...
November 14, 2014 at 12:38 am
sql_er (11/12/2014)
Check this out for another solution: http://basitaalishan.com/2012/07/01/determine-space-used-for-each-table-in-a-sql-server-database/%5B/quote%5D
Concerning quoted solution. Shouldn't it be
WHERE i.index_id > 1
instead of
WHERE i.index_id <> 0
in...
November 13, 2014 at 2:58 am
Or may be
select MName, product, QTY
, max(rate) over( partition by product)
, total_val
from test
join (select * from (values (4,'April'),(5,'May'),(6,'June')) as t(MNmbr,MName)) as Months
on Months.MNmbr = DATEPART(M,Bill_date)
Just a guess based...
November 12, 2014 at 6:10 am
Viewing 15 posts - 331 through 345 (of 444 total)