Viewing 15 posts - 1 through 15 (of 33 total)
u can also use CLR and run all the code from T-SQL
September 14, 2015 at 7:24 am
SP1 for SQL 2014 has been released but has been redrawn because of installing issue with SSIS.
April 21, 2015 at 4:22 am
U should try to use a set-based statement, while or cursors are both loops.
I think u can use something like:
Insert into [dbo].[bt]([ref],[deprec],taxa)
SELECT col1, --do stuff here
FROM @table1
WHERE...
March 20, 2015 at 9:06 am
--do something
--do something else
--not sure what this does
--changed
March 13, 2015 at 2:25 am
having the exact same thing:
use [db1]
CREATE type dbo.ParetoValues2 as table ( RowNbr bigint primary key not null,Val float)
use [db2]
CREATE type dbo.ParetoValues2 as table ( RowNbr bigint primary key not null,Val...
August 17, 2010 at 8:19 am
The use of table-valued parameters in SQL Server 2008 removes the need for these comma separated parameters.
But if you need something like this you could use a CLR function or...
August 10, 2010 at 2:56 am
Thx I didn't know that you could do it like that.
If you run that statement and all data is consistent and the foreign key will be placed and everything new...
March 12, 2010 at 8:46 am
CREATE TABLE dbo.cnst_example
(id INT NOT NULL,
name VARCHAR(10) NOT NULL,
salary MONEY NOT NULL
CONSTRAINT salary_cap CHECK (salary < 100000)
);
-- Valid inserts
INSERT INTO dbo.cnst_example VALUES (1,'Joe...
March 12, 2010 at 8:35 am
I use this function:
CREATE FUNCTION [System].[fn_NbrOfWorkingDays] (@StartDate as datetime,@EndDate as datetime)
RETURNS int
WITH SCHEMABINDING,RETURNS NULL ON NULL INPUT,ENCRYPTION
AS
BEGIN
RETURN(
SELECT days/7*5 + days%7--calc workingdays
- CASE WHEN 6 BETWEEN...
March 12, 2010 at 8:27 am
I handle the situation by putting all my FKrelations in a metadata tables.
Then I created a procedurte that checks alle these Foreign Keys (add indexes upfront do speed up)
Next a...
March 12, 2010 at 8:22 am
This can be done with trigger and procedures I think but it won't be easy.
You can't use a foreign key based on some condition.
A trigger in which you use...
March 5, 2010 at 3:15 am
this is not a good question because you can set sql so that a new database is initiated with 1gb of size.
This is the 3d question today which the question...
January 28, 2010 at 8:41 am
the select only returns 1 2 4 5 .
this is an exception is not returned by the select, so actually i don't feel this is a good question.
I knew which...
January 28, 2010 at 8:36 am
Exists is more efficient then in but the possible anwsers; Wrong Answer, Right and Wrong .. think something went wrong here.
January 28, 2010 at 8:25 am
I'm not sure what you want but you could use:
SELECT YEAR('2010-03-22'),MONTH(DATEADD(m,1,'2010-03-22'))
or you could take year month and add 01 to create a string that you convert to datatime.
To find ast...
January 28, 2010 at 8:09 am
Viewing 15 posts - 1 through 15 (of 33 total)