Transfer a SQL query to VBA code

Completado Publicado hace 6 años Pagado a la entrega
Completado Pagado a la entrega

I have the following VBA code to delete data from an SQL database:

Dim strSQL As String

strSQL = "DELETE " & _

"FROM data_MonthlyBudget " & _

"WHERE TemplateSourceID = '" & Worksheets("CONFIG").Range("C16").Value & "' " & _

"AND BudgetVersionID = '" & Worksheets("CONFIG").Range("C15").Value & "'"

[login to view URL] strSQL

[login to view URL] strSQL

I need it adjusted to the following SQL query where BUDGETVERSIONNAME can be referenced to Worksheets("CONFIG").Range("C4") and TEMPLATESOURCENAME Worksheets("CONFIG").Range("C4"):

DELETE FROM dbo.data_MonthlyBudget

FROM dbo.data_MonthlyBudget mb

INNER JOIN dbo.source_Versions v on [login to view URL] = [login to view URL]

INNER JOIN dbo.source_TemplateSource ts on [login to view URL] = [login to view URL]

WHERE [login to view URL] = 'BUDGETVERSIONNAME'

AND [login to view URL] = 'TEMPLATESOURCENAME'

AND [login to view URL] = 'MonthlyBudget'

Excel Servidor de Microsoft SQL SQL Visual Basic

Nº del proyecto: #16243514

Sobre el proyecto

5 propuestas Proyecto remoto Activo hace 6 años

Adjudicado a:

katiewells3

I am an technical business analyst with 15 years professional experience building solutions with Excal, VBA, and SQL Server. I have built countless SQL scripts in VBA and would love to help you out!

$30 AUD en 1 día
(30 comentarios)
5.1

5 freelancers están ofertando un promedio de $34 por este trabajo

vano101

Hello. I have experience with both VBA and SQL. What is database you use? Microsoft Access? Thanks .

$25 AUD en 2 días
(361 comentarios)
6.7
carlosperezit

Hi I'm an expert in .Net technologies and SQL Server. I have been working in software development for the last 20 years I'm a specialist in web solutions and desktop applications I'm also available 24 x 7 Regard Más

$55 AUD en 1 día
(40 comentarios)
5.3