Changing a column collation - problems?

Hello,
I have a VFP database that was migrated to SQL Server 2012. One of the VFP table's PK's utilized uppercase and lowercase values to distinguish rows, which of course does not fly by default in SQL Server.
Rather than having to redesign this part of the application and go through a data conversion, I'm thinking of changing the collation of this PK column and related FK fields to be case sensitive. On the surface it sounds like this would solve my
issue and the app would function as it always has.
Is there anything that would make me think twice about doing this?
Thanks.
Bill

Hi,
Be aware that changing collation at individual fields may break your queries.
Look at the following sample :
USE YourTestDB
SET NOCOUNT ON
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
CREATE TABLE tblX(X CHAR(10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, CONSTRAINT PK_tblX PRIMARY KEY CLUSTERED (X ASC))
CREATE TABLE tblY(Y CHAR(10) COLLATE Latin1_General_100_BIN NOT NULL, CONSTRAINT PK_tblY PRIMARY KEY CLUSTERED (Y ASC))
INSERT INTO tblX VALUES ('A');
INSERT INTO tblX VALUES ('B');
INSERT INTO tblX VALUES ('C');
INSERT INTO tblX VALUES ('D');
INSERT INTO tblX VALUES ('E');
INSERT INTO tblY VALUES ('A');
INSERT INTO tblY VALUES ('C');
INSERT INTO tblY VALUES ('E');
INSERT INTO tblY VALUES ('G');
INSERT INTO tblY VALUES ('I');
SELECT tblX.X, tblY.Y FROM tblX INNER JOIN tblY ON tblX.X = tblY.Y
-- Gives the following error
-- Msg 468, Level 16, State 9, Line 20
-- Cannot resolve the collation conflict between "Latin1_General_100_BIN" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
-- You'll have to rewrite your query as follows
SELECT tblX.X, tblY.Y FROM tblX INNER JOIN tblY ON tblX.X COLLATE Latin1_General_100_BIN = tblY.Y
-- Or
SELECT tblX.X, tblY.Y FROM tblX INNER JOIN tblY ON tblX.X = tblY.Y COLLATE SQL_Latin1_General_CP1_CI_AS
Sebastian Sajaroff Senior DBA Pharmacies Jean Coutu

Similar Messages

  • Collation problem on BPC migration.

    We are doing a migration from V4.2 to V7.0 BPC on microsoft plataform.
    The new database has the correct collation 'SQL_Latin1_General_CP1_CI_AS' but the V4.2 back up was from a database which collation is 'Finnish_Swedish_CI_AS'
    Now we have problems with column collation in the restored backup. We can't change column collation because there are index using the columns.
    Anybody have any idea how to proceed? We strongly appreciate it.
    Best Regards.

    Hi dude!
    In fact, you can run program InstColl.exe to convert to SQL_LATIN1_GENERAL_CP850_BIN2, but unfortunately it does only run on a SQL Server 2000 SP4 database. Then:
      (a) if your database is SQL Server 2000 but you did not apply SP4, you should apply it and then run the instColl.exe.
      (b) if your original database was SQL Server 2000, but you upgraded e.g. to SQL Server 2005/2008, you can restore a backup on a SQL Server 2000 SP4 database instance; then you will be able to run instColl.exe and only after having run it you will be able to upgrade to SQL Server 2005/2008.
      (c) if your database is other than SQL Server 2000, e.g. SQL Server 2005, the only option is to export the entire database and then import it with the correct collation (just like in a system copy) by means of R3trans, as unfortunately you cannot detach a SQL Server 2005 database and then attach it to a SQL Server 2000.
    Find the details in SAP notes 505906 and 600027.
    Cheers!!
    -Jesú

  • How can i  change the column label text in a alv table display

    how can i change the column label text in a alv table display??
    A similar kinda of question was posted previuosly where the requirement was the label text was needed and following below code was given as solution :
    <i>*  declare column, settings, header object
    DATA: lr_column TYPE REF TO cl_salv_wd_column.
    DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    DATA: lr_column_header type ref to CL_SALV_WD_COLUMN_HEADER.
    get column by specifying column name.
    lr_column = lr_column_settings->get_column( 'COLUMN_NAME1' ).
    set Header Text as null
    lr_column_header = lr_column->get_header( ).
    lr_column_header->set_text( ' ' ).</i>
    My specific requirement is i have an input field on the screen and i want reflect that value as the column label for one of the column in the alv table. I have used he above code with slight modification in the MODIFYVIEW method of the view since it is a process after input. The component gets activated without any errors but while run time i get an error stating
    <i>"The following error text was processed in the system CDV : Access via 'NULL' object reference not possible."</i>
    i have checked in debugging and the error occured at the statement :
    <i>lr_column = lr_column_settings->get_column( 'CURRENT_YEAR' ).</i>Please can you provide me an alternative for my requirement or correct me if i have done it wrong.
    Thanks,
    Suri

    I found it myself how to do it. The error says that it is not able to find the reference object i.e  it is asking us to refer to the table. The following piece of code will solve this problem. Have to implement this in WDDOMODIFYVIEW method of the view. This thing works comrades enjoy...
      DATA : lr_cmp_usage TYPE REF TO if_wd_component_usage,
             lr_if_controller  TYPE REF TO iwci_salv_wd_table,
             lr_cmdl   TYPE REF TO cl_salv_wd_config_table,
             lr_col    TYPE REF TO cl_salv_wd_column.
      DATA : node_year  TYPE REF TO if_wd_context_node,
             elem_year  TYPE REF TO if_wd_context_element,
             stru_year  TYPE if_alv_layout=>element_importing,
             item_year  LIKE stru_year-i_current_year,
             lf_string    TYPE char(x),
      DATA: lr_column TYPE REF TO cl_salv_wd_column.
      DATA: lr_column_header TYPE REF TO cl_salv_wd_column_header.
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings.
    Get the entered value from the input field of the screen
    node_year  = wd_context->get_child_node( name = 'IMPORTING_NODE' ).
    elem_year  = node_year->get_element( ).
      elem_year->get_attribute(
       EXPORTING
        name = 'IMPORT_NODE-PARAMETER'
       IMPORTING
        value = L_IMPORT_PARAM ).
      WRITE L_IMPORT_PARAM TO lf_string.
    Get the reference of the table
      lr_cmp_usage  =  wd_this->wd_cpuse_alv( ).
      IF lr_cmp_usage->has_active_component( ) IS INITIAL.
        lr_cmp_usage->create_component( ).
      ENDIF.
      lr_if_controller  = wd_this->wd_cpifc_alv( ).
      lr_column_settings = lr_if_controller->get_model( ).
    get column by specifying column name.
      IF lr_column_settings IS BOUND.
        lr_column = lr_column_settings->get_column( 'COLUMN_NAME').
    set Header Text as null
        lr_column_header = lr_column->get_header( ).
        lr_column_header->set_text( lf_string ).
    endif.

  • Change the column width on the fly

    Dear all,
    I have a problem, i have a matrix report, the row is "the project name" and the column is "the items" using within each project, and the problem is the items are variable from time to time the report run for each project, so its exceeds the paper width.
    And the question is, is there any way to change the width of the column on the fly, i mean dynamiclly change the column width each time the report is called to make all items fit the paper width.
    Thank u

    i don't think that we can change the layout of the column in reports
    The simple solution for that problem is that u have to
    fix the horizontal and vertical layout of the text item
    better is to post this problem at reports forum
    Najeeb

  • Change the column header according to the filter value ?

    Hello Experts,
    I have a requirement in which the customer wants to change the column header of the Sales Volume Key Figure to change according to the filter selected for the Calender Year / Month in the Free characteristics.
    I could display the header as 'Sales Volume for OCT 2000' as this is the value restricted intially in the free characteristics for Calender Year / Month.
    Any suggestion is appreciated.
    Thanks,

    Ioan Thanks for the reply.
    Probably my previous explanation of the problem was a little incomplete. Let me give a better description.
    The situation is something like this.
    I have a requirement in which the customer wants the column header to reflect the 'keep filter value' restriction that he does dynamically in the query report.
    i.e:
    -- usually the kf column header shows 'sales volume'
    -- column header with text variable of the Calender year / month variable -- 'sales volume for 2000 oct'
    -- but when the report is run, if the user wants to go and change the filter:   calender year / month > rt clk > keep filer value > select Jan 2003.
      The kf column header still shows 'Sales Volume 2000 Oct'
    How to make the column header change to 'sales volume for Jan  2003' ?
    Any suggestions greatly appreciated.
    Thanks,

  • How to change width columns in web layout?

    hello,
    I have problem with change width columns in web. I can change width column in paper layout and is ok but If I run web layout I get one column very wide and second thin. I cant find where I may this change
    I find that is no easy. If you want change property in web layout you must edit JSP file, and you must know Java/JSP/HTML, and library reposrts JSP custom tag and reports xhtml tags.
    regards
    Edited by: user515960 on 2010-07-11 04:23

    Hi,
     Please refer the below reference which may guide to configure the properties in search result webpart.
    http://technet.microsoft.com/en-us/library/gg549987(v=office.15).aspx
    If its not helping you please let us know.
    Sekar - Our life is short, so help others to grow
    Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
    you see a reply being an answer to the question of the thread, click "Mark As Answer

  • Changing Matrix column title?

    Hi all,
    Is it possible to change a matrix column title using the ColumnTitle.Caption property? I have tried using the following code but it does not work:
    'Sales order form - Add mode.
    If pVal.FormType = 139 And pVal.FormMode = 3 Then
    'After form loads
    If pVal.EventType = et_FORM_LOAD And pVal.Before_Action = False Then
    'SO form.
    Set oForm = oApp.Forms.Item(FormUID)
    Set oItem = oForm.Items.Item("38")
    Set oMatrix = oItem.Specific
    Set oColumn = oMatrix.Columns.Item("1")
    oColumn.TitleObject.Caption = "Item Code"
    End If
    End If
    Thank you.
    Andrew.

    Hi John,
    Thanks for the reply. Your questions/suggestions led me on a path to finding the problem and a solution.
    I tried the same block of code in another company db and it changed the column title fine. The reason it wouldn't work in the current company db I'm working on was because I had previously changed the column title to 'Item No.' (using ctrl & double-click). So the SDK was changing the Original Description but the new desc. of 'Item No.' remained unchanged. As soon as I deleted the new desc. the SDK worked fine.
    Thanks for your help.
    Regards,
    Andrew.

  • Database Collation VS Column Collation

    I have some Collation problem I need a help, please!
    I have two SAME test databases,
    but one (A) has a Collation set to Hebrew_CI_AS, and another one (B) - SQL_Latin1_General_CPT1_CS_AS.
    Both databases have a Synopsis table with a column NVARCHAR(1000), holding programmes EPG.
    In database (A) the COLUMN's Collation is set to SQL_Latin1_.... ( an opposit to the database ! )
    In database (B) the COLUMN's Collation is set to Hebrew_CI_...  (again - an opposit to the database)
    My problem is:
    When I want to update this column on databse (A) with special latin tags, f.e. ñç, I get question marks only: UPDATE A..Synopsis SET ... = 'Pour Bébé' shows me Pour B?b?
    On the other hand, if in database (B)  I want to type some Hebrew carachters, I get ???????? as well.
    It seems that despite I have a specified collation on my column, SQL keeps ignore it.
    How can I fix it?
    Many thanks in advance

    My problem is:
    When I want to update this column on databse (A) with special latin tags, f.e. ñç, I get question marks only: UPDATE A..Synopsis SET ... = 'Pour Bébé' shows me Pour B?b?
    On the other hand, if in database (B)  I want to type some Hebrew carachters, I get ???????? as well.
    I see Ed bumped this old unanswered thread.  Even though you've probably since resolved the issue, I'll answer it to help others that may run into the same issue.
    Collation affects non-Unicode string literals and the characters that can be stored for non-Unicode columns (char and varchar).  Unicode columns (nchar and nvarchar) can store all the characters you mentioned properly.  The character conversion
    problem occurs here because you are you are not indicated a Unicode character string literal so the value is interpreted as an non-Unicode string literal and converted according to the database default collation.
    To fix the problem, prefix the literal string with an N to indicate a Unicode string line the example below.  If the SQL is executed from a client application, the best solution is to use properly typed parameters instead of string literals.
    SET ... = N'Pour Bébé'
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Refreshing new column headers problem

    id like to change the column headers at any time, the number of columns dont change..just the headers, so i use a myDefaultTableModel.setColumnIdentifiers(myColumnNamesArray), it kinda works in that when i print out the actual JTables column headers..they reflect the changes...i just dont see them
    DefaultTableModel dm = new DefaultTableModel(dataArray, colArray);
    JTable table = new JTable(dm);
    ...to change..
    dm.setColumnIdentifiers(newColArray);
    dm.fireTableChanged(new TableModelEvent(tableModel,TableModelEvent.HEADER_ROW));at this point if i do a
    System.out.println(table.getColumnName(0-n));i can see that the actual table has the changed column names. what am i missing? i tried
    dm.fireTableDataChanged();
    dm.fireTableStructureChanged9);but that didnt do anything either :)
    any help??

    cuz just setting and repainting doesnt work for me :(Is it a programming problem or version problem?
    I can't tell, which is why you should always post your test program. A test program is not that hard to create. The following works for me on JDK1.4.2:
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    public class TableHeaderChange extends JFrame
         public TableHeaderChange()
              final DefaultTableModel model = new DefaultTableModel(5, 3);
              JTable table = new JTable(model);
              JScrollPane scrollPane = new JScrollPane( table );
              getContentPane().add( scrollPane );
              JButton button = new JButton("Change Header");
              button.addActionListener( new ActionListener()
                   public void actionPerformed(ActionEvent e)
                        String[] columnNames = {"One", "Two", "Three"};
                        model.setColumnIdentifiers( columnNames );
              getContentPane().add(button, BorderLayout.SOUTH);
         public static void main(String[] args)
              TableHeaderChange frame = new TableHeaderChange();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setVisible(true);
    }Problem solving always works better when you simplify the problem.

  • The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, cont

    I have a user on an iMac 10.6 connected to our domain.  She uses Outlook web access for email on our exchange server.  Last week she received the following message which is randomly preventing her from sending emails.  She claims no attachment was involved in the original email when this all started.  I have not been able to look at her account as she is out of the office but maybe someone else dealt with this issue.  I realize this may not be Mac related but thought I'd give it a try.  She did say it occurred once over two days while working on a PC but it continued over the past weekend.
    If an internal user tries to send a message with infected attachment using Outlook Web Access, it may report the following error message: The action could not be completed because of a conflict with the original item. The conflict may have occurred when an existing item was updated on another computer or device. Open the item again and try making your changes. If the problem continues, contact technical support for your organization.
    This is because F-Secure Anti-Virus for Microsoft Exchange has detected a virus in the attachment. If the user tries to send the message again, the message will be sent but without the attachment. At the same time a blank message with an attachment named "Attachment_information.txt" will remain in the user's Drafts folder. The "Attachment_information.txt" will contain information about the virus detected in the message.

    PS - have found other posts indicating that clips smaller than 2s or sometimes 5s, or "short files" can cause this. Modern style editing often uses short takes ! Good grief I cannot believe Apple. Well I deleted a half a dozen short sections and can export, but now of course the video is a ruined piiece of junk and I need to re-do the whole thing, the sound etc. which is basically taking as much time as the original. And each time I re-do it I risk again this lovely error -50 and again trying to figure out what thing bugs it via trial and error instead of a REASONABLE ERROR MESSAGE POINTING TO THE CLIP IT CAN'T PROCESS. What a mess. I HATE this iMovie application - full of BUGS BUGS BUGS which Apple will not fix obviously, since I had this product for a few years and see just hundreds of hits on Google about this error with disappointed users. Such junk I cannot believe I paid money for it and Apple does not support it with fixes !!!
    If anyone knows of a GOOD reasonably priced video editing program NOT from APPLE I am still looking for suggestions. I want to do more video in future, but obviously NOT with iMovie !!!

  • Change download columns from report

    Hi! I have a report, with some columns and I'd like to change the columns when downloading as csv file.
    Let's say that I have a report with col1,col2, col3,col4 and some hidden columns: col5, col6, col7. When I download the file I'd like to have only
    col2, col3, col6, col7.
    How can I do this?
    Thanks!

    Currently there is no way to do this. The CSV export function just re-runs the exact same report as you see it on the screen and transforms it to CSV format.
    Another option is to create a report with the columns you want in the CSV on another page, and use the export:CSV template as in
    http://tinypic.com/jzya2t.jpg
    and provide a link to that page. This will run that page and instead of showing the page it will popup the File download box.
    Hope this helps.

  • How to change the column value which is coming from DO by a calculated field?

    Hi all,
    I want to change a column value based on my calculated field value. I have a column which is coming from DO which is based on External Data Source. I have a calculated field in my report. When there is any change in the calculated field then the column which is coming from DO needs to be changed. It means the DO needs to get updated when there is a change in the calculated field. Or like if the calculated field meets some condition then I need to change/update the same in the DO. This has to be done on the fly. the report should not submitted for this. when there is a change in the calculated column the DO column needs to get updated.
    Thanks,
    Venky.

    Ok, I've been a customer for very many years, I'm on a fixed retirement
    income.  I need to reduce my bills, my contract ends in  Dec. I will be
    pursuing other options unless I can get some concessions from Verizon.  My
    future son-in-law was given this loyalty plan, so I know this is a
    reasonable request.  My phone number is (removed)  acct number
    (removed)
    >> Personal information removed to comply with the Verizon Wireless Terms of Service <<
    Edited by:  Verizon Moderator

  • How can I change excel column header using Labile.

    Dear Experts,
                          How can i change excel column header using LabVIEW.
    Thanks for any and all help!
    M.S.Sivaraj.
    Sivaraj M.S
    CLD

    As I said in my previous post, column headers in Excel are merely row 1 cells. May be I missing something here, so please be more explicit with your question.
    I guess you are using the Excel Report tools, and you want to modify an existing sheet. From my limited experience with the Excel Report tools, it is not possible to open an existing woorkbook (except as template...), so the answer to your question should be "Forget it"...
    The work around is to use the example I pointed for you before, and either to write the whole new colum headers as a string array, starting in A1, or to write a single string to a given cell in row 1.
    Hope this helps 
    Chilly Charly    (aka CC)
             E-List Master - Kudos glutton - Press the yellow button on the left...        

  • Error while trying to change the Column description in Table Control

    Hi,
    I have created a table control using the wizard in Module Pool.
    When i try to change the column description of the table control or adjust any other element which is already available on the screen and not in table control. It gives me an error
    Unable to transfer data. End Program?
    Any help would be appreciated.
    Thanks
    Sarves S V K

    Hi.,
    Check these  [Table Control Change Column Description|Add new columns in table control in custom screen program;
    and  [Add Columns in Table Control|Re: Table control columns]
    else  delete and create Table control Again..!!
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • My hp failed to start it says, A recent hardware or software change may be the problem.

    my hp failed to start it says A recent hardware or software change may be the problem.  It gives the option of Launch start up repair or Start windows normally, it freezes after clicking any option. What can i do?
    My pc is a Compaq Presario CQ62-216DX Notebook. It also says on the screen, Description: fix problems that are preventing windows from starting.

    Hi,
    Shut down the notebook.  Tap away at f10 as you start the notebook to enter the bios menu.  Under the Advanced or Diagnostic tab you should find the facility to run tests on both the Hard Drive and Memory.  Post back with the details of any error messages.
    Regards,
    DP-K
    ****Click the White thumb to say thanks****
    ****Please mark Accept As Solution if it solves your problem****
    ****I don't work for HP****
    Microsoft MVP - Windows Experience

Maybe you are looking for

  • HT4623 what can be done for the ipad that is making people dizzy and having headaches?

    what can be done for the ipad that is making people dizzy and having headaches?

  • Switzerland... PAL or NTSC?

    Producing a DVD to be shown in Switzerland. Alarmingly...I am unable to get any tech info from the end user.  (dont ask me why...'cos I dont know but I live in hope they will get their act together!.) Preference for me is to create a PAL DVD. So ..ar

  • Images out of wack...

    Hey there. I'ver just posted my website of my recent trip - done entirely with iWeb. The problem is that a lot of the images are not in their correct spots... Any suggestions? To place the images on the site - I just dragged & dropped them from the m

  • Design question - new to ISW

    Sun-AD Identity synch working great in testing mode (bidirectional password and attributes), but some questions for a production implementation. Ad Forest has multiple domains, but our Sun Dir only has one - o=company.com. There's no real relation be

  • Camera battery died during import.  why can't i find my imported video

    newest version of IMOVIE and my camera died during an import  cant find my video tho the camera memory shows the video still exists when i try to create a new event with the same name that i used the first time it says i cant duplicate the event as i