Showing posts with label mysql. Show all posts
Showing posts with label mysql. Show all posts

Thursday, March 29, 2012

Create as Clustered Index Error

Hi,
I am getting an error message when I try to make an already existing,
unique index, clustered. I have other databases with the same core
design, some will allow the clustered index to be created, others
display the same error. Could anyone tell me what the error message is
refering to?
Details are:
SQL2000 SP3
The column is of data type varchar.
I am using Enterprise Manager and trying to change the index through the
design - properties window.
There are no nulls in this column.
There are relationships with six other tables, all bound to this column.
Enforce relationship for replication and Enforce relationship for
INSERTs and UPDATEs are checked.
Error Message:
'Tracks' table
- Unable to create index 'PK_Tracks'.
ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]
[Microsoft][ODBC SQL Server Driver][SQL Server]Location:
statisti.cpp:3222
Expression: cbStmtTxtLen/sizeof(WCHAR) <= cwchStmtTxtLen
SPID: 51
Process ID: 828
Many thanks
Gareth KingGareth King (QBVBKADUOIUJ@.spammotel.com) writes:
> I am getting an error message when I try to make an already existing,
> unique index, clustered. I have other databases with the same core
> design, some will allow the clustered index to be created, others
> display the same error. Could anyone tell me what the error message is
> refering to?
> Details are:
> SQL2000 SP3
> The column is of data type varchar.
> I am using Enterprise Manager and trying to change the index through the
> design - properties window.
> There are no nulls in this column.
> There are relationships with six other tables, all bound to this column.
> Enforce relationship for replication and Enforce relationship for
> INSERTs and UPDATEs are checked.
> Error Message:
> 'Tracks' table
> - Unable to create index 'PK_Tracks'.
> ODBC error: [Microsoft][ODBC SQL Server Driver][SQL Server]
> [Microsoft][ODBC SQL Server Driver][SQL Server]Location:
> statisti.cpp:3222
> Expression: cbStmtTxtLen/sizeof(WCHAR) <= cwchStmtTxtLen
> SPID: 51
> Process ID: 828
That seems like an assertion error. An assertion error is a check
that the programmer adds to his code, to be sure that some condition
is true at this point. If they are not, he aborts, because if he
continued he could cause a big mess.
Or more concisely: this is a bug in SQL Server.
What you could try if you want to create this index as quick as
possible, is to configure SQL Server to only use one single processor
and then run the CREATE INDEX statement. These errors are often due
to problems with parallelism.
If that does not work out, I would suggest that you open a case with
Microsoft. Since this is a bug in SQL Server, any expenses you may
be charged initially, should be refunded.
--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp

create app by VB.net 2003 and connect to SQL XE

Hi ,

Would it be available to connect from VB.net 2003 to SQL Server XE? VB.net 2003 works on .net framework1.1 while SQL XE works on .net framwork 2.0 so i think this couldn't be done!!

is this true?

yes this CAN/WILL work. I am assuming the real question here is having both sql & the VB03' app running on the same box. In which case the answer is YES it will work. You can have multiple versions of the Framework installed site-by-side, one of the great many benefits that .Net gives us :)sql

create another query

hi , I new in sql reporting services.
I have a report with a query . now for every record it printed I need to create another query to another table and to some calc and print the value . how do I do this .

in other reporting program that I used before, they allow me to create multi body report. each body report allow me to defined a query .
thks

There are many options available in RS. You have the ability to have multiple datasets which can be used within the same report. You also have the ability to use sub-reports and linked reports. Could you be a little more specific with what you are trying to do?|||can you point me to example how to do multiple dataset in one report?

let me give example what I try to do with a report
AAA> mean result from default query
BBB> mean result from another query

-- header
Report Listing
--Body-
student ID : AAAAAAAAAAAAAAAA
student name : AAAAAAAAAAAAAA

Family
BBBBBBBBBB
BBBBBBBBBB
BBBBBBBBBB

