home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 19,298 of 19,505   
   Erland Sommarskog to chris H   
   Re: Unable to query xml data in sql serv   
   10 Jun 20 21:55:03   
   
   From: esquel@sommarskog.se   
      
   chris H (chris.sjpd@gmail.com) writes:   
   > WITH   
   > (   
   >     AccidentReportNumber-AllPages varchar(20),   
   >     AddressFullText varchar(100) '/trafficunit/driver',   
   >     InjuredWas_driver int '/involvedPeople',   
   >     PedestrianActionA-AllPages int,   
   >     MotorVehicleInvolvedWithC-AllPages int,   
   >     CollisionOccurredDate-AllPages  date,   
   >     Time-AllPages  int   
   > )   
   >   
   >   
   > Here is the error:   
   > Msg 102, Level 15, State 1, Line 32   
   > Incorrect syntax near '-'.   
   >   
      
   The name you have to the left is a column name, and must follow the regular   
   syntax for identifiers. Hyphen is not a permitted character in an   
   identifier.   
      
   You need to wrap these names in double quotes or bracket. These delimiters   
   permits you to have about any column name.   
      
   For instance:   
      
   [PedestrianActionA-AllPages] int,   
   "MotorVehicleInvolvedWithC-AllPages" int,   
      
   "" and[] are equivalent. "" is the ANSI standard. [] is the Microsoft way.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca