Re: '[' in column name



You'll see the correct way to specify this with the
function QUOTENAME():

select quotename('[Time Period].[BTG][Measures].[FC]')

The result is
[[Time Period]].[BTG]][Measures]].[FC]]]

You could also use
"[Time Period].[BTG][Measures].[FC]"

When using [] to delimit an object name, you must
double any occurrences of ] in the name. Don't
double the occurrences of [ .

Steve Kass
Drew University


Carmen wrote:

I'm running a OpenRowset query getting data from MSAS (MSOLAP). The query returns column names such as '[Time Period].[BTG][Measures].[FC]'. I need to create an alias for this column. How could I do it? I tried '[[Time Period].[BTG][Measures].[FC]]', '[[Time Period]].[[BTG]][[Measures]].[[FC]]', and other combinations but nothing so far. Anybody can help?

Thanks,

Carmen


.



Relevant Pages

  • Re: : read an Ascii File line by line
    ... Snorik wrote: ... Assuming you use $" to delimit text ... If you specify $whatever as delimiter, ... If the content "fits" the format, ...
    (comp.lang.smalltalk)
  • Re: set default value for a char column??
    ... make sure you use single quotes to delimit the value. ... I have a charfor SSN, and I would like to default it to ... Is there some special way I must specify defaults for a charfield ...
    (comp.databases.ms-sqlserver)
  • RE: my data is bundled. how do I isolate in separate cells?
    ... You can use the Text to Columns option located under the Data tab. ... It allows you to specify how the information will be broken up within the ... all 500 listings (delimit, I guess), rather than doing it manually. ... example, name, address and telephone number are all "stacked cells" in column ...
    (microsoft.public.excel.worksheet.functions)

Loading