Classs : AAAAAAAAAAA
group : AAAAAAAAAAAA
-footer-

thks
|||

http://msdn2.microsoft.com/en-us/library/ms156288.aspx

This might help.

Create and then USE a dynamically-named database?

I have a need to create a database, and then populate it. However, the
code below doesn't work as I hoped it might (it creates the table in
the "master" database, which is Not A Good Thing). I know already
(thanks Tony!) that if you use Dynamic SQL for the USE command, then
the subsequent operations need to be Dynamic SQL as well, which is a
pity since there are over 11,000 lines of it and I don't really fancy
debugging it!

Does anyone have a cunning plan? In a nutshell, I would like to be
able to:

1. Create a new database with a derived name - as in the case below a
name based on the year, though it might be month as well.

2. Create and populate tables in this new database.

These operations would ideally be running from a scheduled job.

Any thoughts?

TIA

Edward

====================================

USE MASTER

DECLARE @.DBName VARCHAR(123)

SET @.DBName = 'MyTest_' + CAST((Year(Getdate())) AS Varchar)

if not exists(select dbid from master.dbo.sysdatabases where name =
@.DBName)

exec('CREATE DATABASE ' + @.DBName)

else

raiserror('Database already exists.',3, 1)

EXEC ('USE ' + @.DBName)

if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[TestTable]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
drop table [dbo].[TestTable]
GO

CREATE TABLE [dbo].[TestTable] (
[TestID] [int] NOT NULL ,
[Description] [varchar] (50) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO

Quote:

Originally Posted by

Does anyone have a cunning plan? In a nutshell, I would like to be
able to:
>
1. Create a new database with a derived name - as in the case below a
name based on the year, though it might be month as well.
>
2. Create and populate tables in this new database.
>


Well, if you are creating databases on the fly then there is probably
some aspect of your design which needs to be relooked.

Basically the USE clause is only in effect for as long as the EXEC
procedure is in scope, so you'll need to place all the statements in
the EXEC procedure, but I would rather recommend you pop this into a
stored procedure in a static database and simply pass the stored
procedure and the DBName as a parameter , e.g.: EXEC('sp_dostuff ' +
@.DBName). Anyway, here's how could've done it. Hope this helps:

USE MASTER

DECLARE @.DBName VARCHAR(123)

SET @.DBName = 'MyTest_' + CAST((Year(Getdate())) AS Varchar)

if not exists(select dbid from master.dbo.sysdatabases where name =
@.DBName)

exec('CREATE DATABASE ' + @.DBName)

else

raiserror('Database already exists.',3, 1)

EXEC ('USE ' + @.DBName +

' if exists (select * from dbo.sysobjects where id = ' +
'object_id(N''[dbo].[TestTable]'') and OBJECTPROPERTY(id,
N''IsUserTable'') ' +
'= 1) ' +
'drop table [dbo].[TestTable] ' +

'CREATE TABLE [dbo].[TestTable] ( ' +
' [TestID] [int] NOT NULL , ' +
' [Description] [varchar] (50) COLLATE Latin1_General_CI_AS NULL
' +
') ON [PRIMARY] '
)

Regards,
Louis|||louisyoung187@.hotmail.com wrote:

Quote:

Originally Posted by

Quote:

Originally Posted by

Does anyone have a cunning plan? In a nutshell, I would like to be
able to:

1. Create a new database with a derived name - as in the case below a
name based on the year, though it might be month as well.

2. Create and populate tables in this new database.


