Subform Problem With Unique-table-property Set In Access Adp

Jul 20, 2005

Dear All,

W2000
Office2000
Access adp
SQLserver DB

Problem:
Adding a new property for a company in the subform.
The FIRST time I Select a property in combobox CPROP_PRP_ID the subform act
strange.
1. The selected value doen't show in the combobox!
2. The sortorder of the subform changes!
Reselecting the same value in the combobox acts normal and adding gives no
problem.
Adding a second property for the same company acts normal.

Please HELP, I can't solve this problem!
All specifications below.

Tables:
COMPANY: COM_ID, COM_NAME, etc.
PROPERTY: PRP_ID, PRP_NAME, ETC.
COMPANY_PROPERTY: CPROP_COM_ID, CPROP_PRP_ID, CPROP_VALUE

FRM_COMPANY: source = table COMPANY
SUBFRM_COMPRP:
1. SubFrm source = view (see sql)
SELECT COMPANY_PROPERTY.CPROP_COM_ID,
COMPANY_PROPERTY.CPROP_PRP_ID,
PROPERTY.PRP_NAME,
COMPANY_PROPERTY.CPROP_VALUE
FROM dbo.COMPANY_PROPERTY INNER JOIN
dbo.PROPERTY ON
dbo.COMPANY_PROPERTY.CPROP_PRP_ID = dbo.PROPERTY.PRP_ID
2. SubFrm: Order By = ViewComPrpsSubFrmSource.PRP_NAME to sort by
PROPERTY.PRP_NAME
3. SubFrm: Unique table = COMPANY_PROPERTY
4. Controls:
4.1.combobox that holds CPROP_PRP_ID (Rowsource=SELECT PRP_ID, PRP_NAME FROM
PROPERTY WHERE (PRP_COMPANY = 1) ORDER BY PRP_NAME)
4.2. CPROP_VALUE

View 1 Replies


ADVERTISEMENT

To Create Unique Table Names And Access Them In Code...

Jan 17, 2006

Hi all,My program is a central data processing application built in ASP.We have different companies that use different web pages on another webapplication (from different countries) to load some inventory data(merchandise - clothes).Here is my requirement: Load different types of data (in differentformats) into a common set of tables, to do this I have to firstfilter, do lookup's, use cross-reference tables on this data and thenload it into a couple of tables.Since data is so different everytime, I want to have one main storedprocedure in which I can build the table (I know the format of thisdata so I know what columns/types to create) into which I will feed thedata.After this I will create other stored procs/udf's that reference thistable (probably from the same main stored proc) 'cleanse' the databefore loading into the actual tables.How feasible is my approach? (if you can call it one :-) I do not wantto have seperate tables for each country, that will be too many and sothis plan...If not any other ideas will be really helpful.thanks much

View 3 Replies View Related

Subform Problem

Apr 10, 2006

The question I have is a bit complicated but I'm hoping someone can help me out.

I am using SQL Express as the back end database, connecting through MS Access and using VBA to do the code. I have created a project in Access and in it I have a form in which I created a subform. The subform has a stored procedure as it's record source, the problem is that in order to keep the data in the subform in sync with the data in the form the stored procedure needs a parameter to retrieve the correct data. How does one pass that parameter as well as the stored procedure on the record source setting?

I have been able to do combolist population, or data retrieval using stored procedure but it doesn't seem to be working with populating the subform.

'create a connection to database
Set Cnxn = New ADODB.Connection
Cnxn.Open strCnxn

'Populate the PO Number text box
Dim cmdUnitPrice As ADODB.Command
Dim prmUnitPrice As ADODB.Parameter
Dim rstUnitPrice As ADODB.Recordset
Dim strSQLUnitPrice As String

'Define a command object to call stored procedure
Set cmdUnitPrice = New ADODB.Command
Set cmdUnitPrice.ActiveConnection = Cnxn

'set the criteria to the stored procedure called
strSQLUnitPrice = "sp_GetUnitPrice"
cmdUnitPrice.CommandText = strSQLUnitPrice
cmdUnitPrice.CommandType = adCmdStoredProc
cmdUnitPrice.CommandTimeout = 15

'define the stored procedure's input parameter
Set prmUnitPrice = New ADODB.Parameter
prmUnitPrice.Type = adInteger
prmUnitPrice.Size = 3
prmUnitPrice.Direction = adParamInput
prmUnitPrice.Value = intProdID
cmdUnitPrice.Parameters.Append prmUnitPrice

