Help w SQL query

Howdy,

can anyone help me with a SQL query to change global customers to local?

I briefly used HQ at a second location,  now I am only using SO and am 
having issues updating customers who were entered while we were using HQ 
because they are marked as global customers.

I need a sql query/ statement that will change all customers to local custmers
thanks
-- 
Jon Kahn
Confluence Kayaks
0
11/29/2004 10:53:02 PM
pos 14173 articles. 0 followers. Follow

4 Replies
276 Views

Similar Articles

[PageSpeed] 7

ALWAYS create a backup of your database before running ANY Insert, Update or 
Delete statement!

UPDATE Customer SET GlobalCustomer = 0

-- 
Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the 
newsgroup so that all can share the information



"confluencekayaks" <confluencekayaks@discussions.microsoft.com> wrote in 
message news:48661854-8959-412F-98DB-62E472446863@microsoft.com...
> Howdy,
>
> can anyone help me with a SQL query to change global customers to local?
>
> I briefly used HQ at a second location,  now I am only using SO and am
> having issues updating customers who were entered while we were using HQ
> because they are marked as global customers.
>
> I need a sql query/ statement that will change all customers to local 
> custmers
> thanks
> -- 
> Jon Kahn
> Confluence Kayaks 


0
glenn1806 (721)
11/29/2004 11:42:08 PM
Thank You Glenn
That worked Perfectly


"Glenn Adams" wrote:

> ALWAYS create a backup of your database before running ANY Insert, Update or 
> Delete statement!
> 
> UPDATE Customer SET GlobalCustomer = 0
> 
> -- 
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the 
> newsgroup so that all can share the information
> 
> 
> 
> "confluencekayaks" <confluencekayaks@discussions.microsoft.com> wrote in 
> message news:48661854-8959-412F-98DB-62E472446863@microsoft.com...
> > Howdy,
> >
> > can anyone help me with a SQL query to change global customers to local?
> >
> > I briefly used HQ at a second location,  now I am only using SO and am
> > having issues updating customers who were entered while we were using HQ
> > because they are marked as global customers.
> >
> > I need a sql query/ statement that will change all customers to local 
> > custmers
> > thanks
> > -- 
> > Jon Kahn
> > Confluence Kayaks 
> 
> 
> 
0
11/30/2004 4:57:04 PM
I hope somone reads this and can help.  I imported my item database, and even 
though the taxid and vendor are in there (SQL statement), when viewing the 
part in Manager, it is not updated.

Suggestions?

"Glenn Adams" wrote:

> ALWAYS create a backup of your database before running ANY Insert, Update or 
> Delete statement!
> 
> UPDATE Customer SET GlobalCustomer = 0
> 
> -- 
> Glenn Adams
> Tiber Creek Consulting
> http://www.tibercreek.com
> glenn@tibercreek.com
> ----------------------------------------------
> Please DO NOT respond to me directly but post all responses here in the 
> newsgroup so that all can share the information
> 
> 
> 
> "confluencekayaks" <confluencekayaks@discussions.microsoft.com> wrote in 
> message news:48661854-8959-412F-98DB-62E472446863@microsoft.com...
> > Howdy,
> >
> > can anyone help me with a SQL query to change global customers to local?
> >
> > I briefly used HQ at a second location,  now I am only using SO and am
> > having issues updating customers who were entered while we were using HQ
> > because they are marked as global customers.
> >
> > I need a sql query/ statement that will change all customers to local 
> > custmers
> > thanks
> > -- 
> > Jon Kahn
> > Confluence Kayaks 
> 
> 
> 
0
BillFry (61)
2/23/2006 1:05:27 AM
Not sure about the TaxID, but you need to insert a record into SupplierList 
to link an Item to a Supplier.  Item.SupplierID only indicates the Default 
Supplier - it does not create the SupplierList link on it's own.

This is the bare minimum statement to add SupplierList records for the 
default suppliers listed in your Item Table.  This is assuming that your 
SupplierID field in the Item Table has the correct Supplier IDs, which it 
may not...

As always, MAKE A BACKUP OF THE DATABASE BEFORE RUNNING THIS STATEMENT!

insert into supplierlist (ItemID, SupplierID, Cost, ReorderNumber, 
MasterPackQuantity, MinimumOrder, TaxRate)
select i.ID, i.SupplierID, 0.00, '',0,0.0,0.0
    from Item i left join supplierList sl on i.id = sl.ItemID and 
i.SupplierID = sl.SupplierID
    where sl.ID is null

-- 
-- 
Glenn Adams
Tiber Creek Consulting
http://www.tibercreek.com
glenn@tibercreek.com
----------------------------------------------
Please DO NOT respond to me directly but post all responses here in the
newsgroup so that all can share the information

