Find Jobs
Hire Freelancers

Write a couple of SQL Server Stored Procedures

$30-80 USD

Completed
Posted about 12 years ago

$30-80 USD

Paid on delivery
**Hi, I'm after someone to write two sql server stored procedures: The first one simply adds a new record to a table. If the record already exists it will update the existing one (set bit field to true). tblTimMaterialLabourLock fldInquiryRecordID - primary key fldLockTimeMaterialLabour - bit Basically I want to pass in the inquiry record id from a passthrough query and set fldLockTimeMaterialLabour to true if the record doesn't exist it will need to add it. The second procedure is more complex. It will need to add a new records to a couple of tables based on records from other tables. There are five tables tblDraftInvoice, tblDraftInvoiceSub, tblInvoice, tblInvoiceSub and tblInquiry I need to pass in an id value from tblDraftInvoice and a four letter string for fldFranchiseCode. It will copy the record from tblDraftInvoice to tblInvoice (based on the id passed in) it will also need to copy all associated sub records from tblDraftInvoiceSub to tblInvoiceSub. Once copied it will need to get the new primarykey value from tblInvoice and update fldInvoiceRecordID in the original record in tblDraftInvoice. The procedure will also need to return the new fldInvoiceRecordID when its called. Other things to note: There is a field in tblInvoice called fldInvoiceID. This is a numeric field, the procedure will need to populate a new value in here which is an increment on the highest value from tblInvoice for the franchisecode. To work out the franchise you will need to link tblInvoice to tblInquiry via fldInquiryRecordID in tblInquiry there is a field fldFranchiseCode. The franchisecode will need to be passed in when it is called it is just a four letter text value. Then get the highest fldInvoiceID from tblInvoice for the specified franchise and increment it by one. I guess you need to be careful about someone else adding a new invoice whilst the current one is run. I'm not after someone who thinks they can do it in 5 minutes, I would prefer to pay someone to spend a few hours on it (it could easily be done in a day) and ask questions so that it works correctly. **
Project ID: 2741238

About the project

5 proposals
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$40 USD in 14 days
5.0 (30 reviews)
4.8
4.8
5 freelancers are bidding on average $39 USD for this job
User Avatar
See private message.
$42.50 USD in 14 days
4.9 (16 reviews)
3.6
3.6
User Avatar
See private message.
$40.80 USD in 14 days
5.0 (1 review)
2.4
2.4
User Avatar
See private message.
$50.15 USD in 14 days
0.0 (0 reviews)
0.0
0.0
User Avatar
See private message.
$20 USD in 14 days
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Dandenong South, Australia
5.0
33
Payment method verified
Member since Jul 1, 2010

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.