ACCESS column names containing spaces

Hi
I'm new to Java SQL programming and have come across a problem I can't seem to fix reharding ACCESS column names that contain spaces.
Here's the actual code :
sqlquery = "select * from cars,qualify where group2 = '" + addComponentsToDrivers.currentgroupcode + "' and cars.car id no = qualify.car id no";
here's the error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'group2 = 'INTGT5' and cars.car id no = qualify.car id no'.
The question is how can I code qualify.car id no?
Thanks
Ken

and cars.car id no = qualify.car id noand cars.[car id no] = qualify.[car id no]

Similar Messages

  • Method t create dynamic structure if the field name contains space

    HI all,
    I am creating a dynamic internal table. Everything id fine but when creating dynamic structure if field name contains space its giving me dump.Can you please suggest me any other methos which takes space in the field name.
    Iam using the following method:
      gr_struct_typ  ?= cl_abap_structdescr=>create( p_components = gt_component ).
    In the gt_component i have one of the field with space like ( RU STAND) and its giving error.
    Any help will be appreciated.
    thanks
    Suku.

    Hello Sukumar
    If the space in the fieldname is a mistake then you could simply use:
    CONDENSE ld_fieldname NO-GAPS.
    However, I guess your fieldname should contain this space:
    >...suggest me any other methos which takes space in the field name.
    >
    Well, have you ever seen a field or column name in SAP standard containing a space in its name???
    Regards
      Uwe

  • How to update a table whose column name contains an ampersand?

    Hello,
    I am needing to update a column whose column name contains an ampersand, and cannot figure out a way to do this. Option is not there to have the column name changed.
    Ex:
    UPDATE aircrafts
    SET d&f = 1
    WHERE aircraft_code = '737';
    this returns an error of missing an = sign
    I tried:
    SET 'd'||'&'||'f' = 1
    doesnt work
    Any help is greatly appreciated.
    Thanks,
    Laura

    SET DEFINE OFF
    will stop interpreting the & sign as starting of a lexical parameter on the client.
    Not sure if you have that issue there.
    & might also be a not allowed character in normal column names (didn't test).
    In that case you might need to put the column name in ".
    +example+
    {code}
    UPDATE aircrafts
    SET "d&f" = 1
    WHERE aircraft_code = '737';
    {code}
    Be aware that in this case the column name must be spelled exactly like it was when the table was created.
    Included upper/lower case.
    {code}
    UPDATE aircrafts
    SET "D&F" = 1
    WHERE aircraft_code = '737';
    {code}

  • Column name has spaces

    Is there any way to make OBIEE handle a table which has column names with spaces?
    Besides creating a view with aliases on that table, of course?
    I suppose, it's about making a queries where all column names are quoted.

    Well, this is exactly how I created all those tables. They have tens of columns like that, unfortunately, that was a requirement.
    I am completely new to OBIEE tool, but AFAIK it maps physical tables to some business layers and then it generates queries to the database depending on user's actions.
    So my question is: is it possible to configure OBIEE server so that all queries sent to DB have column names in quotes, regardless of particular column name?
    It's about total of 1000 columns with such names spread over 80 tables, so I am looking for easy way to make it work with those tables...

  • SQL Query not working for column names with spaces

    Hi People..
    We have a strange situation wherein, the column name in the database table has a space inbetween like "Constant Name". While we write a JDBC statement code with the select query we get an exception for invalid syntax. It will help us in a great way if you have anything to inform us on this..
    Thanks
    Prabz

    Using case sensitive names and names with spaces in it is not a good practice.
    However, I believe the SQL standard accounts for this with quoted identifiers. I believe the syntax is
    . select "My Field1", "My Field2"
    . from "My Table'
    Have also seen the following although it might be MS Access specific.
    . select [My Field1], [My Field2]
    . from [My Table]

  • Dynamic column Name# Contains Invalid Characters. Bind_table() fails

    Hi WD experts,
    I have tried to use the bind_table() on a dynamically generated table. Now it happens that this dynamic table contains  columns like NAME# . This gave rise to a dump :
    The Name NAME# Contains Invalid Characters. Valid Characters are A-Z, 0-9, _, and /.
    Other tables which do not have such columns are correctly bound.
    In my method , I first loop over the field catalog to retrieve some field names from a dynamicallt generated report...
      LOOP AT lt_fieldcat_out INTO lwa_fieldcat.
        comp-name = lwa_fieldcat-fieldname.
        comp-type ?= cl_abap_typedescr=>DESCRIBE_BY_DATA( lwa_fieldcat-FIELDNAME ).
        APPEND comp TO comp_tab.
      ENDLOOP.
    structure which represents the dynamic table
      struct_type = cl_abap_structdescr=>get(
                                              p_components = comp_tab
                                              p_strict = abap_FALSE   ).
      node_info = wd_context->get_node_info( ).
      node_info = node_info->add_new_child_node(
                                  name        = 'DYN_TAB_NODE'
                                  IS_MANDATORY                 = ABAP_TRUE
                                   IS_MANDATORY_SELECTION       = ABAP_FALSE
                                   IS_MULTIPLE                  = ABAP_TRUE
                                   IS_MULTIPLE_SELECTION        = ABAP_FALSE
                                   IS_SINGLETON                 = ABAP_FALSE
                                   IS_INITIALIZE_LEAD_SELECTION = ABAP_FALSE
                                  static_element_rtti = struct_type
                                  is_static = abap_false
      struct_type = node_info->GET_STATIC_ATTRIBUTES_TYPE( ).
    Afterwards, I bind a dynamic table to the new node...
    Do you have an idea how to circumvent this ?
    Thank you,
    cheers,Zied.

    cols have to be changed

  • Spaces in database column names

    Hi folks!
    Does anyone know if there is some way to reference Micosoft Access
    database columns that contain spaces using Forte and ODBC?
    I know it's like trying to use a jet plane to go down to the high street, but
    we want to extend a (large) in-house system with a good Forte front-end.
    I am aware that there are utilities available to rename entities within
    Access databases, but if there is an easy way to do this in Forte we'd
    prefer to go that way.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10 years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Duncan,
    Just put the column in double quotes.
    Example:
    sql SELECT
    ,ipool.id
    ,asgn."Assignment Date"
    ,asgn.router
    ,asgn."Order Number"
    FROM assigned_ips addr
    ,assignments asgn
    WHERE
    addr.id = asgn.Assigned_IP
    AND asgn.master_ip = mpool.id
    AND mpool.ip_pool = ipool.id
    AND ipool.ncc = ncc.id
    ORDER BY addr.id
    on session accessDbSession
    At 09:31 AM 6/17/99 +1200, you wrote:
    Hi folks!
    Does anyone know if there is some way to reference Micosoft Access
    database columns that contain spaces using Forte and ODBC?
    I know it's like trying to use a jet plane to go down to the high street,but
    we want to extend a (large) in-house system with a good Forte front-end.
    I am aware that there are utilities available to rename entities within
    Access databases, but if there is an easy way to do this in Forte we'd
    prefer to go that way.
    Cheers,
    Duncan Kinnear,
    McCarthy and Associates, Email: [email protected]
    PO Box 764, McLean Towers, Phone: +64 6 834 3360
    Shakespeare Road, Napier, New Zealand. Fax: +64 6 834 3369
    Providing Integrated Software to the Meat Processing Industry for over 10years
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • Column contain space in table.

    Hi I have one table and one column itself contain space not the column data.
    Whenever i select that column it gives me error invalid identifier.
    I tried to rename the column also but it gives me same error invalid identifier.
    Please help
    Thanks in advance!
    Nick

    Can you please show what you are doing and how Oracle responds? It's hard to guess what you are trying to do based on the information given.
    Don't forget to use \ tags.
    For example:
    \Your code here\will display as:Your code here                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Bug in the copy cluster roles wizard - CSV reparse points cannot have names with spaces

    Hi All,
    I have identified a bug in the copy cluster roles wizard in 2012 R2, which is preventing me from migrating my clusters from 2008 R2 & 2012 to 2012 R2.
    The bug surfaces when you attempt to copy a VM role from a 2008 R2 or 2012 cluster that has a CSV reparse point name that contains spaces as follows:
    The role appears to copy across fine, but once you've migrated the CSV and brought it online followed by starting the VM, the VM configuration resource promptly fails along with the VM.
    The issue can be spotted inside the copy cluster roles wizard, where it presents itself by removing all text after the first space in the name to read "C:\ClusterStorage\CSV" rather than "C:\ClusterStorage\CSV
    Test Disk 3" as follows:
    The bug only appears for VMs on CSVs with a reparse point name containing spaces - all other scenarios succeed.
    After searching through the registry on the new cluster, you can clearly see that the VM role hasn't been correctly copied.
    It shows a value called SharedVolumeMappings with the data C:\ClusterStorage\CSV|<guid>|<integer>
    Whereas it should show the data C:\ClusterStorage\CSV Test Disk 3|<guid>|<integer>
    If you modify the data in the SharedVolumeMappings value in both
    0.Cluster\Resources\<VM guid> and Cluster\Resources\<VM guid> keys, the VM will start and work correctly.
    The problem for me is that I have many VMs on many different CSVs all with spaces in the names of the reparse point! Its not feasible for me to go through the registry for every copied VM on every node of the new cluster, as this would take a very long time
    and would be prone to errors that could cause further problems.
    Can anyone provide any help on this? A hotfix for the issue would be great, if anyone from Microsoft is reading :-)
    My deadline to get the VMs migrated to the new cluster is the 21st February, so I would really like to have a solution to the problem before then if at all possible.
    Many thanks in advance,
    Tom

    Hi Subhasish,
    Thanks for the reply, glad that its something that is reproducible!
    Do you have any idea of timescale? Or is it likely that I will have to modify the registry as above to get this working?
    If I am going to have to modify the registry, please can you let me know if the resolution I have tested above is safe and viable? Or are there other settings that I will need to change to make the cluster fully aware of the proper path to the CSVs for its
    VMs?
    Also, is there a known procedure for renaming the reparse point whilst VMs are running on it? This would allow me to negate the issue before copying the roles to the new cluster :-)
    Thanks again,
    Tom

  • File download - file name with spaces

    I use the resp.setHeader("Content-disposition", "attachment; filename="+filename) method. it works. However, when the file name contains spaces the dowloaded file's name is only the part of the string up to the space, nothing more. Is there a way to deal with it? I'm replacing spaces for '_' at the moment but that's not exactly what I want.
    Thanks.

    Is the filename put in between quotes?
    resp.setHeader("Content-disposition", "attachment; filename=\"" + filename + "\"")

  • Invalid column name exception

    I am receiving an Invalid column name SQLException. I initially
    thought it was a problem with the computed fields, but was after
    making the usual changes to the model implementation the exception is
    still occurring. I can run the SQL statement in SQLplus and get no
    errors and the three results I'm expecting (grabbing the SQL statement
    from the model's beforeExecute event). The mystifying part is that it
    returns one of the three rows that I'm expecting. That is, the model
    executes and the result set is partially filled. The model is Select
    only. The computed fields are concatenated strings. After logging the
    exception I call getNumRows() on the model and receive a 1 back. The
    computed fields are returned in that one record. Any ideas about what
    to try or where to look next?
    Thanks,
    paul

    Kostas,
    Thanks for your help. During migration a QueryFieldDescriptor was
    created for a field that is only used in the where clause. I'm
    assuming it then couldn't be mapped back to the ResultSet, and this
    caused the Invalid Column Name exception. That is, I am selecting 5
    fields, but had 6 QueryFieldDescriptors.
    paul
    --- In SunONE-JATO@y..., Kostas Morfis <kmorfis@i...> wrote:
    Hi Paul,
    It would appear you have a column name mismatch between what isdefines in
    your modelImpl
    and what is being returned by the JDBC driver.
    From the SQL you sent, the Column Names would be something like:
    'SURVEYGROUP_XREF',SURVEY_ID', CF_SURVEYANDGROUP', 'CF_SURVEYGROUP',
    'RESULTS_VIEWER_ID'
    Do all your column names definitions in your modelImpl match up tothese ?
    >
    eg public static final StringCOLUMN_WIS_SURVEYANDGROUP="CF_SURVEYANDGROUP";
    >
    Note: the qualified column vairables (QUALIFIED_COLUMN_XXXXXX) doNOT get
    used for Select queries.
    If it still unclear where the mismatch is occurring, you can addsome simple
    debugging :
    To tell you what you are trying to access add the the following in
    ResultSetModelBase just before the
    exception occurred:
    System.out.println("UPDATE_MODEL: Attempting to Access Column Name:
    "+fd.getColumnName());
    Object value=resultSet.getObject(fd.getColumnName());
    If still need more information,you can look at the column namesreturned by
    the JDBC calls by doing something like:
    ResultSetMetaData metaData = resultSet.getMetaData();
    int columnCount = metaData.getColumnCount();
    for(int i = 0; i < columnCount ; i++)
    System.out.println("Colummn["+i+"]"+
    metaData.getColumnName(i+1));
    Hope that helps.
    Kostas

  • Role names with spaces (6.1 to 8.1)

    Hi All
    I'm working in an organization that has group and role names within their LDAP
    repository such that the group and role names contain spaces. Hence, for example,
    within a web.xml file lines like the following exist:
    <role-name>Some Role Name</role-name>
    This has worked without problem in Weblogic 6.1 but given some prelimanary work
    within 8.1 we are noticing that Weblogic 8.1 does not appear to like spaces within
    the <role-name> element.
    Is this just the way it is with Weblogic 8.1? Or is there a way to continue to
    use role names with embedded spaces within Weblogic 8.1?
    Thanks,
    Rob

    "Peter" <PeterB> wrote:
    >
    "Rob" <[email protected]> wrote in message
    news:3f57d329$[email protected]..
    Hi All
    I'm working in an organization that has group and role names withintheir
    LDAP
    repository such that the group and role names contain spaces. Hence,for
    example,
    within a web.xml file lines like the following exist:
    <role-name>Some Role Name</role-name>
    This has worked without problem in Weblogic 6.1 but given some prelimanarywork
    within 8.1 we are noticing that Weblogic 8.1 does not appear to likespaces within
    the <role-name> element.
    Sounds like a bug. File a support case.
    Hi,
    A workaround exists :
    1 - in web.xml, update your role-name element by replacing spaces with "_"
    2 - in weblogic.xml, add :
    <security-role-assignment>
         <role-name>Some_Role_Name</role-name>
         <principal-name>Some Role Name</principal-name>
         </security-role-assignment>
    Regards
    Christophe

  • Problem opening word doc if folder or file contains space

    Hi All,
    I am writing a program to open a word doc.The code i wrote is as follows
    try {
    Runtime.getRuntime().exec("c:\\program files\\Microsoft Office\\Office\\Winword.exe"+" file:\\\\"+path);
    } catch(Exception ex) {
    System.out.println(ex);
    the variable path will contain
    C:\My Documents\abc.doc
    if the folder name or file name contains space in between, the word document will not open.It gives an error saying
    trying to open C:\My\ couldn't find the file.
    otherwise(if folder or file name doesn't contain space) it works fine.
    So how do i overcome this problem?
    Regards
    S S Kurgod

    Just a guess, but since it's based on the file protocol, you could try replacing the spaces in the path variable with %20%

  • MS Access DB with Spaces in Column Name

    Good Afternoon-
    I'm having some serious headaches with a table that I need to extract information from. The powers that be wrote it with the following column names "Contract Number" , "Customer Number", "Description".
    Note the spaces in the columns.
    Sample code from here: http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2691&lngWId=2
    I'm using sample code for connecting to the database and I can access everything using the select statements, except if the column contains a space. I get the following errors:
    s.execute("select [Customer Number], Name from Customer");
    Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    s.execute("select \"Customer Number\", Name from Customer");
    Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    s.execute("select Customer*Number, Name from Customer");
    Error: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2.
    s.execute("select 'Customer Number' , Name from Customer");
    Data from column_name: Customer Number , Unknown
    This works, but would require parsing-
    s.execute("select * from Customer");
    Data from column_name: 5 , Unknown
    Suggestions would be truly appreciated.
    Jason

    "select [Customer Number] , Name from Customer " ;
    returned the correct responses.Double quoted identifiers, which is part of ANSI SQL should have solved it....
    "select \"Customer Number\" , Name from Customer " ;
    As mentioned above it has certainly been my experience that DBAs (those with that title) all insist that quoted identifiers should never be used. Thus refactoring the database identifiers is actually the correct solution.

  • Access the Name and Value of a StationGlo​bals container programati​cally

    Hello,
    I am having some trouble trying to programmatically write the contents of a container into my HTML report header. The container contains a series of strings and numbers. These are saved into StaionGlobals.
    Note that I am performing all of these operations in a statment step inside the sequence editor of TestStand
    I used the following method to access the correct property, which sits inside a for loop. Now this seems to work fine as Locals.PropertyObj contains the element which I wish to access. In the following Locals.PropertyObj is an object. TestSetup is the name of my setup information container
    Locals.PropertyObj = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)
    I can access the Name of the parameter simply by using the following code (where Locals.Name is a string):
    Locals.Name = StationGlobals.GetNthSubPropertyName("TestSetup", StationGlobals.ForIterator, 0)
    However when I try to access the actual value of the parameter I get an error or the wrong information. The following line gives me back the value "PropertyObject, IID = {8D87....}" which is not the value I am trying to get to.
    Locals.Val = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)
    I must be doing something wrong, and have tried various methods to do this but cannot get my head around the problem. I tried to use the following also, but it resulted in an error:
    Locals.PropertyObj.AsPropertyObject.GetFormattedValue((Locals.PropertyObj.AsPropertyObject).Name, 0, "", False, "")
    Note that the following line works fine:
    (Locals.PropertyObj.AsPropertyObject).Name
    Also can you tell me why the lookup string needs to be defined in Locals.PropertyObj.AsPropertyObject.GetValueString​(), is there a way to not require the lookup string as you are already have the correct property, and just the value is needed to be gotten.
    One last thing, in Evaluate() how do I make it work with dots, for example the following line  (another attempt to get the value) did not work due to the presence of the . character 
    Evaluate("StationGlobals.TestSetup." + (Locals.PropertyObj.AsPropertyObject).Name)
    Many thanks in advance of your response,
    Ben Lawler
    ps. hope that I am not being stupid and missed something very obvious

    Ben,
    Just a few comments;
    [Locals.PropertyObj = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)]
    This should give you a PropertyObject for the 1st subproperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0
    [Locals.Name = StationGlobals.GetNthSubPropertyName("TestSetup", StationGlobals.ForIterator, 0)]
    This should give you the name of the 1st subProperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0
    [Locals.Val = StationGlobals.GetNthSubProperty("TestSetup", StationGlobals.ForIterator, 0)]
    This is going to return the 1st subproperty of StationGlobals.TestSetup if StationGlobals.ForIterator = 0 as a PropertyObject reference
    and Locals.Val should be an ActiveX Reference type which I am guessing it isn't.
    [Locals.PropertyObj.AsPropertyObject.GetFormattedV​alue((Locals.PropertyObj.AsPropertyObject).Name, 0, "", False, "")]
    I think this should be Locals.PropertyObj.GetFormattedValue("", 0, "", False, ""), you dont need to specify the lookup string because you have obtained a reference to the actual sub-PropertyObject.
    and therefore
    Locals.Val = Locals.PropertyObj.GetFormattedValue("", 0, "", False, "")
    should give you the value of the 1st subproperty of StationGlobals.TestSetup if Locals.PropertyObj was obtained as above.
    I will try to check out your sequencefile later when I have access to TestStand 4.x.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