"Bill Fry" <BillFry@discussions.microsoft.com> wrote in message 
news:A5F8CE5D-AAAC-4687-BDB2-B62DE2CEE06D@microsoft.com...
>I hope somone reads this and can help.  I imported my item database, and 
>even
> though the taxid and vendor are in there (SQL statement), when viewing the
> part in Manager, it is not updated.
>
> Suggestions?
>
> "Glenn Adams" wrote:
>
>> ALWAYS create a backup of your database before running ANY Insert, Update 
>> or
>> Delete statement!
>>
>> UPDATE Customer SET GlobalCustomer = 0
>>
>> -- 
>> Glenn Adams
>> Tiber Creek Consulting
>> http://www.tibercreek.com
>> glenn@tibercreek.com
>> ----------------------------------------------
>> Please DO NOT respond to me directly but post all responses here in the
>> newsgroup so that all can share the information
>>
>>
>>
>> "confluencekayaks" <confluencekayaks@discussions.microsoft.com> wrote in
>> message news:48661854-8959-412F-98DB-62E472446863@microsoft.com...
>> > Howdy,
>> >
>> > can anyone help me with a SQL query to change global customers to 
>> > local?
>> >
>> > I briefly used HQ at a second location,  now I am only using SO and am
>> > having issues updating customers who were entered while we were using 
>> > HQ
>> > because they are marked as global customers.
>> >
>> > I need a sql query/ statement that will change all customers to local
>> > custmers
>> > thanks
>> > -- 
>> > Jon Kahn
>> > Confluence Kayaks
>>
>>
>> 


0
glenn9672 (1267)
2/23/2006 2:53:55 PM
Reply:

Similar Artilces:

TRIM FUNCTION in QUERY
Hello, What do I put to trim off the spaces after a value in query? The table is obtained from ODBC link and the values on a field somehow got spaces. Example: My field in the query is: WC: PO_WORKCENTER_ID Not sure WC: TRIM(PO_WORKCENTER_ID) ???? That should work. -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Cam" wrote: > Hello, > > What do I put to trim off the spaces after a value in query? The table is > obtained from ODBC link and the values on a field somehow got spaces. Example: > > My...

Change a series w/ a ComboBox
I would like to change a range name refernced in a charted series by using a control combobox so that if i want to see a differnt series, all i have to do is select it. I was thinking of using a lookup function that refernces the numerical output of the control but the series formula won't read the formula or a cell reference as text. =SERIES(OAS!$A$11,'Index-HistoricalPricing ML Vers 2.xls'! DATE,'Index-HistoricalPricing ML Vers 2.xls'!Chemicals,1) Chemicals is the range name, is there a way to replace it with a formula or cell refernce. I can probably code this b...

Button/Macro Not Working, Help!
I have a macro that pulls up Report Manager and prints out pre-define views. The macro works fine only after I use Report Manager the firs time. If I exit my workbook and Excel, then return to it, th button/macro does not function. Nothing happens until I manully us Report Manager again. Is there a bug with this or am I missin something -- Message posted from http://www.ExcelForum.com Post your code. Gord Dibben Excel MVP On Thu, 20 May 2004 08:38:55 -0500, baston <<baston.16k4at@excelforum-nospam.com>> wrote: >I have a macro that pulls up Report Manager and prints out pre...

Custom reports/queries across multiple companies in Business Porta
Is there any way to create a custom query or report that can be run inside Business Portal and which pulls figures from multiple Great Plains companies. Thank you. A View can be constructed in one database that pulls data from other databases. This view can then be used as the source for reports in tools like Crystal etc -- Richard L. Whaley Author / Consultant / MVP Documentation for Software Users Get our Free Tips and Tricks Newsletter and check out our books at http://www.AccoladePublications.com "KT" wrote: > Is there any way to create a custom query or report th...

Saving Excel workbook in SQL server using c#
Could anyone please help me out as to how we can save the excel workbook in the database and read it back. I was able to convert the text files and image files into binary format and save them to the DB and finally able to retrive them back in the same format. But was unable to do same for the excel object. Your help will be greatly appreciated. Thanks, regards, jitender ...

query with inline dummy table
Is there a way in Access to create a query that contains the table records within the query itself? I want to avoid creating a dummy table and just use values within the query definition. I was thinking about using syntax similar to the insert into statement I would use to populate the dummy table, but I'm not sure if I have a syntax problem or I'm trying to solve an impossible problem. The query I'm thinking of might look something like this: select * from values("test"); -or- select * from ( ("1/1/07","2/1/07","3/1/07","4/1/07&qu...

