Transfer a SQL query to VBA code

Concluído Postado há 6 anos Pago na entrega
Concluído Pago na 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 Microsoft SQL Server SQL Visual Basic

ID do Projeto: #16243514

Sobre o projeto

5 propostas Projeto remoto Ativo em há 6 anos

Concedido 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 em 1 dia
(30 Comentários)
5.1

5 freelancers estão ofertando em média $34 nesse trabalho

vano101

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

$25 AUD in 2 dias
(361 Comentários)
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 Mais

$55 AUD em 1 dia
(40 Comentários)
5.3