'create a recordset by executing the command
Set rstUnitPrice = cmdUnitPrice.Execute()

dblUnitPrice = rstUnitPrice.Fields(0)

rstUnitPrice.Close

Set rstUnitPrice = Nothing

In the case of a list I would use a while loop to enter all the values that the recordset returned.

Rodrigo

View 1 Replies View Related

Use Sql Statemetn To Query Subform.

Nov 16, 2006

I would like to filter a subform by using a sql statement in vba.

I want to be able to say. afterupdate on a combo box. select "*" where[excd]<>"ne" and [billstatus] = bu then select the items where [excd]="Ne" and [billstatus]<>= bu.

What I want is all the "BU bill status that [excd] does not equal "ne" and all the items were {excd] = ne but the bill status does not equal bu.



Hope H.

View 2 Replies View Related

Error Sorting Subform

Apr 20, 2006

Has anyone ever gotten this error message when sorting an Access Project subform based on an SQL table?

"column prefix [name of subform] does not match with the table name or alias used in the query".

I built a main parts form from a SQL table [Parts] using Access Project. I then added a subform [FSinvPARThistory] based on another SQL table [PartHistory] to record history for the part. The two are linked together using primary key 'ID'. I can sort the subform but then when I go to select another record on the main form I get the above error message.

Can you not sort a subform? If not, how can I prevent users from inadvertantly sorting a subform and getting the same message?

Thanks.

View 1 Replies View Related

Access To The Property Values For My Expressions

Oct 2, 2006

I may be looking too hard for this but I can't find a way around it.

I have an Expression and in that expression, I want to access a property on the same object (it would be great to get the properties of other objects as well).

Example: I have a flat file connection where I defined the name of the flat file in my ConnectionString. I also have a variable that I have it linked to my dtsConfig which points to the proper folder name at run time.

How can I create an expression similar to this:

@[User::strFolder] + @[Connectionstring]

where @[User::strFolder] is my variable and points to the correct folder for the given server the package is running on and @[Conenctionstring] is my made up name to access the VALUE of the Connectionstring that I have for this flat file.

So if I have the following:

in my connectionstring property: flatfile.txt

in my strFolder derived from dtsConfig at runtime: E:etl_data

I would like my final connectionstring to look as follow:

E:etl_dataflatfile.txt

So far I know I can do it with two variables but it would be great if I could reuse the property values of the current object for my expressions or any other object.

Perhaps this value is available thru the script where I can access "any" property in my dtsx and store it into another variable and then use it. This option at least allows me to reuse code instead of hardcoding table name (connectionstring) into my variables.

Did I make this too difficult and there is a simple way to access an object's property inside the expression builder?



Thanks

Anatole

View 4 Replies View Related

Data Access Error - ConnectionString Property

Mar 29, 2006

Hi guys,
I'm getting this error:System.InvalidOperationException: The ConnectionString property has not been initialized
when I'm trying to connect to an SQL database using the following code:
Dim mySelectQuery As String = "SELECT [tabl_id] FROM [myTable]"Dim myConnection As New SqlConnection(System.Configuration.ConfigurationManager.AppSettings("myConnString"))Dim myCommand As New SqlCommand(mySelectQuery, myConnection)myConnection.Open()Dim myReader As SqlDataReadermyReader = myCommand.ExecuteReader()While myReader.Read()   Response.Write(myReader("tabl_id") & "<br/>")End WhilemyConnection.Close()
and in web.config:
<appSettings/>   <connectionStrings>      <add name="myConnString" connectionString="Data Source=100.100.100.100;Initial Catalog=myDatabase;User ID=me;Password=password" providerName="System.Data.SqlClient"/>   </connectionStrings>
If I place the actual connection string inside instead of trying to reference the web.config setting it works, but using 'System.Configuration.ConfigurationManager.AppSettings' returns the error. Is there something I'm doing wrong?

View 2 Replies View Related

Howto Retrieve Access HyperlinkBase Property From ADO?

Nov 13, 2006

I'm inserting records into an Access database using ADO. One of the fields is defined as a hyperlink. I figured out the #displayname#path#subpath# formatting, but at issue is how to describe a relative path (to a filename) - I'd like to programmatically retrieve the database property 'HyperlinkBase' so I can properly specify the relative path. Is there some provider-specific schema that I can use to get this info for the Access file the Connection object references? I find example code for getting hyperlink base and other builtin document properties for Word, PowerPoint, Visio, but can't seem to find this for Access.

Access 2003/Microsoft.Jet.OLEDB.4.0



Thanks,



Dave

View 1 Replies View Related

Can I Get Unique Records Using Squel Query In MS-Access?

Jan 20, 2008

Hi Respected,
I am working in .net, and according my client he want to see all record from table uniquely, and does not want to give order also.
for doing this i did use DISTINCT, but my problem is when i used DISTINCT the query return sorted records that is why, i need guide which will help to make DISTINCT and physical stored record from the table.
thanks.
bay
regards Rajat.

View 1 Replies View Related

Changing Code Page Property Using Property Expression Doesn't Work

Jun 16, 2006

I am having problems exporting data into a flat file using specific code page. My application has a variable "User::CodePage" that stores code page value (936, 950, 1252, etc) based on the data source. This variable is assigned to the CodePage property of desitnation file connection using Property expression.

But, when I execute the package, the CodePage property of the Destination file connection defaults to the initial value that was set for "User:CodePage" variable in design mode. I checked the value within the variable during runtime and it changes correctly for each data source. But, the property of the destinatin file connection doesn't change and results in an error.

[Flat File Destination [473]] Error: Data conversion failed. The data conversion for column "Column01" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

[DTS.Pipeline] Error: The ProcessInput method on component "Flat File Destination" (473) failed with error code 0xC02020A0. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

If I manually update the variable with correct code page and re-run the ETL, everything works fine. Just that it doesn't work during run-time mode.

Can someone please help me resolve this.

Thanks much.

View 5 Replies View Related

Value Of A Readonly Property Of Custom Task Is Not Updated In Property Window

Apr 17, 2008

Hi,

I developed a simple custom control flow component which has several read/write properties and one readonly property (lets call it ROP) whichs Get method simple returns the value of a private variable (VAR as string). In the Execute method the VAR has a value assigened. When I put the value of ROP or VAR into MsgBox I can see the correct value. However when I execute the component I can not see the value of the ROP in the property window. I see the property but its value is empty string. For example when I put a breakpoint to postexecute or check the property before click OK in a MsgBox I would expect that the property value would be updated in SSIS as well. Is there a way how to display correct values of custom tasks properties in property window?

Thanks for any hints.

View 3 Replies View Related

(URGENT) Cannot Be Written To The Property. The Expression Was Evaluated, But Cannot Be Set On The Property

May 7, 2008

Untill recently I had a smooth running SSIS package,but suddenly it throws error syaing
"OnError,,,,,,,The result of the expression

"@[User:trTextFileImpDirectory] +"SomeTextStringHere"+ @[User:trANTTextFileName] +(DT_STR,30,1252) @[User:taging_Date_Key]+ "SomeTextStringHere"
" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property."

I have child SSIS package running under a parent package (through execute package task)

I have few flat file connection managers in child package for text file import , in which I am building text file path dynamically at run time by assigning an expression in connection string property of connection manager.
The Expression is as follows



"@[User:trTextFileImpDirectory] +"SomeTextStringHere."+ @[User:trANTTextFileName] +(DT_STR,30,1252) @[User:taging_Date_Key]+ +"SomeTextStringHere"

Where @[User:trTextFileImpDirectory] is a variable which contains path of directory containg text
files.Value in this variable is assigned at runtime from parent package's variable,which in turns fetch
value from a configuration file on local server.

With my current configuration this path has been configured to some other server's directory over network ( I.e my package picks text files from some other servers folder over network)

While
"Some string here"+ @[User:trANTTextFileName]" part of file name string.

(DT_STR,30,1252) @[User:taging_Date_Key] Contain the date of processing ,value in this variable is also picked up at run time from parent package variable.

1) So can someone give me some insight into possible reason of failures.
2) Is it possible that problem arises if directory (from which I m picking text files) is assigned password or is there exist some problem in accessing forlders over network ?
3) Or there can be some problem in package configuration at design time( I.e where I m assigning value in variable from parent package vriables)?




View 10 Replies View Related

How To Add Identity Property To Existing Table?

Mar 2, 2004

Has anybody ever tried to do this. I can't figure it out. All I want to do is take an existing table that already has values in the column that I want to change and add the identity property to yes and set the identity seed and increment to a specific number. I know you can do it in the CREATE TABLE statement but is there a way to use the ALTER TABLE command?

View 4 Replies View Related

Is There Any Way To Remove IDENTITY Property On Table?

Aug 1, 2007



Is there any way to remove IDENTITY property on particular table? I tried removing IDENTITY property using Manangement studio, but this operation behind the scene use migration concept that is by creating tmp table and then populating with data; droping the orginal and renaming the tmp back to original.

