[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] T-SQL DDL statements within SQR Begin-SQL...End-SQLconstruct








You need to assign your temp table name to a variable, then wrap the
variable with brackets in your SQL statement, i.e.

LET $TMP_TBL_NM = '###TMP_TBL_1234'

BEGIN-SQL

CREATE TABLE [$TMP_TBL_NM] (COLUMN1 CHAR(8),
                                                      COLUMN2  CHAR(8),
                                                      etc.)

END-SQL


HTH,

------------------------------------------------------
Ramzi Salameh
PeopleSoft Technical Analyst
Dave & Busters, Inc.

www.daveandbusters.com - recess is calling
------------------------------------------------------


|---------+------------------------------------------------------------>
|         |           "ruscs ___" <ruscols@hotmail.com>                |
|         |           Sent by:                                         |
|         |           sqr-users-bounces+ramzi_salameh=daveandbusters.co|
|         |           m@sqrug.org                                      |
|         |                                                            |
|         |                                                            |
|         |           04/17/04 02:12 PM                                |
|         |           Please respond to "This list is for discussion   |
|         |           about the SQR database reporting  language from  |
|         |           Hyperion Solutions."                             |
|         |                                                            |
|---------+------------------------------------------------------------>
  
>-----------------------------------------------------------------------------------------------|

  |                                                                             
                  |
  |       To:       sqr-users@sqrug.org                                         
                  |
  |       cc:                                                                   
                  |
  |       Subject:  [sqr-users] T-SQL DDL statements within SQR 
Begin-SQL...End-SQL   construct   |
  
>-----------------------------------------------------------------------------------------------|





Is it possible to create a local or global temporary table (within MSSQL
server database) in Begin-SQL...End-SQL construct?

The following creates a perm. table:
Begin-SQL On-Error=Warn
!.....
   create table test_tbl (emplid char(11), name char(11) )
!.....
End-SQL

Replacing test_tbl with #test_tbl or ##test_tbl will produce an error...

Thank you

_________________________________________________________________
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users