Let me preface this message by stating that i am a newbie.
Here's my senario and what I would like to do.
I have a table in a SQL database called 'users'. I want to update the a field in 'users' called 'subscription' . I want to do this for multiple users who I have listed in an excel sheet.
Excel sheet has:
[user ID] [FirstName] [LastName]
The subscriptions field has two available values:
' This user is subscribed to newsletter.'
' This user is not subscribed to newsletter.'
This is the query I currently have:
UPDATE Users
SET Subscriptions = ' This user is currently subscribed to newsletter.'
WHERE LastName = 'smith' and FirstName = 'joe'
This works great when I manually type in Joe Smith in my query, but I would like this query to automatically go through the [FirstName] and [LastName] in the Excel sheet and update the table 'users'.
Any help would be greatly apprecieated. Thanks in advance.
Here's my senario and what I would like to do.
I have a table in a SQL database called 'users'. I want to update the a field in 'users' called 'subscription' . I want to do this for multiple users who I have listed in an excel sheet.
Excel sheet has:
[user ID] [FirstName] [LastName]
The subscriptions field has two available values:
' This user is subscribed to newsletter.'
' This user is not subscribed to newsletter.'
This is the query I currently have:
UPDATE Users
SET Subscriptions = ' This user is currently subscribed to newsletter.'
WHERE LastName = 'smith' and FirstName = 'joe'
This works great when I manually type in Joe Smith in my query, but I would like this query to automatically go through the [FirstName] and [LastName] in the Excel sheet and update the table 'users'.
Any help would be greatly apprecieated. Thanks in advance.