|
 |
asp_databases thread: "GO" in a command string?
Message #1 by "Owen Mortensen" <ojm@a...> on Fri, 23 Mar 2001 15:57:34 -0700
|
|
Anyone know if it's possible to put T-SQL procedure-type syntax into a
command string (command object or recordset)?
For Example:
"CREATE TABLE #TempTable ([ID] [int] NULL) ON [PRIMARY] TEXTIMAGE_ON
[PRIMARY]
GO
INSERT INTO #TempTable (ID)
Select ID From AnotherTable WHERE condition
GO
DROP TABLE #TemptTable
GO"
Do I really need to create a stored procedure to do this?
TIA,
Owen
Message #2 by "Tomm Matthis" <matthis@b...> on Mon, 26 Mar 2001 09:33:25 -0500
|
|
I thought the "go" command was optional ??
Also, is there a reason you're not calling a SPROC for this?
Tomm
> -----Original Message-----
> From: Owen Mortensen [mailto:ojm@a...]
> Sent: Friday, March 23, 2001 5:58 PM
> To: ASP Databases
> Subject: [asp_databases] "GO" in a command string?
>
>
> Anyone know if it's possible to put T-SQL procedure-type syntax into a
> command string (command object or recordset)?
>
> For Example:
> "CREATE TABLE #TempTable ([ID] [int] NULL) ON [PRIMARY] TEXTIMAGE_ON
> [PRIMARY]
> GO
> INSERT INTO #TempTable (ID)
> Select ID From AnotherTable WHERE condition
> GO
> DROP TABLE #TemptTable
> GO"
>
> Do I really need to create a stored procedure to do this?
>
> TIA,
> Owen
>
>
>
Message #3 by "Owen Mortensen" <ojm@a...> on Mon, 26 Mar 2001 09:31:24 -0700
|
|
I'm not using a stored procedure because the a recordset on the temporary
table can't be returned from the stored procedure (at least, I haven't been
able to make it do that).
Owen
-----Original Message-----
From: Tomm Matthis [mailto:matthis@b...]
Sent: Monday, March 26, 2001 7:33 AM
To: ASP Databases
Subject: [asp_databases] RE: "GO" in a command string?
I thought the "go" command was optional ??
Also, is there a reason you're not calling a SPROC for this?
Tomm
> -----Original Message-----
> From: Owen Mortensen [mailto:ojm@a...]
> Sent: Friday, March 23, 2001 5:58 PM
> To: ASP Databases
> Subject: [asp_databases] "GO" in a command string?
>
>
> Anyone know if it's possible to put T-SQL procedure-type syntax into a
> command string (command object or recordset)?
>
> For Example:
> "CREATE TABLE #TempTable ([ID] [int] NULL) ON [PRIMARY] TEXTIMAGE_ON
> [PRIMARY]
> GO
> INSERT INTO #TempTable (ID)
> Select ID From AnotherTable WHERE condition
> GO
> DROP TABLE #TemptTable
> GO"
>
> Do I really need to create a stored procedure to do this?
>
> TIA,
> Owen
|
|
 |