Create form similar to MS Access 2000 Help
Is it possible to create a form that works similar to the Help - Index form in Access 2000? My StreetTable consists of the following fields: Street_ID(autonumber), StreetName(text), Directions(memo). I want to be able to type the beginning letters of the street and the List of StreetNames continually reduces until I see the street I need in the StreetNames window. I would then click on that street and the Directions would appear in the third window panel. Since I'm dealing with approx. 5000 streets, scrolling really isn't an option that I want to consider. I found that a combo ...

HELP: Excel userform version control issue
Hi All, I have an excel userform that is posted on my companys intranet. The issue I am having is, users are saving this form to their hard drive and then using it(Instead of launching it everytime from intranet), SO basically when I have a new version of form on intranet they still use the old version as they have a habbit of saving it on their hard drive. Is there a way to resove this? something like they would see a popup message saying that "This is an older version that you are using, Please launch the form from Intranet for newer version". Thanks in advan...

Problem Printing w/Calendar Assistant
Every time I attempt to print a calendar using the Assistant it prints one page and then stops. I have tried to print multiple pages of a weekly calendar and each time it prints one week and then stops. I love the layout and colors of the calendar but I can not get more than one weekly calendar to print no matter how many weeks I select to be printed. Calendar Printing Assistant is known to be quirky. It works best with Outlook 2007. I cant say i know a fix for your issue. However, if you cant work around for this issue or you need a better printing solution, consider using...

Outlook attachment problems
Dear Our oversea office sender using Outlook Sending message (HTML) insert a picture sending message to my office, when I have received the attachment auto duplicate one set in the message. I have asked the sender try remove the picture and FORWARD to my e-mail, but the attachment sill in the message and auto duplicate one set attachment. Out overseas office using MS SBS , user setup WG mode for outlook download message. I am not sure which part problems or virus effect. Please advice how to solve out the problems ASAP. JACKIE ...

Help with
I am currently in the process of migrating exchange 2000 to exchange 2003 on new hardware. I have transfered the RUS role, offline address book role and replicated the public folders ect. and now am beginning to move maiboxes. I noticed 3 very repetive errors in the application event log however. I was wondering if someone could tell me whether these messages are somthing I should be concerned with. See them below. So far I have no user complaints about outlook. Thanks. Event ID: 9320 Source MSExchangeSA Type Warning Description OALGen could not generate full details for some en...

Help with Inbox repair tool please
I have a problem with my outlook 2000 and have been advised to use the inbox repair tool. I have opened the inbox repair tool, and I am asked to enter the folder name or to browse and enter the location of the folder, I need to enter the delete items folder but do not know where to find it. Any help appreciated. John The Inbox Repair Tool works against Personal Folders Files (.PST files), not against individual folders within the .PST file. If you don't know where your .PST file is located, you can find it this way: In Outlook, make sure the Folder List is visible (View | Folder...

Help; how do i change the waiting circle (in IE tab) to anything e
I am making a website and i have a lot of wait time for my server-side pages to do their work. The waiting circle icon gives me a headache so I would like to change that to something else please. I remember IE6 had a great Microsoft Flag logo that would wave while a page would load. Could I get IE8 to use this logo? Sorry Trozza, you can't. "Trozza Mited" <Trozza Mited@discussions.microsoft.com> wrote in message news:9C401644-2391-4317-92BD-D7F3DFD2B06C@microsoft.com... > I am making a website and i have a lot of wait time for my server-side > p...

Help With Problem: Nested IF Function, Office2K v Office2003
Hello Group, I'm looking for some help with a nested IF worksheet function. Shown below is a formula that I'm using in a model. =SUM(IF(worksheet!$A$3:$A$54=DATEVALUE("9/1/2005"),IF(worksheet!$B$3:$B$54="<90",worksheet!$C$3:$C$54,0),0)) If short, what I'm trying to do is scan the data in two columns and for any cells which meet the TRUE case in both columns, then sum the third numbers for all cases returning TRUE-TRUE. If either cell returns a FALSE, then enter 0. I created the original formulas and model in Office2000 and have used the model for more tha...

Options Group and Query Criteria, revisited
I recently posted a question about option groups passing info to a query for a Yes/No field, and received some great advice. However, I've tried to apply that advice in a similar way to a Date field, to no avail. In the query, I want the user to be able to display (1) only records with dates present or (2) only records without dates present or (3) all records. I changed the query criterion that worked for the checkbox as follows, and placed it under the Date field which I want to select by (this statement yields no records): IIF([forms].[fmQryByClinicSurveys].[emailOptions]=1...

Please help with New Database Query
Newbie to New Database Query - Can you change a spreadsheet to a table if so how? I have a lot of spreadsheets that I would like to work with in New Database Query. Can this be done. Any help will be greatly appreciated. In general, if you select a range and give it a name....MS Query will recognize it as a data source: Example for data in Cells A1:Z500, with column headings (EmpID, FName, Lname, etc): Select A1:Z500 In the Names box (just above the Col_A heading) type rngMyData1 Press [Enter] Next, save your workbook. Then...Data>Import External Data>New Database Query When y...

