| Author |
Topic |
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2010-01-11 : 15:30:09
|
| Hi,I created a SQL table from an MDX query through openquery command.The table that gets created uses the dimension reference names in MDX for Columns names.So, when I try to select, it gives an error.Here is my select statement:Select [[IP Address].[Domain Names].[Domain Name].[MEMBER_NAME]] From CubeDomainsHere's the error I get:Unclosed quotation mark after the character string 'MEMBER_NAME] From CubeDomains--PhB |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-11 : 15:39:09
|
Delete the outer brackets.Select [[IP Address].[Domain Names].[Domain Name].[MEMBER_NAME]] No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2010-01-11 : 15:42:07
|
| Thanks for the quick reply.I tried that and this is what i get:The multi-part identifier "IP Address.Domain Names.Domain Name.MEMBER_NAME" could not be bound. --PhB |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-11 : 15:54:49
|
Can you show the complete select statement and the table structure?In T-SQL an object (i.e. table) can be:servername.databasename.schema.tablenameWhile I am answering I think you have a table CubeDomains with columns [IP Address][Domain Names][Domain Name][MEMBER_NAME]So your select should beselect[IP Address],[Domain Names],[Domain Name],[MEMBER_NAME]from CubeDomains No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2010-01-11 : 16:08:53
|
| The table has one column and that is the full name of the column:[IP Address].[Domain Names].[Domain Name].[MEMBER_NAME]Like I say above this column name is generated by the output of the MDX query.The select statement is the one I posted above.--PhB |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-11 : 16:11:40
|
Then try to use ONLY the outer brackets and delete the others. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2010-01-11 : 16:24:06
|
| Tried that too:Invalid column name 'IP Address.Domain Names.Domain Name.MEMBER_NAME'.Thanks for your help.--PhB |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-11 : 16:30:54
|
So sorry for that.But now I have tested it.This shouild really work:select"[IP Address].[Domain Names].[Domain Name].[MEMBER_NAME]"from CubeDomains" = double quote (not 2 single quotes!) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
phrankbooth
Posting Yak Master
162 Posts |
Posted - 2010-01-11 : 16:36:35
|
| That worked!You're beautiful!!--PhB |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-01-11 : 17:07:50
|
No problem. Thanks for being patient. Usually it is not my way to say try this, try that and so on... No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|