Second, i want some kind of generic solution using certain system table like aya.sysobjects, sys.identitycolumn etc such a way that i should be able to remove the idenity property from all of the table accross a database.

Mandip

View 5 Replies View Related

Integration Services :: Load Incremental Data Into Fact Table When Source Table Not Have Timestamp And Unique Key

Sep 24, 2015

I have a transaction table having about 40 crore rows in source. It don't have timestamp and unique key columns. It have only Bill_month and Bill_Year columns. Actually for loading this table into staging I have added a new datetime column by adding default bill_date as 01. Then

* First we delete last 3 month data from staging tables.
* Get last 3 months data from source table.
* Load that 3 months data from source to staging table. 

We do this because we only get update for last three months data. Now I have to include this transaction table as Fact table in DW. What will be the best practice for loading the fact table by picking data form staging table. Also we have to look up with dimensions for Foreign Keys. 

* Should I implement the same method of deleting last 3 months records and loading them again. 

View 3 Replies View Related

How To Archiv Table To Another Table With Unique Number For All Rows Once + Date

Apr 28, 2008

need help
how to archiv table to another table with unique number for all rows once + date time (not the second only day time +minute)
i need whan i insert to the another table add 2 more fields (unique number , date_time )

this is the table 1 i select from
ID fname new_date val_holiday
----------------------------------------------------

111 aaaa 15/03/2008 1
111 aaaa 16/03/2008 1
111 aaaa 18/03/2008 1
111 aaaa 19/03/2008 1
111 aaaa 20/03/2008 1
111 aaaa 21/03/2008 1

222 bbb 02/05/2008 3
222 bbb 03/05/2008 3
222 bbb 04/05/2008 3
222 bbb 05/05/2008 3
222 bbb 06/05/2008 3
222 bbb 07/05/2008 3
222 bbb 08/05/2008 3
222 bbb 09/05/2008 3

333 ccc 03/04/2008 4
333 ccc 04/04/2008 4

this is the table 2 i insert into
----------------------------------
ID fname new_date val_holiday unique number date_time
--------------------------------------------------------------------------------------------------------------------

111 aaaa 15/03/2008 1 666 15/04/2008 17:03
111 aaaa 16/03/2008 1 666 15/04/2008 17:03
111 aaaa 18/03/2008 1
111 aaaa 19/03/2008 1 666 15/04/2008 17:03
111 aaaa 20/03/2008 1 666 15/04/2008 17:03
111 aaaa 21/03/2008 1 666 15/04/2008 17:03

222 bbb 02/05/2008 3 666 15/04/2008 17:03
222 bbb 03/05/2008 3
222 bbb 04/05/2008 3 666 15/04/2008 17:03
222 bbb 05/05/2008 3 666 15/04/2008 17:03
222 bbb 06/05/2008 3 666 15/04/2008 17:03
222 bbb 07/05/2008 3 666 15/04/2008 17:03
222 bbb 08/05/2008 3 666 15/04/2008 17:03
222 bbb 09/05/2008 3 666 15/04/2008 17:03

333 ccc 03/04/2008 4 666 15/04/2008 17:03
333 ccc 04/04/2008 4 666 15/04/2008 17:03

for evry archiv table to another table (insert) i need to get a unique number + date time (not the second only day time +minute)

next insert ......
ID fname new_date val_holiday unique number date_time
--------------------------------------------------------------------------------------------------------------------

111 aaaa 15/03/2008 1 667 15/04/2008 17:15
111 aaaa 16/03/2008 1 667 15/04/2008 17:15
111 aaaa 18/03/2008 1
111 aaaa 19/03/2008 1 667 15/04/2008 17:15

.........................
.....................................................................667 15/04/2008 17:15


next insert ......
ID fname new_date val_holiday unique number date_time
--------------------------------------------------------------------------------------------------------------------

111 aaaa 15/03/2008 1 668 15/04/2008 08:15
111 aaaa 16/03/2008 1 668 15/04/2008 08:15
111 aaaa 18/03/2008 1
111 aaaa 19/03/2008 1 668 15/04/2008 08:15

.........................
.....................................................................668 15/04/2008 08:15



TNX

View 3 Replies View Related

SQL 2012 :: Table Property For Retention Date?

Feb 21, 2014

I want to store data warehouse source tables and files in an Archive schema and then delete / drop them after a specified period of time.