>
>
Well, if you are creating databases on the fly then there is probably
some aspect of your design which needs to be relooked.
>
Basically the USE clause is only in effect for as long as the EXEC
procedure is in scope, so you'll need to place all the statements in
the EXEC procedure, but I would rather recommend you pop this into a
stored procedure in a static database and simply pass the stored
procedure and the DBName as a parameter , e.g.: EXEC('sp_dostuff ' +
@.DBName). Anyway, here's how could've done it. Hope this helps:
>
USE MASTER
>
>
DECLARE @.DBName VARCHAR(123)
>
>
SET @.DBName = 'MyTest_' + CAST((Year(Getdate())) AS Varchar)
>
>
if not exists(select dbid from master.dbo.sysdatabases where name =
@.DBName)
>
>
exec('CREATE DATABASE ' + @.DBName)
>
>
else
>
>
raiserror('Database already exists.',3, 1)
>
>
EXEC ('USE ' + @.DBName +
>
>
' if exists (select * from dbo.sysobjects where id = ' +
'object_id(N''[dbo].[TestTable]'') and OBJECTPROPERTY(id,
N''IsUserTable'') ' +
'= 1) ' +
'drop table [dbo].[TestTable] ' +
>
>
>
'CREATE TABLE [dbo].[TestTable] ( ' +
' [TestID] [int] NOT NULL , ' +
' [Description] [varchar] (50) COLLATE Latin1_General_CI_AS NULL
' +
') ON [PRIMARY] '
)
>


Thanks Louis. I know your solution will work, but my script has
11,000+ lines and trying to get that to parse and run in Dynamic SQL is
not on. In conclusion, I don't think this is a candidate for an
automated job so I'll tell the client that I'll create the archive
manually, or give them the tools to do it.

Thanks

Edward|||teddysnips@.hotmail.com wrote:

Quote:

Originally Posted by

louisyoung187@.hotmail.com wrote:

Quote:

Originally Posted by

Quote:

Originally Posted by

Does anyone have a cunning plan? In a nutshell, I would like to be
able to:
>
1. Create a new database with a derived name - as in the case below a
name based on the year, though it might be month as well.
>
2. Create and populate tables in this new database.
>


Well, if you are creating databases on the fly then there is probably
some aspect of your design which needs to be relooked.

Basically the USE clause is only in effect for as long as the EXEC
procedure is in scope, so you'll need to place all the statements in
the EXEC procedure, but I would rather recommend you pop this into a
stored procedure in a static database and simply pass the stored
procedure and the DBName as a parameter , e.g.: EXEC('sp_dostuff ' +
@.DBName). Anyway, here's how could've done it. Hope this helps:

USE MASTER

DECLARE @.DBName VARCHAR(123)

SET @.DBName = 'MyTest_' + CAST((Year(Getdate())) AS Varchar)

if not exists(select dbid from master.dbo.sysdatabases where name =
@.DBName)

exec('CREATE DATABASE ' + @.DBName)

else

raiserror('Database already exists.',3, 1)

EXEC ('USE ' + @.DBName +

' if exists (select * from dbo.sysobjects where id = ' +
'object_id(N''[dbo].[TestTable]'') and OBJECTPROPERTY(id,
N''IsUserTable'') ' +
'= 1) ' +
'drop table [dbo].[TestTable] ' +

'CREATE TABLE [dbo].[TestTable] ( ' +
' [TestID] [int] NOT NULL , ' +
' [Description] [varchar] (50) COLLATE Latin1_General_CI_AS NULL
' +
') ON [PRIMARY] '
)


>
Thanks Louis. I know your solution will work, but my script has
11,000+ lines and trying to get that to parse and run in Dynamic SQL is
not on. In conclusion, I don't think this is a candidate for an
automated job so I'll tell the client that I'll create the archive
manually, or give them the tools to do it.
>
Thanks
>
Edward


If this is always happening on a particular instance, could you break
your script down into 4 or 5 steps of an SQL job? Then, after creating
your new DB, you'd just sp_update_jobstep the steps to point to the new
database and then start it? (If multiple runs are possible, you'd also
need to have some way of locking until the job has finished. If always
started from the same DB, then an applock would work)

If the above doesn't help, then some more clues about whether we're
talking about 1, or n, or an unlimited number of instances and/or
databases (from which you kick this process off), or whether you're
kicking this process off through some other means - is it a stored
proc, and job, etc?

Damien

Create and manage Store Procedures from inside VS

With a local conn to SQL2000 I can edit sprocs no problem, but if I change the connection to a remote computer (to which I have all permissions) I cannot create or manage stored procedures from within VS IDE? Is there a work around?

I noticed that a procedure written for the localhost accepts CREATE PROCEDURE and changes it to ALTER PROCEDURE. When I script the sprocs from my development machine to the server, those scripts with ALTER in them do not work. I change them to CREATE and they work fine.

I haven't found anything yet on MSDN about this, but will continue to look.

Thanks in advance,

_EHi _E

You may have better luck with this question in the SQL Server Tools - General forum.
Allan|||Thanks, I'll try there. Didn't know if it was an IDE or SQL thing.

_E

Create and Edit flat file from Sqlserver (SP).

HI All,
I use sqlserver2000 server.
I have a requirement to create a flat file(.txt) and dump the data into the file with some formatting.
I tried to use DTS but,
1. it doesnt allow me to put one row information of table to multiple line in the flat file.
2. Dynamically we cannot create n number of files we need from DTS.

Now, i am trying to create a file from sql server Stored Procedure and write data into it.

Can any one help me..
How to create and write to file from sqlserver (sp) .

Regards

Abdul lateef.Originally posted by a_lateef

I tried to use DTS but,
1. it doesnt allow me to put one row information of table to multiple line in the flat file.
2. Dynamically we cannot create n number of files we need from DTS.


Maybe if you add a ActiveX script step in the DTS package. Hope someone else can explain further...|||Greetings!

I personally would just write a script (pick a language of choice) to pull the data from the server, format it and then write it to a textfile. Although there are ways to do it in SQL Server it is very cumbersome and I think you will find that just about any other language will offer a lot more flexibility in this case. If you use something like a Visual Basic Script file you could then just set it up as a job to run when it was supposed to.

Maybe someone else could offer something else on this, good luck!

HTH!|||I am unclear as to what you want in the text file - could you explain in detail (what are your requirements) - maybe with an example.

create and drop table via vb

Hi,
How can i create and drop table in MS SQL Server 2000 via VB6? I think I should use ADOX object, but I don't know exactly how...
The following code uses ADO connection object and returns with runtime error "incorrect syntax near AS":

Dim db as ADODB.Connection
'... open connection to database

Dim strCmd As String

strCmd = "CREATE TABLE tmp_tbl AS SELECT * FROM tbl"

db.Execute strCmd

Thank you in advanceThe code you are using works on an Oracle database. The syntax for SQL Server is "SELECT...INTO...FROM".

SELECT * INTO newTable FROM oldTablesql

create and attach data base

Hi, i want to create a database with out the LOG file I did not find a way to do that, I want to create database in 2 ways

1. With CREATE DATABASE command.

2.Attach an exsiting MDF file.

is there any way i can do that, my problem is that i'm creating the data base on my local computer the using sp_detach_db to detach the DB files, then trying to attach DB files from remote computer on the LAN that i dont have write premmsion on, but then i get an error from SQL server saying:

"[Microsoft][SQL Native Client][SQL Server]Unable to open the physical file "\\lab11\sqltest\pppSignaling_log.ldf". Operating system error 5: "5(Access is denied.)"."

what can i do to solve this problem?

thanks ishay

More about storage in network path in SQL Server can be found here:

http://support.microsoft.com/kb/304261/en-us

Generally spoken, this is not supported.

HTH, Jens Suessmeyer.

http://www.slqserver2005.de

Create and Administer SQL Server Agent Jobs via Sprocs?

Hi,

Does anyone know if it is possible to set up stored procedures which will create, modify, and disable SQL Server Agent Jobs?

I have a web based application which I need to enable an administrator to change the frequency which a job runs and encapsulating the modifications in a stored procedure would be the easiest way for me to integrate this, if it's possbible.

Regards, MattHi,
You may use sp_update_jobschedule, sp_update_job etc or if you create your own sp and use tables such as sysjobschedules, sysjobs etc.
Tables and procs are located in MSDB.
Ex for updating scheduled time:
UPDATE msdb.dbo.sysjobschedules
SET active_start_time = 164000
WHERE (job_id = '8A0F1080-D22A-4F82-AE13-68F789989D1D')
AND (name = 'Once')

Try this and let us know how it work

Regards|||Thanks Tommy,

Going to give this a shot this afternoon. I'll let you know how it turns out.

Create and access database through ftp

I have to create a website and a database, but I 've only access for the server by ftp.

Is there a possibility to create and run some kind of sql script automaticly if I've only have access via ftp?!

(Using sqlserver 2000)

tia john

No, to the best of my knowledge you cannot run a SQL script solely through FTP. Surely your ISP must give you some sort of interface for creating tables?

Create an XML Schema for a SQL Database structure

Hey,

I was wondering does anyone know a way to get the structure, with relationships, of a Sql Database and generate a XML Schema. I want to use the Schema to build a CrystalReport.

Thanks!
-KevinCheck this artilce;

Retrieving Objects from SQL Server Using SQLXML and Serialization
http://www.15seconds.com/issue/040713.htm

Create an XML file from a stored procedure

I'm trying to create a temp xml file to to convert it eventually into an excel file.

using C#

I am calling a stored procedure and from that data retrieved I want to write it in xml format.

I tried using the xmlTextWriter.. but I get an exception, it refers to a token..(?)

I am new to using xml, so any help would be great..

Can I write an xml file by using a streamWriter or writing all bytes?

Thanks,

kt

You haven't mentioned if you are using SQL Server 2000 or 2005.
If its 2000, then check the FOR XML {AUTO, RAW, EXPLICIT} syntax in books online.
If its 2005 you might want to use the FOR XML PATH.

These will return for you the results in the XML format you want and you might not really need to format it manually using C#.

Hope that helps!
|||

I'm using SQL Server 2005...

You wouldn't possibly know any good resources on formatting.. for using "FOR XML PATH"..?

sql

Create an XML file from a stored procedure

I'm trying to create a temp xml file to to convert it eventually into an excel file.

using C#

I am calling a stored procedure and from that data retrieved I want to write it in xml format.

I tried using the xmlTextWriter.. but I get an exception, it refers to a token..(?)

I am new to using xml, so any help would be great..

Can I write an xml file by using a streamWriter or writing all bytes?

Thanks,

kt

You haven't mentioned if you are using SQL Server 2000 or 2005.
If its 2000, then check the FOR XML {AUTO, RAW, EXPLICIT} syntax in books online.
If its 2005 you might want to use the FOR XML PATH.

These will return for you the results in the XML format you want and you might not really need to format it manually using C#.

Hope that helps!
|||

I'm using SQL Server 2005...

You wouldn't possibly know any good resources on formatting.. for using "FOR XML PATH"..?

Create an SQL View from VBA

Hello All;

I'm new to SQL, and developing my first application using SQL 2000 as the back end for my data.

Can anyone tell me if I can create an SQL View from VBA?

I'm trying to create a data view that access various records from a single table, and it has to distribute that data 2 14 different subforms, representing different days in a 2 week period, which is distingiushed by a field called "Day", that is numbered from 1 to 14.

I also have a summary subform that has the weekly summary (days 1 to 7 and 8 to 14) on seperate subforms. In total I have 16 subforms, which actually source from a single table, just split depending on the day in the period.

As I see it now, creating views iis the best way for me to go, but I also have to be able to change the period id on the fly, so I'm think I have to use VBA to generate these views.

Does any of this make sense, and am I on the right track??You might want to consider a more dynamic solution. Do the 14 forms all hold the same data fields? If so, why not use one form and base the contents on the day of a week. Make the day of the week a field in your table and populate your form based on a stored procedure that uses the day of the week as a parameter in the query.

Fixing your schema now will pay you back many fold in the future.

Avoid creating database objects on the fly in end user applications.

