Viewing 15 posts - 571 through 585 (of 902 total)
Agreed demon, a unique constraing on the target table is the only way to prevent this happening.
I've had a look at the data the op put up and I cant...
November 7, 2012 at 3:07 am
The inner join wont work where Id 1 which needs to return a NULL value, based on the sample data provided, so you would need a Left outer join, to...
November 7, 2012 at 2:38 am
I think they were probably testing your knowledge of Joins, it would be interesting to see what you think the solution is before putting up how I would have coded.
November 7, 2012 at 2:07 am
Also disproving that you cant make something out of nothing, as 0^0 = 1,
so if i have no money and I raise it to the power of no money...
November 7, 2012 at 2:05 am
You might want to look at this thread as its very similar to what you want to do,
http://www.sqlservercentral.com/Forums/Topic1379719-391-1.aspx
The only difference is the source table and column names and the...
November 7, 2012 at 1:51 am
Tava, you can insert the same record twice with a merge statement, heres a test rig.
Create Table #test_merge_target (
Col1 varchar(10)
,Col2 varchar(10)
)
Create Table #test_merge_source (
Col1 varchar(10)
,Col2 varchar(10)
)
Insert into #test_merge_source
values ('Acol','test data')
,('Acol','test...
November 7, 2012 at 1:45 am
Eugene Elutin (11/6/2012)
My favoured one is:
SELECT $
This also works for £ and € currency symbols. I'm not sure about other currency symbols like Yen, Roubles, etc, as it may depend...
November 7, 2012 at 1:00 am
So from this I take it that Database B has a completely different name to Database A,, eg Database A name was Test_Live, and now its called Test_Dev, and references...
November 7, 2012 at 12:48 am
Glad to Help,
You could add a where clause to check the NodePath with the FullPath column eg
WHERE hr.FullPath!=NodePath
Which should reduce the dataset, and save you having unnecessary updates.
November 6, 2012 at 8:22 am
this should work
drop table #hirNode
go
Create Table #hirNode(
hirNode Int
,hirNodeParent int
,Title varchar(100)
)
Insert into #hirNode
values (1,NULL,'Start')
,(2,1,'Second')
,(3,2,'Third')
,(4,NULL,'Start2')
,(5,4,'Second2');
WITH BuildPath(hirNode,hirNodeParent, NodeLevel, NodePath)
AS (SELECT hirNode,
hirNodeParent,
...
November 6, 2012 at 6:38 am
You could use a case to populate the values eg
Select
CASE
When Qualifer='PL' and Segment='SLN' Then 'Line Number'
When Qualifer='DV' and Segment='SLN' Then 'Department'
When Qualifer='91' and Segment='PID' Then 'Size'
ELSE NULL
END VALUE...
November 5, 2012 at 8:48 am
Eugene Elutin (11/5/2012)
There is another powerful feature which will make even viewing a stored procedure code a big hassle, it's called ENCRYPTION:Read about option ENCRYPTION in here:
The problem is that...
November 5, 2012 at 8:34 am
You might want to read this http://msdn.microsoft.com/en-us/library/ms254498(v=vs.80).aspx
Personally, I think you're doing this for the wrong reasons, and if you really want to stop people altering/deleteing SP's then a Database level...
November 5, 2012 at 7:20 am
If it is validating it has to validate every connection that you have as well as the metadata, not knowing the number of data pumps source connections will not help.
You...
November 5, 2012 at 4:27 am
You might be able to install the components BUT I dont know if that will work, see http://msdn.microsoft.com/en-us/library/ms143755(v=sql.105).aspx
November 5, 2012 at 3:48 am
Viewing 15 posts - 571 through 585 (of 902 total)