Hi!

We have a SQL for this that I made after trolling through various listservs. I'm not sure if it is the most efficient SQL (I bet someone can improve this for me!) but here is what we use:

GO
insert into Crates (CrateNumber, ProjectID, LoginID, DateMade)
select 'NC00051', 3, 'cwickell', getdate() UNION ALL
select 'NC00052', 3, 'cwickell', getdate() UNION ALL
select 'NC00053', 3, 'cwickell', getdate() UNION ALL
select 'NC00054', 3, 'cwickell', getdate() UNION ALL
select 'NC00055', 3, 'cwickell', getdate() UNION ALL
select 'NC00056', 3, 'cwickell', getdate() UNION ALL
select 'NC00057', 3, 'cwickell', getdate() UNION ALL
select 'NC00058', 3, 'cwickell', getdate() UNION ALL
select 'NC00059', 3, 'cwickell', getdate() UNION ALL
select 'NC00060', 3, 'cwickell', getdate() UNION ALL
select 'NC00061', 3, 'cwickell', getdate() UNION ALL
select 'NC00062', 3, 'cwickell', getdate() UNION ALL
select 'NC00063', 3, 'cwickell', getdate() UNION ALL
select 'NC00064', 3, 'cwickell', getdate() UNION ALL
select 'NC00065', 3, 'cwickell', getdate() UNION ALL
select 'NC00066', 3, 'cwickell', getdate() UNION ALL
select 'NC00067', 3, 'cwickell', getdate() UNION ALL
select 'NC00068', 3, 'cwickell', getdate() UNION ALL
select 'NC00069', 3, 'cwickell', getdate() UNION ALL
select 'NC00070', 3, 'cwickell', getdate() UNION ALL
select 'NC00071', 3, 'cwickell', getdate() UNION ALL
select 'NC00072', 3, 'cwickell', getdate() UNION ALL
select 'NC00073', 3, 'cwickell', getdate() UNION ALL
select 'NC00074', 3, 'cwickell', getdate() UNION ALL
select 'NC00075', 3, 'cwickell', getdate() UNION ALL
select 'NC00076', 3, 'cwickell', getdate() UNION ALL
select 'NC00077', 3, 'cwickell', getdate() UNION ALL
select 'NC00078', 3, 'cwickell', getdate() UNION ALL
select 'NC00079', 3, 'cwickell', getdate() UNION ALL
select 'NC00080', 3, 'cwickell', getdate() UNION ALL
select 'NC00081', 3, 'cwickell', getdate() UNION ALL
select 'NC00082', 3, 'cwickell', getdate() UNION ALL
select 'NC00083', 3, 'cwickell', getdate() UNION ALL
select 'NC00084', 3, 'cwickell', getdate() UNION ALL
select 'NC00085', 3, 'cwickell', getdate() UNION ALL
select 'NC00086', 3, 'cwickell', getdate() UNION ALL
select 'NC00087', 3, 'cwickell', getdate() UNION ALL
select 'NC00088', 3, 'cwickell', getdate() UNION ALL
select 'NC00089', 3, 'cwickell', getdate() UNION ALL
select 'NC00090', 3, 'cwickell', getdate() UNION ALL
select 'NC00091', 3, 'cwickell', getdate() UNION ALL
select 'NC00092', 3, 'cwickell', getdate() UNION ALL
select 'NC00093', 3, 'cwickell', getdate() UNION ALL
select 'NC00094', 3, 'cwickell', getdate() UNION ALL
select 'NC00095', 3, 'cwickell', getdate() UNION ALL
select 'NC00096', 3, 'cwickell', getdate() UNION ALL
select 'NC00097', 3, 'cwickell', getdate() UNION ALL
select 'NC00098', 3, 'cwickell', getdate() UNION ALL
select 'NC00099', 3, 'cwickell', getdate() UNION ALL
select 'NC00100', 3, 'cwickell', getdate()
GO
commit

You just want to make sure that last row doesn't contain the UNION ALL or it won't work. The 'commit' is there as I have my SQL setup to where I have to commit or rollback executions.

There is probably a better/faster way to do this, but I at the time couldn't find one that worked for what we need (Crate Number, Project it belongs to, login ID, and date made) created.

If anyone knows of improvements to this that would work the same please share!

Best,

Carly

CARLY WICKELL

Senior Database Specialist

T 3238576268

On Wed, Apr 27, 2016 at 11:52 PM, Liesbeth Schotsman <[log in to unmask]> wrote:

Hi All,

I’m interested in hearing about this as well, thanks!

Liesbeth

 

Met vriendelijke groet,

Liesbeth Schotsman
Teamleider Collectiemanagement
T +31 (0)55 577 24 66
M +31 (0)6 10 55 71 42


 

Koninklijk Park 1
7315 JA Apeldoorn
paleishetloo.nl

Van: The Museum System (TMS) Users [mailto:[log in to unmask]] Namens Alex Bancroft
Verzonden: woensdag 27 april 2016 18:34
Aan: [log in to unmask]
Onderwerp: Adding New Crates in Bulk

 

Hi All,

 

We’re trying to add about 500 crates in bulk to TMS for objects that were not previously assigned a container.  Has anyone had to do this?  We’re having trouble coming up with the most efficient way to do this.  The new crates would just need to be consecutive numbers and could be attached to their objects later.  At this point we just want the new crates in TMS.

 

Any help would be greatly appreciated!

 

Best,

 

Alexandra Bancroft

Assistant Registrar

 

 

Hammer Museum

 

10899 Wilshire Boulevard

Los Angeles, CA 90024-4343

p: 310-443-7071

f: 310-443-7099

[log in to unmask]

 

 

To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email:

signoff TMSUSERS

// eoj

You will receive a confirmation that your subscription has been removed.

To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email:

signoff TMSUSERS

// eoj

You will receive a confirmation that your subscription has been removed.


To unsubscribe, send an email to [log in to unmask] with the following commands in the body of the email:

signoff TMSUSERS

// eoj

You will receive a confirmation that your subscription has been removed.