RE: creating tables at runtime
anonymous_at_discussions.microsoft.com
Date: 05/10/04
- Next message: Matt Penning: "Re: Diacritic characters being "stripped""
- Previous message: Aaron Bertrand [MVP]: "Re: Need to return the record that contains the minimum value of one particular field"
- In reply to: Tinoco: "RE: creating tables at runtime"
- Next in thread: Joe Celko: "Re: creating tables at runtime"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 9 May 2004 21:22:29 -0700
Hi
but can u explain to me this query .
i mean where do i specify the table name from where i
have to get the row as column?
thanks
brina
>-----Original Message-----
>Hi.
>
>You can utilize this:
>
>DECLARE @SQLString NVARCHAR(500)
>
>SET @SQLString = N'CREATE TABLE [Daily] (
> [InvoiceDate] [datetime] ,
> [ProdCode] [varchar] (20) ,
> [ProdQty] [numeric](20, 8) ,' + ' @p_Col_1 ' + '
[money] '
>)'
>
>EXECUTE sp_executesql @SQLString
>
>I expect that serve you.
>
>Hermilson
>MCDBA, MCSD
>Colombia
>
>**********************************************************
**
>
>i have a problem at hand can anyone help me out?
>
>
>i have a table which contains rows . i want to create
>another table at runtime that has as its columns the row
>of the prev table. the number of rows are determined at
>runtime as such the columns are determined only at
runtime.
>
>
>for example
>
>i have table called MSP_Number_Fields in Microsoft
Project
>Server2003 database
>
>i want each row of a particular column(Num_field) as
>column for another table that will be created at runtime.
>
>the no of rows are determined at runtime.
>.
>
- Next message: Matt Penning: "Re: Diacritic characters being "stripped""
- Previous message: Aaron Bertrand [MVP]: "Re: Need to return the record that contains the minimum value of one particular field"
- In reply to: Tinoco: "RE: creating tables at runtime"
- Next in thread: Joe Celko: "Re: creating tables at runtime"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|