I need to make a mass change to a field that contains an email address. Values are standard format (joe@company.com, sally@company.com, etc). I need to change all the endings to @newcompany.com. The table holds about 500 records so I would like to write an update statement to do this.
Not...
Thanks so far for the help but nothing works yet. The problem seems to be that the AccountExtra table may not have an AccountID yet. My Data looks like this:
Account Table
AccountID | Name | Field1
12345 | Test1 | x
12346 | Test2 | z
AccountExtra Table
AccountID | Field2
12345 |...
I have two tables Account and AccountExtra. Account is the primary table and the key is AccountID. AccountExtra is Left Joined via AccountID, since not every account will have data for the extra fields.
I need to update a field in the AccountExtra table when a value is true in one of the...
I'm having an odd problem I've never run into before. I run Windows XP SP2 on a corporate domain. I'll lock my Desktop while away from my desk for a few minutes. When I return and ulock it, my Taskbar will be frozen. I cannot click any of the Quicklaunch icons, open the Start Menu or switch...
Something in the syntax is killing me. Keep getting this error:
ACTUALCLOSE is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Here my code:
Select LastName,
Case DatePart(Quarter, ActualClose)
When 1 Then 2...
gmmastros...
Worked perfect, thanks. Just a little question, I need to increment the year for Q1. Fiscal Qtr1 is 1, but year is still 2005 instead of 2006. I Can't get the syntax to work right in there to increment the year. Can you help with that?
I need to create a view to summarize actual totals of orders by sales rep. It's got to be easy but, I'm a novice programmer so I keep getting lost.
My table looks like this:
Name Order Amount Date
Smith ABC 100 12/1/2005
Smith XYZ 200 12/15/2005
Smith...
I have two sheets, one contains data imported from a database the second will display parts of the data.
Sheet 1 looks something like this:
Name Qtr Amount
Smith Q1 1000
Smith Q2 1000
Jones Q1 800
Jones Q2 500
Sheet 2 looks like this:
Qtr1 Qtr2
Smith...
I have recently had to take over some DBA duties for our SQL 2000 Server. As the old saying goes: I know just enough to get myself in trouble.
We have a lot of old databases on the server that I suspect are no longer being used. Is there a way I can check the properties of the database/tables...
Here's a sample my view:
Account ID ContactID Parts Training Service
A123456 C123445 T F F
A123456 C123435 F F F
A987654 C987123 F F F
A987654 C765456 F F F
Desired...
You all have hit the point I'm at. But here's the curve ball....
If Account A has four Contacts and only one of those has a True value in boolean fields, I still get the other three records returned. I don't want that, I only want to see an AccountID if all of the contacts from that AccountID...
Here's my situation. I've got a few different ideas how to do this but, just can't wrap my head around the right solution.
I have a View with the following data. An AccountID, ContactID, then four Boolean (T/F) fields. I need to look at each AccountID, then all of the Contacts at once and...
Thanks for all your help. I suspect I'm having problems with the software that is using the scripts and not the scripts themselves. I've contacted the software vendor for further asssitance, thanks.
How about looking at this from another direction...
How can I make this statement work?
SELECT * FROM Account
Where Account = 'Test Account's'
Tried putting it in brackets and enclosing it in double quotes and it thinks its a field name and not a value.
We're still missing something. strAccount is a variable in the VB Script. The SQL Statement is being built on the fly. The SQL Statement actually looks like this when it runs:
UPDATE ACCOUNT SET ACCOUNT = 'Northern Food' WHERE ACCOUNTID = 'AB45GH6'
The problem I have is that variable...
Thanks, but I'm getting a syntax error still. The script thinks Replace is a sub-routine or function.
How about something like this....
ACCOUNT = 'Replace(" & strAccount & ","'","''")' WHERE
I know this isn't it specifically, I'm still getting an error with this.
I have a script that writes values to a SQL Database. Unfortunately some of the data contains single quotes in the name (ie. Mom and Pop's Food). I can't seem to get the right combination of quotes to to get this to work. Here is the code that works great for a simple name (ie. Northern...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.