Maybe you are looking for

  • Why hasn't Adobe fixed the "disappearing form data" problem???

    I am using Acrobat 9.2 and people are emailing me a fillable, savable form that I CAN'T READ WHEN I GET IT!  What the...? I'm using Windows 7. The PDF form opens blank and I can only see what the user typed in if I click on one of the fields.  When I

  • Sybase connectivity

    Hi all, I have some troubles with the deployment process of the jdbc datasource. I used an evaluation version of the DataDirect JDBC drivers to connect a Sybase database. Following the process stated on the tutorials I configured a new Server Type an

  • How can i create a .mov file from image sequence with different durations

    how do u create an image sequence with different durations? image one stays for 10 seconds and image two may stay for 30 and so on. each one has a custom duration. can this be done with an apple script or a text file saved as an mov file?

  • Why does 1 speaker crack when i click on different items (not all) after hp/windows updates?

    After installing several updates for Windows 7 & HP g72010nr at the same time, 2 problems have occured. 1 speaker cracks real loud when I click on different items (not everything) AND when running DVDs there are ripples all throught the movies. It's

  • Why is my iPad missing photos?

    I've got an original 16GB Wifi iPad and use it for internet access/emailing and storing my 19,000 photos that I've divided into 100+ folders labelled alphabetically; Andrew's party, Bryan's house, CHristmas 2010 etc etc. Up until recently all has bee