Find Jobs
Hire Freelancers

sql server error

$30-250 AUD

Completed
Posted almost 3 years ago

$30-250 AUD

Paid on delivery
I need assistance with a sql server stored procedure link server issus. I have a stored procedure. In the stored procedure I have the following select @CarrierName = CarrierName from openquery([nvmdb\sqlexpress], 'SELECT [login to view URL] FROM SF_lan..dailyfreightlines INNER JOIN SF_lan..history ON [login to view URL] = [login to view URL] LEFT OUTER JOIN SF_lan..dailylabel AS dailylabel_1 ON [login to view URL] = dailylabel_1.DailyID_Foreign WHERE ([login to view URL] = ''ORD0004357'')') this works If I try and pass a variable like the following: select @CarrierName = openquery([nvmdb\sqlexpress], 'SELECT [login to view URL] FROM SF_lan..dailyfreightlines INNER JOIN SF_lan..history ON [login to view URL] = [login to view URL] LEFT OUTER JOIN SF_lan..dailylabel AS dailylabel_1 ON [login to view URL] = dailylabel_1.DailyID_Foreign WHERE ([login to view URL] = ''%s'');', @realsopnumber)) I get" Incorrect syntax near the keyword " If I try as a variable ie select @CarrierName = CarrierName from openquery([nvmdb\sqlexpress], 'SELECT [login to view URL] FROM SF_lan..dailyfreightlines INNER JOIN SF_lan..history ON [login to view URL] = [login to view URL] LEFT OUTER JOIN SF_lan..dailylabel AS dailylabel_1 ON [login to view URL] = dailylabel_1.DailyID_Foreign WHERE ([login to view URL] = @sopnumberML)'); I get "Must declare the scalar variable "@sopnumberML"." I tried set @sqlQuery = FORMATMESSAGE ( 'SELECT [login to view URL] FROM SF_lan..dailyfreightlines INNER JOIN SF_lan..history ON [login to view URL] = [login to view URL] LEFT OUTER JOIN SF_lan..dailylabel AS dailylabel_1 ON [login to view URL] = dailylabel_1.DailyID_Foreign WHERE ([login to view URL] = ''%s'');', @realsopnumber); select @CarrierName = CarrierName from openquery([nvmdb\sqlexpress], @sqlQuery); which gives the error "Incorrect syntax near '@sqlQuery'." So passing a variable in a stored procedure to a open query linked server is the problem
Project ID: 30479103

About the project

13 proposals
Remote project
Active 3 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
Hello! I hope you are doing well. I am an experienced database adminstrator using SQL for more than 8 years, but I am a newcomer in here. I have read your project description and I am very interested in your project. I can help you to fix your server error as your requirement, but need you provide more information about it first. I can start right now and will provide you top quality work for sure. Please contact to me to discuss more about the detail. Regards, Update: Thanks for giving more information about your problem, I noticed that the first attempt missed the select @CarrierName = CarrierName FROM openquery(...), whereas the second one: OPENQUERY does not accept variables for its arguments. Btw, please contact me so we can discuss more about the solution here.
$80 AUD in 1 day
5.0 (4 reviews)
2.7
2.7
13 freelancers are bidding on average $154 AUD for this job
User Avatar
Hello there, i think it's better to use with parameter is to make a string sql and then after that will execute within the openquery. Waiting for your response if interested. Thank you!!!
$150 AUD in 2 days
5.0 (22 reviews)
5.0
5.0
User Avatar
Hi I have 15 years of experience in SQL server Database development, MySQL development, postgress SQL server Database development,c#, Python and power Bi. I can help you with the project. please ping me to discuss further.
$222 AUD in 4 days
5.0 (7 reviews)
2.7
2.7
User Avatar
Hi, I am highly interested to fix the SQL server error. Please share with me more details. I have a huge experience in Webhosting administration, so I can set up, tuning, debugging apache, Nginx, PHP-fpm, and other server software. Working with WHM, CentosWP, Plesk, isp manager, or without any panel. Also, I can provide MySQL server tuning, SSL installation, and many other Linux-based server services. Thanks
$100 AUD in 1 day
4.0 (1 review)
2.5
2.5
User Avatar
Hi In my current Profession -I perfom the DBA and Developer duties in high traffic OLTP environment -Python programing,-Data Scraping using python,data analysis using python and R -Database development in (Mysql,Postgres,SQlite and SQl) -Data Mining -Automation -Data warehousing on sql,mysql and postgres database (Star Schemas) and Business Intelligence systems development -Data extractions using Talend Open Studio,Python -Data Intergration using WSO2 ,Talend Open Studio -I have rich experienced in Database Administration, Excel -Data visualisation using Power BI,BIRT ,Jasper ,excel -SQL server installations I am looking for the clear final requirements docs of your project so that I can start working immediately. If you need to discuss with me for any kind of suggestions or information, please knock me anytime. I am looking forward to hearing from you I can assure that if you work with me once, you will always work with me on these kind of projects and I can deliver quality and superior work at a price we are both comfortable with and within the agreed timeline. Kindly consider my bid.I will do whatever it takes to complete this project and earn a 5 star rating from you as well Kind Regards Takudzwa
$100 AUD in 7 days
5.0 (1 review)
0.2
0.2
User Avatar
Hi, there I am very familiar with SQL server and am ready to work on your project. If you give me a chance to show my abilities, I will provide the perfect result. Thanks
$110 AUD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Good afternoon, my name is Daniel Suniaga, I have been a database administrator for more than 8 years, I can tell you that the last example that I specify in your proposal has to do with the way in which I pass the variable, I already have what is the error and how to solve it, just accept my proposal and contact me to solve the problem.
$89 AUD in 1 day
0.0 (0 reviews)
0.0
0.0
User Avatar
Thanks for your job posting. I just checked your project carefully. So it is very motivated and interesting for me. It is an ideal match for my skill and experience. I rich experience in PHP, RestAPI, Javascript. Website Design, Web Hosting, Software Architecture, Node.js, WordPress, MySql, Web Security, Computer Security, Internet Security, Penetration Testing, Report Writing, Linux, Amazon Web Services, MS Azure. I worked as System Admin so many years. If you hire me, you would get perfect results and service asap. I hope work hardest for your success. Thanks & Regards.
$190 AUD in 2 days
0.0 (0 reviews)
0.0
0.0
User Avatar
worked for an international financial institution that uses tons of procedures and has a huge legacy db system, so my sql skills are top notch and i will gladly help you.
$200 AUD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of AUSTRALIA
Chatswood, Australia
5.0
8
Payment method verified
Member since Jun 17, 2015

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.