Viewing 15 posts - 46 through 60 (of 65 total)
In case someone is interested, i solved it by using SET IDENTITY_INSERT ON anyway, there was no other good way...
September 25, 2013 at 11:49 am
FDS_ (9/16/2013)
Hi guys,Can i load a cursor from a procedure?
Like
DECLARE cursor_importedPatients CURSOR FOR
EXEC procedure
Thanks!
Something like this can be done, but as other mentioned, it's usually not a good idea!
IF OBJECT_ID('SP_TEST')...
September 17, 2013 at 2:35 am
DENSE_RANK should do it 😉
Or SELECT 'me' if you're a bit on the joking side...
Or:
SELECT MAX(salary)
FROM t
WHERE salary < (SELECT MAX(salary) FROM t)
September 16, 2013 at 7:28 am
wendy elizabeth (9/15/2013)
How do you create an indexed view?
Something like:
IF OBJECT_ID('INDEXED_CUSTOMER', N'V') IS NOT NULL
DROP VIEW INDEXED_CUSTOMER;
GO
CREATE VIEW dbo.INDEXED_CUSTOMER
WITH SCHEMABINDING
AS
SELECTcust_id, cust_no, zipcode, city, province -- etc
FROMdbo.customer
GO
CREATE UNIQUE CLUSTERED INDEX...
September 16, 2013 at 4:51 am
UPDATE t
SET col = CAST(col AS NUMERIC(19, 2))
FROM table_price t
?
September 16, 2013 at 2:01 am
Looks like your query won't compile since you join on non-existing v-table inside the LEFT JOIN?
Can you create an INDEXED VIEW inside the procedure that indexes the zip /state-columns?
That might...
September 15, 2013 at 10:45 am
Try MIN(ID) in the inner select and it will work i think?
September 14, 2013 at 12:44 pm
Thanks, that's what i suspected, but it's hard to get how SQL Server semantics are in this case.
September 14, 2013 at 12:33 pm
If you cast the number to numeric when building xml string you'll get rid of sc.notation
May 25, 2013 at 7:13 am
If you cast the number to numeric when building xml string you'll get rid of sc.notaion
May 25, 2013 at 7:13 am
Maybe you should take a look at Service Broker architecture if deadlocks are a big problem? All changes will be applied sequentially?
Alternatively try to understand why they occur.
March 10, 2013 at 7:07 am
For example if you have something like:
SELECT x, y FROM T WHERE A = 5
and index on column A, it might look like you're doing fine.
But if table has million...
March 8, 2013 at 8:34 am
It's not a bad idea to post the table definition, so it's possible to see what datatypes you select against and also how many rows you have in total and...
March 8, 2013 at 6:20 am
Well, you need to split the file by newlines and import content of each line into a staging table that looks something like:
CREATE TABLE dbo.t_stage (txt NVARCHAR(MAX), row_id INT IDENTITY...
October 8, 2012 at 2:05 pm
Thank you, good find of object_id thingy...
I have added my first connect item now: https://connect.microsoft.com/SQLServer/feedback/details/765777/sys-default-constraints-empty-for-temporary-tables-in-tempdb
BR,
Sergey
October 2, 2012 at 1:02 pm
Viewing 15 posts - 46 through 60 (of 65 total)