Spreadsheet Query
One of my clients has devised a list of items in a Microsoft Excel spreadsheet. Against each item (in a different cell) is an amount in �, which represtents the items value. My client wants to be able to use this spreadsheet, so that he can select all items under �6,000 for example. Is this possible in Excel, or should he be using a database ? Any suggestions would be appreciated. Michael. Hi Michael click in the list, choose data / filter / autofilter from the drop down list on the value column choose custom set the first box to less than and type 6000 in the second - click OK - to...

Skip Query Parameter
Dear All I Have a combo box that is feeding a query parameter to filter some rows. sometimes I want to view all records. the row source for this combo box is a table assigned only for that. and I want to add this option to be displayed in the combo box "View All". So I will add a new record in that table that will have the value of "View All" then the filter will not work. how can i solve it ? The data type in this combo box is "text". and I have similar case for "Date" Data type in text box. Thanks -- M.A.Halim mmhalim@hotmail.com Dear "M.A....

MS Query help required
Hi I have a spreadsheet on my notebook which I use for DBA services at a particular client. It connects to database server via an existing ODBC database connection extracting data from system tables. I would like to be able use this spreadsheet at other clients, WITHOUT having to create a new ODBC connection. Is there any way that this can be accomplished? The ideal scenario would be that the logon credentials and server address reside on one sheet and upon arrival at another client, one merely changes this information and then queries the database. Any help would be appreciated. Regards -...

Missing lines in chart w/x-axis with months 1-24...
First post from a "casual" Excel user (more familiar with SigmaPlot)... Client wants a line chart with x-axis linear (baeline to 36 months) but there are only data for 2 baseline conditions and certain months: on-drug off-drug M3 M6 M12 M24 M36 The Y axis (# of pellets) is nothing special. I entered blank rows, corresponding to the missing months, into the datasheet, like so: on-drug off-drug M3 M6 M12 (etc.) This "method" plots the data points okay, but there are 2 problems: (a) there are no lines connecting them, and (b) the x-axis labels are lousy I work...

opencurrentdatabase error/help
dears, im opening an access03 database with vb6 like application.opencurrentdatabase("c:/documents and settings/admin/folder/database.mdb",true,"password") application.docmd.open"myform" application.docmd.maximise docmd.maximise included in form open event also in the database kindly help me with (1) after this code runs access opening with small rectangular window(half of screen vertically) even all access databases are opening this way (2) if the above said path changes for the database error 7866 occuring in error event i would like to include some c...

Need help with a formula 01-23-10
I am looking for a formula that will compute an average of a number of non contiguous cells such as G8, G16, G24, G36, etc. Each of these cells has a formula which computes an average of a range of cells. With the helpm of this forum, I have been able to find a formula which does that AND uses values only when they are greater than zero and does not display #DIV/0!. But I cannot fin a fromula that will do the next step- Take an average of those specific cells AND use only the ones where the cell is >0, Example G8=100, G16=85, G24 is blank, G36=75, then this formula would ca...

IF problems, PLEASE HELP!!!
Hello, I am having trouble with "IF" I need to be able to say: IF E4 is 0-550: "start up"; 551-650: "moderate";651-850: "gettin there"; >850: "got there" How do I write this as a forumla? Let Me Know -- ryangruh ----------------------------------------------------------------------- ryangruhn's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1603 View this thread: http://www.excelforum.com/showthread.php?threadid=27497 try this dude! =if(and(e4>=0,e4<=550),"start up",if(and(e4>=551,e4...

help me understand excel!!!!!!!!!!!!!!
My job needs input info.... plzzzzzzz if you can help........... Help you how? CountryGirl Wrote: > My job needs input info.... plzzzzzzz if you can help.......... -- BenjieLo ----------------------------------------------------------------------- BenjieLop's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1101 View this thread: http://www.excelforum.com/showthread.php?threadid=27035 you need to be more specific, what are you trying to do ? bobf "CountryGirl" wrote: > My job needs input info.... plzzzzzzz if you can help.....

excel footer / header help
I'm trying to add the file path to the footer of my worksheets. Anyone know where or how? I can and file name & tab, but not path. Thanks, Jason. What version, Jason? ******************* ~Anne Troy www.OfficeArticles.com "Jason - MR" <Jason - MR@discussions.microsoft.com> wrote in message news:F955ED37-9DE4-4988-A371-F32354E7841D@microsoft.com... > I'm trying to add the file path to the footer of my worksheets. Anyone know > where or how? I can and file name & tab, but not path. Thanks, Jason. Its Office 2000. Thx. "Anne Troy" wro...