Click here to Skip to main content
15,908,455 members
Home / Discussions / Database
   

Database

 
GeneralRe: whats wrong with this function Pin
Anonymous7-Jun-05 2:44
Anonymous7-Jun-05 2:44 
GeneralOleDbDataAdapter Vs ExecuteNonQuery Pin
myNameIsRon6-Jun-05 18:22
myNameIsRon6-Jun-05 18:22 
GeneralRe: OleDbDataAdapter Vs ExecuteNonQuery Pin
Christian Graus6-Jun-05 18:27
protectorChristian Graus6-Jun-05 18:27 
GeneralRe: OleDbDataAdapter Vs ExecuteNonQuery Pin
myNameIsRon6-Jun-05 18:55
myNameIsRon6-Jun-05 18:55 
GeneralRe: OleDbDataAdapter Vs ExecuteNonQuery Pin
Christian Graus6-Jun-05 18:59
protectorChristian Graus6-Jun-05 18:59 
GeneralRe: OleDbDataAdapter Vs ExecuteNonQuery Pin
Colin Angus Mackay6-Jun-05 21:30
Colin Angus Mackay6-Jun-05 21:30 
GeneralASP.NET and DAAB Pin
cbh5g6-Jun-05 9:53
cbh5g6-Jun-05 9:53 
GeneralUsing a Stored Proc parameter as a tablename Pin
Dan Neely6-Jun-05 8:16
Dan Neely6-Jun-05 8:16 
I'm using sql server 2000.

Is it possible to use a parameter passed to a stored procedure as the name of a table in a query? If I hardcode the table name into the query it works fine. But when I try changing the procedure to have the name passed, the syntax check fails with "Error 170: line 2: Incorrect synatax Near '@Tablename'."

[code]
CREATE PROCEDURE CreateTestTable2 @Tablename char(30) AS
CREATE TABLE @Tablename
(
TestID INT PRIMARY KEY NOT NULL,
TestInt INT,
TestString VARCHAR(10)
)
GO
[/code]
GeneralRe: Using a Stored Proc parameter as a tablename Pin
Colin Angus Mackay6-Jun-05 8:24
Colin Angus Mackay6-Jun-05 8:24 
GeneralRe: Using a Stored Proc parameter as a tablename Pin
Dan Neely6-Jun-05 8:38
Dan Neely6-Jun-05 8:38 
GeneralAvoid NULL values, causes Exception Pin
Miekec6-Jun-05 5:41
sussMiekec6-Jun-05 5:41 
GeneralRe: Avoid NULL values, causes Exception Pin
Luis Alonso Ramos6-Jun-05 7:00
Luis Alonso Ramos6-Jun-05 7:00 
GeneralRe: Avoid NULL values, causes Exception Pin
Colin Angus Mackay6-Jun-05 8:17
Colin Angus Mackay6-Jun-05 8:17 
GeneralProductColumn Pin
albCode6-Jun-05 2:42
albCode6-Jun-05 2:42 
GeneralRe: ProductColumn Pin
oykica6-Jun-05 7:14
oykica6-Jun-05 7:14 
GeneralRe: ProductColumn Pin
Colin Angus Mackay6-Jun-05 8:13
Colin Angus Mackay6-Jun-05 8:13 
GeneralRe: ProductColumn Pin
oykica7-Jun-05 7:14
oykica7-Jun-05 7:14 
GeneralRe: ProductColumn Pin
Colin Angus Mackay6-Jun-05 8:15
Colin Angus Mackay6-Jun-05 8:15 
GeneralRe: ProductColumn Pin
oykica7-Jun-05 6:59
oykica7-Jun-05 6:59 
GeneralNHibernate: Criteria query - Parent's property as select criteria. Pin
devvvy5-Jun-05 22:01
devvvy5-Jun-05 22:01 
GeneralRe: NHibernate: Criteria query - Parent's property as select criteria. Pin
Jeff Martin6-Jun-05 12:37
Jeff Martin6-Jun-05 12:37 
GeneralRe: NHibernate: Criteria query - Parent's property as select criteria. Pin
devvvy6-Jun-05 16:18
devvvy6-Jun-05 16:18 
GeneralNumbers of rows different in Q.A and in E.M.!! Pin
under28115-Jun-05 18:20
under28115-Jun-05 18:20 
GeneralRe: Numbers of rows different in Q.A and in E.M.!! Pin
Colin Angus Mackay5-Jun-05 20:53
Colin Angus Mackay5-Jun-05 20:53 
GeneralRe: Numbers of rows different in Q.A and in E.M.!! Pin
under28115-Jun-05 21:21
under28115-Jun-05 21:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.