Viewing 15 posts - 571 through 585 (of 668 total)
you could do it dynamically, but not sure about the logic issue that Steve brought up.
declare @vs_sql nvarchar(1000)
IF 1 <> 0
BEGIN
set @vs_sql = '
Select ''A'' field1 INTO #myTemp1
select...
May 19, 2010 at 9:22 am
if you setup the foreign key to cascade deletes, then you won't need the overhead of a trigger. It will handle multiple deletes and you will never have orphan...
May 18, 2010 at 3:09 pm
@@Error reports the error from the line directly before it. One of the issues with it is the severity of the error. If it is 16, then you...
May 18, 2010 at 10:35 am
You might want to think about reversing the foreign key. In you scenario, you will have to insert the address first and then get the ID to put into...
May 18, 2010 at 10:14 am
do you have any table layouts and sample data? What have you tried so far? Is there a reconciled flag in the table? If you provide sample...
May 18, 2010 at 10:10 am
Do you have any DDL and sample data for us to use? Also what have you tried so far. See the first link in my signature on how...
May 18, 2010 at 10:07 am
I was able to do this using dynamic syntax and a temp table. Here's an example
declare @filname nvarchar(50), @vs_Syntax nvarchar(max)
Create table #vt_Results (XMLPath nvarchar(200))
set @filename = 'c:\File.Config'
set @vs_Syntax =...
May 18, 2010 at 9:33 am
set Ansi_Warnings off. Look at this code. The first select returns the correct number, but also the message "Warning: Null value is eliminated by an aggregate or other...
May 13, 2010 at 1:56 pm
acogswell (5/13/2010)
This isn't going to look pretty...:hehe:
d057c210-1f77-4c88-9807-23d7ff0d94a052e94064-b993-46ab-aa3f-3a9f42f8f4bd5/311005/13/2010 1:46:00 PM8624335f-ca90-4cc2-9ec3-388b7b2857e0
10405e79-a94a-4b31-ada3-594e3d9b7c77a23b7c9f-9721-48b6-8440-6d683ec41923Adam11005/13/2010 1:46:00 PM8624335f-ca90-4cc2-9ec3-388b7b2857e0
3849b2a2-37fd-4886-95f0-7fd61487e6222e9fe800-fa58-4b1f-b55e-52ea7e7705239:10 AM11005/13/2010 1:46:00 PM8624335f-ca90-4cc2-9ec3-388b7b2857e0
589fae6d-f5c2-4858-99d2-f87c3fc14b75c31a5c91-7429-4933-b2da-f73a036505b1Factory 211005/13/2010 1:46:00 PM8624335f-ca90-4cc2-9ec3-388b7b2857e0
c1b47cc6-3aff-4cd9-8996-838326e9070da23b7c9f-9721-48b6-8440-6d683ec41923John Dobbs11005/13/2010 10:41:00 AMed80718e-157a-4970-8a79-c7df29083b1f
be368f4b-0481-4b85-a71f-ce3621379d59c31a5c91-7429-4933-b2da-f73a036505b1Team-Max Gear11005/13/2010 10:41:00 AMed80718e-157a-4970-8a79-c7df29083b1f
45a341d3-6e7d-496c-9487-7a65fffb8c4a52e94064-b993-46ab-aa3f-3a9f42f8f4bd5/9011005/13/2010 10:41:00 AMed80718e-157a-4970-8a79-c7df29083b1f
d589faca-f98f-4d03-991f-3bfe48917e752e9fe800-fa58-4b1f-b55e-52ea7e7705239:101011005/13/2010 10:41:00 AMed80718e-157a-4970-8a79-c7df29083b1f
acogswell,
you can download a...
May 13, 2010 at 12:38 pm
It would be much easier if you provided table scripts and sample data. Can the project be in the table more that twice? If so, how should that...
May 13, 2010 at 10:29 am
You said that you were trying to create a unique index on date. In order to do that, you can only have one date. What were you looking...
May 13, 2010 at 8:40 am
The reason for the duplicates has to do with the join. It is returning every date and then just finding the previous time. Try this
declare @sp-2...
May 13, 2010 at 8:18 am
you can also use the output clause if the data is accessed through stored procedures. It would have to be added to each proc where the data is modified...
May 13, 2010 at 7:51 am
Henk,
here's a starting point for you.
-- Create and Populate Regions Table
declare @Regions table (RegionName varchar(30) not null)
insert into @Regions
select 'North America' union all
select 'Latin America' union all
select...
May 13, 2010 at 6:18 am
Viewing 15 posts - 571 through 585 (of 668 total)