To answer your question, yes this is possible. Is it a good idea? No.|||... populate your form based on a stored procedure that uses the day of the week as a parameter in the query.

Fixing your schema now will pay you back many fold in the future.

Avoid creating database objects on the fly in end user applications.

To answer your question, yes this is possible. Is it a good idea? No.

Agreed with all the points here. You might also consider a user defined function that returns a table. I don't generally use these for multi-column result sets, but it is permissible to do so.

Perhaps you could post some ddl and sample data and improve your chance for getting a useable answer...

Regards,

hmscott

Create an instance of SQL 2005

Dear friends,

I deleted the instance of SQL 2005, and now I want to create and I dont know how! Colud you tell me?
Thanks.

Insert the setup media and install it again, you have the chance to name of new instance there. (don′t forget to patch the system again after installing the instance from scratch)

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

create an installer for sql server 2005 db

Can anyone tell how can I create an installer for sql server database.

What do you mean with an installer for sql databases?

|||

The two popular methods to package a database are:

1. as empty database backup file

2. as a t-sql script

Microsoft actually employs the second method for their database deployment. You can take a look at "C:\Program Files\Microsoft SQL Server\MSSQL\Install\instnwnd.sql" file for an example of Northwind database delivery.

|||

I am desigining a small database for my application. The users who use my application, I want to let them install the sql database too. Just like .msi packages u have for web applications, where you get the gui to install the application, I am wondering if you can do the same way or some other better approach to do this.

|||

Take a look at sqlexpress redistribution.

http://www.microsoft.com/sql/editions/express/redistregister.mspx

create an installer for sql server 2005 db

Can anyone tell how can I create an installer for sql server database.

What do you mean with an installer for sql databases?

|||

The two popular methods to package a database are:

1. as empty database backup file

2. as a t-sql script

Microsoft actually employs the second method for their database deployment. You can take a look at "C:\Program Files\Microsoft SQL Server\MSSQL\Install\instnwnd.sql" file for an example of Northwind database delivery.

|||

I am desigining a small database for my application. The users who use my application, I want to let them install the sql database too. Just like .msi packages u have for web applications, where you get the gui to install the application, I am wondering if you can do the same way or some other better approach to do this.

|||

Take a look at sqlexpress redistribution.

http://www.microsoft.com/sql/editions/express/redistregister.mspx

sql

create an Indexes/Keys Property with T-SQL

is there a function that i can use in a store procedure that allow me to create an Indexes/Keys Property
thanxYes. CREATE INDEX.

-PatP|||Yes. CREATE INDEX.

-PatP

excuse me while I climb back on my barstool...um office chair...

LNHockey...seriously though... alittle more background on what you're trying to do...

"create index"....why I outta.....|||Yes ok..excuse me.

i do this
<b>
ALTER TABLE TblSalle ADD [IdTypeTaxe] [int] NOT NULL default(0)<br>
CREATE INDEX PK_TblSalle ON TblSalle (IdTypeTaxe)</b>

and would like to assign is "Selected index value" to IX_IdTypeTaxe that i userly have in a combobox when i use the sql manager

but i want to do it in a store proc..

or how can i modify that value after i add the new column to my table|||Yup...I'm lost..

Huh?|||You know when you go to design mode of the table and go properties of the selected column and select the tab "Indexes/keys". under that you can switch the type "Primary key to Index" ?? !!!

just wondering if we can do the same thing in a Store proc using a function kind of thing

thanx !

CREATE an INDEX when using CREATE TABLE?

Is there a way to create a index with create table when it is not a primary
key or unique?
Please see below, to see where I am getting lost.
I can create the index using the code below, but I can not see how to create
the index using CREATE TABLE.
drop table customer
-- Customer Table
CREATE TABLE customer
( personID int not null,
userID varchar(10) null
-- cust_userID_ind NONCLUSTERED (userid)
-- CONSTRAINT cust_userID_ind NONCLUSTERED (userid)
,
since smalldatetime not null,
notes varchar(1000) null,
lastupdate smalldatetime not null,
updateby varchar(10) not null,
CONSTRAINT PK_cust_personID PRIMARY KEY CLUSTERED(personID),
-- CONSTRAINT cust_userID_ind NONCLUSTERED (userid),
CONSTRAINT FK_cust_personID FOREIGN KEY (personID) REFERENCES
person(personID),
CONSTRAINT FK_cust_updateby FOREIGN KEY (updateby) REFERENCES
users(userID)
)
go
CREATE INDEX cust_userID_ind
ON customer (userID)
goHi,
Only the Indexes created based on the constraints (PRIMARY AND UNIQUE) will
be created using a
Create Table command.
Other Indexes needs to be created using CREATE INDEX command.
Thanks
Hari
SQL Server MVP
"DazedAndConfused" <AceMagoo61@.yahoo.com> wrote in message
news:uHs5M65uFHA.2312@.TK2MSFTNGP14.phx.gbl...
> Is there a way to create a index with create table when it is not a
> primary key or unique?
> Please see below, to see where I am getting lost.
> I can create the index using the code below, but I can not see how to
> create the index using CREATE TABLE.
> drop table customer
> -- Customer Table
> CREATE TABLE customer
> ( personID int not null,
> userID varchar(10) null
> -- cust_userID_ind NONCLUSTERED (userid)
> -- CONSTRAINT cust_userID_ind NONCLUSTERED (userid)
> ,
> since smalldatetime not null,
> notes varchar(1000) null,
> lastupdate smalldatetime not null,
> updateby varchar(10) not null,
> CONSTRAINT PK_cust_personID PRIMARY KEY CLUSTERED(personID),
> -- CONSTRAINT cust_userID_ind NONCLUSTERED (userid),
> CONSTRAINT FK_cust_personID FOREIGN KEY (personID) REFERENCES
> person(personID),
> CONSTRAINT FK_cust_updateby FOREIGN KEY (updateby) REFERENCES
> users(userID)
> )
> go
> CREATE INDEX cust_userID_ind
> ON customer (userID)
> go
>|||Thank you
"Hari Pra" <hari_pra_k@.hotmail.com> wrote in message
news:uWYaqA6uFHA.740@.TK2MSFTNGP10.phx.gbl...
> Hi,
> Only the Indexes created based on the constraints (PRIMARY AND UNIQUE)
> will be created using a
> Create Table command.
> Other Indexes needs to be created using CREATE INDEX command.
> Thanks
> Hari
> SQL Server MVP
> "DazedAndConfused" <AceMagoo61@.yahoo.com> wrote in message
> news:uHs5M65uFHA.2312@.TK2MSFTNGP14.phx.gbl...
>

Create an index in a PDF file

Hi!!

I have a report that is exported to a PDF file... Is possible to get an index in the beginning of the file? I have the page number at the bottom of each page but i would need an index...

Thx in advance!!

Any idea? Isn′t possible to do it? At the moment, I havent found anything linked with this...|||

Hi Sergio,

Do you mean a document map? Check out this link: http://msdn2.microsoft.com/en-us/library/ms156383.aspx

|||

Hi Brad!!

not exactly... i would like to appear something similar but in a page in the beginning of the PDF document including the page number where each element is, i.e. the tables of the document... is there any option to do this? it′s very similar to the document map but with the page number...

I see two problems:

- I was thinking of using "=Globals.PageNumber" but i can′t, it says me that only can be placed in the header or the footer...

- and the other problem is setting the content of the document map in a page of the PDF... could I do this?

Perhaps, this is a bit difficult but I am always looking for challenges ... any suggestions? thx in advance!!

Sergio

|||I know of no way to accomplish exactly what you are looking for sorry to say. The document map links to items as repeated on pages. But I am not sure what you mean by "setting the content of the document map in a page of the PDF". If you mean as a page, there is no way to control this.|||

Hi Brad,

that was exactly i ment: i want to show it as a page, but if there is no way to do it... anyway, thank you for your help...

Sergio