Is there a table property that I can set (can't find one) or some other mechanism so that I can easily identify these tables with a script.

If there is no such property or feature within the database engine I will define a metadata table and record it there, but a property or similar that I can set at archive time would be very handy.

View 0 Replies View Related

Direction Property Have No Affect On Table - Microsoft Bug!?

Apr 16, 2008

Hi,


I am developing a report that should be localized dynamically. The report will have both arabic and western users. Therefore I need to use the direction property of some single text boxes, which works fine. But when setting the direction property to RTL for a table it has no affect!
You would assume that the whole tables content should be "reversed" and also the text in the table went from right to left. But no.

When viewing the report in IE and right clicked and click "View Source" you can see that the table do not have a direction style set, even though I set the property on the table in design mode.

I am going crazy about this issue! Could this be a MS bug?

I really need some help here...

PS. I have tried numerous of combinations of the different International properties to get the direction property to work - with no luck.

View 1 Replies View Related

Data Warehousing :: Hiding Text Box Based On Table Property

Oct 16, 2015

I am putting together an invoice for my company. I have a text box describing each section of the invoice, followed by a table to list out the charges. I am using multiple tables based on what type of charge the client is receiving. 

I would like to hide each section if there are no items purchased of that type. I can do this with the table using the expression "=CountRows() < 1", but I do not know how to refer to that table (call it Tablix1 for the sake of discussion) for the text box. I've tried using a ReportItems function as my basis, without success. 

View 2 Replies View Related

Truncate Table Statement And Transactions(using RetainSameConnection Property Of OledbDestinationConnection)

May 22, 2007

Hi



Can we have truncate table with in a transaction using SSIS package.

here is the scenario.

OledbDestinationConnection 's "retainsameconnection" property has been set to true.

I have added a Execute SQL Query task to "begin transaction".

second Execute SQL Query task to truncate a table. say table "A" . truncate table a(table does not exists in the database).

third to rollback a transactions if the second task fails.



Now when I am running my package, I am getting an error saying

The Rollback transaction has no corresponding "Begin transaction".

However if , I truncate a correct table , which exists in database, then all steps gets executed successfully.



And the truncaion also got rollbacked.Same goes with "Commit transaction" in the third steps(if a replace Rollback with Commit).



I don't understand this strange behavior.



Any clue is highly appreciated.



My real problem is I want to rollback a transaction, if Truncate table step fails.

View 14 Replies View Related

Unique PK In Each Table

Oct 30, 2006

Let say I have 6 tables. I want to autogenerate the PK for each table and that is unique for each table and cant be duplicated on other tables. Let say I have table with PK of 1, so table2 to table6 wouldnt have a PK of 1. If table2 have a PK of 2, table1, table3 to table6 wouldnt have a PK of 2. Same for others. Identity will not be appropriate.  Will 'uniqueidentifier' data type suffice? How bout guid? Or what must be my datatype? Or what will I do to implement this? Any links? Thanks 

View 13 Replies View Related

Unique Id In More Than One Table

Jun 6, 2007

Hello,



I have a little problem with DB, I'm using MS SQL 2005 Express edition.

I have a few tables in my DB, every table contains a list of objects and I need unique ID for every object, I can do it for one table, but not for more then one.



Is there any solution for this problem?



Thanks

John

View 2 Replies View Related

Reseting The Unique Id If A Table.

Jul 26, 2007

I'm building a web site. there is a database.
 
I've set a primary key and unique of a field.also I set it to auto numbering.
 Everytime I insert a record , that field will increase 1 (type bigint , start from 1).
 
After lots time of inserting record , the id going to be larger number.. I wondering how can I reset that to zero?

View 1 Replies View Related

Unique Identifier Or Int For Table ID

Feb 29, 2008

I am working on some tables and would like to know which is best way to go when deciding what Type to use for Unique ID in my tables please. Int  Or uniqueIdentifier? Or is it all the same??

View 11 Replies View Related

Help Me Getting A Unique Combination From Table

Jun 18, 2004

Hi, I have following table

BetId GameId
==== ======
500 108
500 109
501 108
501 109
501 110
502 108
502 109

My query would have the form: select BetId where GameId in(108,109)
from Bets then it has to get me BetId : 500 and 502.
Not 501,since this is different combination(108,109,110) ;)

View 3 Replies View Related

How Can We Have UNIQUE Constraint To The Table...

May 19, 2008

Hello...
I was confused with UNIQUE key. Its easy to create PRIMARY KEY to the Table. Now how to alter the Table to have UNIQUE key...

Thanks
Ganesh

