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/>

Similar Messages

  • Csv output has database column names instead of aliases as in template

    Hi,
    I'm trying to publish a csv report to an ftp server in a specific format and layout. The column names need to be customized. I've modified the alias name both in the data model and in the rtf layout template. But the csv still contains the data base names as in column0, column 1, etc. Does anyone know how to fix this? The html or rtf format displays the correct column names but not the csv.
    output sent:
    Column 0 Jane
    Column 1 Doe
    Column2 Female
    desired output:
    Name Jane
    Last Name Doe
    MF Female
    Edited by: user556100 on Apr 30, 2013 2:25 AM
    Edited by: user556100 on Apr 30, 2013 2:25 AM

    As far as i know CSV output will not consider any template formatting. it will basically give output of all the columns used in select statement of SQL in comma separated format.
    It is the default behavior of CSV output in bi publisher
    Guru's Correct me if i am wrong

  • How to allow space in the column names

    Hi
    My program reads data from an excel file which has columns named "Fiscal Year" and "current period". I can read data from the file as below...
    select * from the_file
    But it does not allow me, if I write the following sql statement.
    select distinct fiscal Year, current period from the_file
    I need to get distinct values from these two columns and the order in which these columns will appear in excel file is not fixed.
    I tried
    select distinct 'fiscal Year', 'current period' from the_file
    But it did not work
    Please help as how can I specify these columns that has a space in its name.
    Thanks

    Have you tried Double quotes as in:
    select distinct "fiscal Year", "current period" from the_file;

  • Special Column names in SQL Server

    Hi,
    I am trying to use ODI to load data from SQL Server to Oracle. My problem is having special column names in the old SQL Server database. The columns have names such as 9500Column1. I tried enclosing the names with square barckets in the model definition but it did not work.
    Any ideas? Any modifications I might make to the LKM?
    Nimrod

    Try enclosing the special fields in double quotes instead of [ and ]. Yes, that isn't the T-SQL standard, but it works, even in SS Studio.
    I had a SELECT statement in a Procedure that died when it hit a space in the column name. After hours of unsuccessful attempts to escape [ and ] it occurred to me that maybe " and " would do the trick as that is the PL/SQL standard. I think the proverbial feather could have knocked me over. Or was that me kicking my self in the rear?
    Regards,
    Cameron Lackpour

  • Oracle Database Columns to PDF

    Hi
      I would like to select some columns from the oracle data base using the select statement and upload into the pdf file. But in Oracle database my columns name  are like SALES_FORECAST,FORECAST_ACCURACY ,....... I dont want use the same names but i would like to give the descriptions like Sales Forecast, Forecast Accuracy,.....
    Where can I give these description for the columns .
    My BLT is like this 1.  PDF actions
                                2. SQL Query
                                3.PDF Table.
    Thanks
    Madhu

    Hi Madhu,
    if you want to use spaces for your PDF table columns, you can use the following method.
    In your BLS, write a MII query to retrieve the values from your DB. Create a MII XML output document with all columns you want to use in your PDF. Here you can use spaces in your columns names that will be displayed in the PDF table.
    Then use a repeater action to run through all output rows of your query. Use a "Row" action from the MII XML Output to add all the query rows to your XML Output document. Finally, use the XML Output document as source for your PDF table.
    This way you can use the column names you like.
    Michael

  • Dynamic column name in cfquery

    I have a scenario in which database column names are in a
    format COLUMN1, COLUMN2, ...COLUMNn. Number of column is not known
    while coding. But usually the column names are hard code while
    accessing the cfquery result like
    cfqueryresult.COLUMN1.
    I want to get the column names from
    'cfqueryresult.ColumnList' and from that result i want to fetch the
    column values.
    Is it possible to achieve this in coldfusion?

    quote:
    Originally posted by:
    Dan Bracuk
    quote:
    Originally posted by:
    Newsgroup User
    And then start planing for the normalization of your database
    because that is a classic de-normalized pattern that just leads to
    more and more difficulties maintaining your application. Just like
    this one you have just experienced!
    That wasn't my interpretation. I have some reports where the
    contents of a select clause depend on user input. It results in a
    similar scenario to what was described in the OP.
    Or maybe the OP was trying to write generic code that could
    be applied to arbitrary tables.
    That was the situation which resulted in my question that you
    and Ian answered so helpfully: I use an Access template in which
    there are forms to facilitate entry of value lists (list-id, value,
    and label) and a metatable that describes each column of the actual
    working table , identifies any value-list that column references,
    and includes the prompt and (after processing) the HTML for that
    web page element. After I define the working table in the metatable
    I run a VB procedure that creates the working table and generates
    all the HTML in the metatable. Finally my generic ASP (and, coming
    soon, ColdFusion) references the metatable and the working table to
    generate an empty form, display a form populated from a DB row for
    editing, assign form values to a DB row, or delete a DB row. Same
    code, any table; all I have to do is define the table and the
    value-lists it needs.
    This is a wonderful tool for me in a Social Sciences
    department where the Professors are always designing surveys to
    gather data. I can deplay a web-based survey in a few hours, and,
    with your help and many hours poring over manuals, I have the first
    example working in ColdFusion. And, incidentally, the ColdFusion
    version is way tidier, more compact, and more readable than the ASP
    version.
    Dan, I'll be happy to answer other peoples' questions as soon
    as I am more confident in my knowlege of ColdFusion!
    -Richard
    Richard Hopley
    Research Associate
    Department of Social Science and Health Policy
    Wake Forest University Medical School
    Winston-Salem, NC

  • TO Rename a column name

    Hi all,
    I have a table employee with columns
    'employee_id',
    'employee_name'
    ' employee_city' ( Note the spaces before the column name )
    The table is created successfully.
    But i cant to able to retreive the data by specifying the column name..
    eg: select employee_city from employee.
    It throws an error.
    Please send me a solution to reanme the column name, so that it should not contain any spaces at start & end.
    Thanks & Regards,
    Hariharan ST

    Obviously the table was created this way:
    SQL>create table testtab
    "employee_id" number,
    "employee_name" varchar2(100),
    " employee_city" varchar2(100)
    Table created.
    SQL>desc testtab
    Name                                      Null?    Type
    employee_id                                        NUMBER
    employee_name                                      VARCHAR2(100)
      employee_city                                     VARCHAR2(100)Note the double quotes: Columns that are created this way can only be selected using double quotes, too:
    SQL>select employee_city from testtab;
    select employee_city from testtab
    ERROR at line 1:
    ORA-00904: "EMPLOYEE_CITY": invalid identifier
    SQL>select " employee_city" from testtab;
    employee_city
    Chicago
    SQL>This of course is a very bad idea. Dave already showed you how to rename the columns.
    Regards,
    Gerd

  • 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]

  • 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...

  • 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.

  • Why do I get a class conflict between the Prepare SQL.vi and the Get Column Name.vi with the SQL Toolkit compatibility vis from the Database Connectivity Toolkit?

    I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi. 
    The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references. 
    How do I resolve this conflict?
    Thank You.
    Dan

    I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
    I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
    Try to take over the world!

  • Searching for missing column names in a single database.

    I have a database with about 100 tables, database gets generated using entity framework. The application has been enhanced  so users deployed with older version of the application need to upgrade to newer version. The database generated is both versions
    is same name.
    Now, the older version is missing some tables and column names that are in new database.
    Is there a script that can search for missing fields in a single database as described in this situation?
    Below is my script. Basically, nameofdatabase would the database generated and that already existing. If you install the application and database already exits no new database will be created.
    SELECT * FROM (Select TABLE_CATALOG, Table_name,COLUMN_NAME FROM nameofdatabase.INFORMATION_SCHEMA.COLUMNS) a FULL OUTER JOIN (SELECT TABLE_CATALOG, Table_name,COLUMN_NAME FROM nameofdatabase.INFORMATION_SCHEMA.COLUMNS) b ON b.COLUMN_NAME=a.COLUMN_NAME and
    a.TABLE_NAME=b.TABLE_NAME WHERE b.COLUMN_NAME is null or a.COLUMN_NAME is null ;

    There is a great tool called SQLCompare provide by www.red-gate.com
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Finding source database table/column name for a column in a view

    Hi i need to be able to identify the original database table/column name for a column in a view.
    e.g. say i have a view like this
    create v1 as select a.name fname, b.name bname, c.name cname,......
    from u1.names a, u2.names b. u3.names c
    where .....
    Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
    But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
    Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.

    But i need to be able to do it for any view. Short of
    parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt.

  • Case sensitive table names and column names in 8i or 9i databases

    Hi everybody,
    I've got a couple of business-side colleagues who insist that Oracle table and column names are case sensitive. That is, there is a setting in the set up of a database that lets you pick if table and column names are case sensitive. For example, this would mean that there could be a table named EMP in a given schema schema plus a table named emp in that same schema.
    Can this be true? I'd be surprised of course, but I've been surprised before.
    Thanks for any direction.
    -- Bill Loggins

    You can do it, but I would avoid it like the plague.
    SQL> create table "a" (b date);
    Table created.
    SQL> create table "A" (b date);
    Table created.
    I think I would refuse to work on a database where this has been used !

  • Hyperion IR 9.3.1.3:  Spaces in Column Names

    I have a table that has column names that have spaces. Hyperion IR 9.3.1.3 Studio can query this fine, but IR Web Client can't. In Studio, the query log shows the column names surrounded by quotes, but the Web Client won't even show me the query in the query log. Is there a setting I missed when I published the OCE to the Workspace?

    After checking the Use Quoted Identifiers box in the Advanced Options for the connection, the query works, but I still can't use the Detail View option for the table in the data model.

Maybe you are looking for