Viewing 15 posts - 3,631 through 3,645 (of 13,469 total)
my version:
note how i provided ready to paste-and-test code for the table and sample data?
if you can do the same in the future, you will get much better, tested answers.
With...
April 17, 2013 at 12:52 pm
chris.mcgowan (4/17/2013)
Just create a foreign key between the audit table and source table on that column that will do the trick.Chris
no foreign key for audit tables, usually, in my experience.
...
April 17, 2013 at 12:19 pm
if it were me, i would make it like this:
i added an identity, and a column at the end with a default of getdate() so i know when the record...
April 17, 2013 at 12:18 pm
CONSTRAINT [PK_JOB_POSTING_AUDIT_1] PRIMARY KEY CLUSTERED
you don't want that;
since this is an audit table, the same pk in the primary table of course would be updated multiple times.
the audit table...
April 17, 2013 at 11:57 am
you copied and pasted the exact same description, which apparently i misunderstood the first time.
copying the same thing and pasting it again doesn't help at all.
As I read it, the...
April 17, 2013 at 5:49 am
well based on how i read your description, it sounds like a simple calcuated column could be used;
ALTER TABLE [dbo].[GV_STNDetails]ADD STN AS RIGHT('0000' + CONVERT(VARCHAR,[From_StoreCode]),4) +RIGHT('000000' + CONVERT(VARCHAR,[STNID]),6) PERSISTED
if you...
April 17, 2013 at 5:24 am
did you test this script yourself yet?
does it run?
does it raise errors?
April 16, 2013 at 1:54 pm
ray is this for a web page or for a winform?
for Winforms, i usually create a binding source,
set the binding source.Datasource to your datatable, and finally set the the .Datasource...
April 16, 2013 at 12:48 pm
dbursey (4/16/2013)
Should I delete the existing linked server before running the system sp's?Thank you for your reply -
Donna
what i posted was a proof of concept; if you need to add...
April 16, 2013 at 12:36 pm
you took a picture in pointing at a mirror obviously.
that's why the steering wheel looks funny 😛
April 16, 2013 at 12:24 pm
consumable sample data: note there are gaps(no "WednesDay" data for example), so a calendar table or case will be needed to get the values:
With MySampleData(CCDATA,CCDATAcompletedTIme)
AS
(
SELECT 54,'2013-04-16 13:56:00' UNION ALL
SELECT 52,'2013-04-16...
April 16, 2013 at 12:17 pm
As far as i know, only ONE catalog will ever appear for a SQL server linked server...and that is the list of objects in the database the linked server points...
April 16, 2013 at 12:10 pm
unlike all of you guys who completed all their tax paperwork in January and already got your refunds back, my yesterday was
non stop juggling of funds so I could write...
April 16, 2013 at 12:01 pm
something like this is what i have saved in my snippets,a nd modified for your question:
SELECT * FROM
(
select name as DBNAME,STATUS,
CASE WHEN (STATUS & ...
April 16, 2013 at 8:14 am
it means that if you start a BEGIN TRAN,
if ANY error occurs in the transaction, instead of moving on to the next statement and continuing to process(the default...
April 16, 2013 at 8:03 am
Viewing 15 posts - 3,631 through 3,645 (of 13,469 total)