Solutions are easy. Understanding the problem, now, that's the hard part

View 3 Replies View Related

A Table With A Unique Field

Jul 10, 2007

Hello,

I would like to store some frequently asked questions in a database.
As those questions/answers could be translated in several languages, I was thinking of using two tables :

The first table would contain a unique field : the key wich is an id for each faq.

The second table would contain those fields :
FAQ_ID : foreign key
LANG : language
QUESTION : the question translated in the good language.
ANSWER : the answer translated in the good language.

What I find embarrassing, is that first table just contains a unique field : the id. But it allows :
- to have a table in which a line correspond to an object. It is convenient for object relational mapping.
- it is more evolutionary. If, in the future, I have to add some statistics that concerns a faq, I will have the possibility to store them in the first table, avoiding in this way to duplicate data.

But, one more time, I find a bit embarrassing having a table with a unique field...

What is your opinion about that ?

Thank you in advance for any suggestion.

mathmax

View 20 Replies View Related

How To Construct Table With Unique PK

Oct 31, 2006

Let say I have 6 tables. I want to autogenerate the PK for each table and that is unique for each table and cant be duplicated on other tables. Let say I have table with PK of 1, so table2 to table6 wouldnt have a PK of 1. If table2 have a PK of 2, table1, table3 to table6 wouldnt have a PK of 2. Same for others. Identity will not be appropriate. Will 'uniqueidentifier' data type suffice? How bout guid? Or what must be my datatype? Or what will I do to implement this? Any links? Thanks

View 8 Replies View Related

Append Only Unique Records In SQL Table

Nov 23, 2007

I have a stored procedure that appends data from a temp table to a destination table.  The procedure is called from an aspx web page. The destination table has an index on certain fields so as to not allow duplicates.
The issue I'm having is if the imported data contains some records that are unique and some that would be duplicate, the procedure stops and no records are appended. How can I have this procedure complete it's run, passing over the duplicates and appending the unique records? Since the data is in a temp table (which gets deleted after each append) should I run some sort of 'find duplicates' query, and delete the duplicates from the temp table first, then append to the destination table?
Thanks in advance.SMc

View 2 Replies View Related

Unique Counter Field In A Table - Best Way?

Oct 11, 2005

I need to to have a table that has a counter field (used to generate an id code for a record).  This is not the primary id for the field but just a counter to label a record in another table, similar to a registration code for an event.  This is a sequential counter that will start 1 and go up on each new record inserted into other tables.  What I want to do is be able to query this counter table to get the next valid number and increment the count for the next time.  This is a multi user web app so needs to prevent duplicate use of same number.How best should this be handled?  A transaction to query and update the field?

View 6 Replies View Related

Creating A Unique Temp Table.

Jan 11, 2007

Set Quoted_Identifier On
Go
Set Ansi_Nulls On
Go

Alter Procedure spReport_SomeFooReport
@SearchFromThisDate datetime = null, @SearchToThisDate datetime = null

As
Declare @TableUniqueIdentifier varchar(80), @SQLString varchar(5000)

set @TableUniqueIdentifier = newid()
set @TableUniqueIdentifier = 'Report_SomeFooReport' + @TableUniqueIdentifier
set @TableUniqueIdentifier = replace(@TableUniqueIdentifier, '-', '7')
set @SQLString = 'Create Table ' + @TableUniqueIdentifier + ' (xxx varchar(40))'
exec @SQLString

Return
Go
Set Quoted_Identifier Off
Go
Set Ansi_Nulls On
Go


-------------------------------------------
the error is:
Server: Msg 2812, Level 16, State 62, Line 12
Could not find stored procedure 'Create Table Report_SomeFooReport06EEEC8D7EA6A74D0178EDD79E999B (xxx varchar(40))'.

So may'be a format issue or something,
im trying to create "temp" tables for sql 2005 report services in my Stored procedures which would have a sql job to get deleted at 23:00

View 5 Replies View Related

How To Receive Unique Row In Database Table

Feb 26, 2013

I am getting problem in unique row in database table, but not getting unique row because I have used Distinct keyword but not getting unique row so how can we do?

I have two table one table information another table Id. But second table in two code same but I am using distinct keyword i get some row unique but second table in two row in same code but when i am fetching row same auto_id render same id create duplicate row. But I am getting only unique row.

View 1 Replies View Related

How To Know If A Table Has Non-unique Clustered Index

Oct 31, 2015

Give a user table MyTable. How to know whether the table contains a non-unique clustered index by using SQL query?

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved