Illegal Variable Name/number Error In Script Component
Feb 6, 2007
Hi There,
I am trying to populate a table in Oracle Db using SSIS. For some reason, I get this error..
illegal variable name/number
This is what I have....
Public Overrides Sub PreExecute()
oracleCmd = New OracleCommand("INSERT INTO Temp(ID) VALUES(@KEY)", oracleConn)
oracleParam = New OracleParameter("@KEY", OracleType.Number)
oracleCmd.Parameters.Add(oracleParam)
End Sub
Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
'With oracleCmd
.Parameters("@KEY").Value = CType(Row.KEY, OracleClient.OracleNumber)
.ExecuteNonQuery()
End With
End Sub
==
Row.Key returns a row from the oracel table which has one column of type numeric..
Can somebody please help me?
Thanks a lot!!
View 1 Replies
ADVERTISEMENT
Mar 16, 2007
In a Data Flow, I have the necessity to use a SSIS variable of type €œObject€? inside Script Component and assign to it the content of 'n' variables of string type.
On exiting from the script the variable of type object should contain something like in the following lines:
AAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBBBBBBBB
CCCCCCCCCCCCCCCCCCCCCCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDDDDDDDD
€¦€¦€¦€¦€¦€¦€¦.
€¦€¦€¦€¦€¦€¦€¦.
On exiting from the data flow I will use the variable of type Object in a Script Task, by reading each element in a cyclic fashion.
Is there anyone who have experienced something like this? Could anyone provide any example of that?
Thanks in advance!
View 3 Replies
View Related
Sep 26, 2006
Hi,
I am trying to develop a SSIS package which will read the records from the flat file and insert them into a destination table. I have some validations written in script component. I have declared two Read Write variables with package level scope. when i try to assign a value to the variable in the script component and run the package, the package throws me an error "The collection of variables locked for read and write access is not available outside of PostExecute".
What should be done to over come the problem please help me on this regard
Thanks
Madhavan.M
View 15 Replies
View Related
Mar 24, 2004
Hi
We are using a microsoft small bussiness server. One of our workstations get an mgrntw illegal operation error sometimes when doing an invoice in pastel premier. Does anyone know what can cause this problem and how can I fix it? The server run on windows 2000 and the workstations all use windows 98SE. This problem does not happen everyday. I formatted that computer, hoping the problem will go away but after 3 weeks it suddenly appeared again. I am not sure what version our mgrntw.exe is.
Thanx
Sonja
View 1 Replies
View Related
Apr 30, 2006
Hi All,
I have developed a simple package utilizing script component and variable. What I am trying to do is declare a variable in the parent package that can be change at run time to either 1 or 0. If 1 I want the package to succeed and branch off to run some child packages and if 0, then branch the other way and run another child package. In ether way, I want to be able to load one of the two child packages and not both.
I I declare a variable in my parent package like IsExist, int32 with default 0.
Then I have this code thanks partly to Jamie Thomson in " SSIS: Writing to a variable from a script task"
Public Sub Main()
'
' Add your code here
'
Dim t As Integer
Dim vars As Variables
Dts.VariableDispenser.LockOneForWrite("IsExists", vars)
t = CInt((Dts.Variables("IsExists").Value))
'Dts.Variables(IsExists).Value = t
If t >= 1 Then
vars.Unlock()
Dts.TaskResult = Dts.Results.Success
Else
Dts.TaskResult = Dts.Results.Failure
End If
End Sub
End Class
I also place the variable name in the ReadWriteVariables in the script component.
The problem now is it is always failing. It stopped at the script task and fail. This is not what I want. I want the package to execute another task upon failure. Anyone knows what I am doing wrong?
View 5 Replies
View Related
May 19, 2006
Hi
I am writing a custom transformation component that utilises a user variable.
Before using the variable at run time I am checking that the variable exists, but it would be nice to be able to add it if it does not. I cannot find any documentation on the subject, though I can see that the Variables class is derived from a ReadOnlyCollectionBase.
Is there a way to add a user variable with package scope from a custom component, either at run time or design time?
Thanks . . . Ed
View 1 Replies
View Related
Sep 21, 2007
Hi
How to access a variable from a script component?
I tried to access it like in a script task but it does not work!
Dts.Variables("MyVar").Value.ToString()
I also saw that many of you are using somthig like this:
Dts.VariableDispenser.LockOneForWrite("Test", vars)
But In my script Dts is not valid. What am I missing?
View 1 Replies
View Related
Sep 8, 2006
HI, is it possible to copy a row from the Input0_ProcessInputRow into another variable of a synchronous script component. I have a script component that has three outputs. What I would like to do is the following:
At first iteration, copy entire row into a variable.
For the other rows, is business key cols is different from the previous row (the one copied at previous iteration) or type 2 columns :
1-direct previous row (from the variable) to second.output
2- direct current row to the first output
3- copy the current row into the variable
If the business key cols are the same and type 2 cols are the same:
1-Direct row to the third output
My problem is that when I declare a variable as Input0Buffer and then copy the current row in it, at each subsequent iterations, the variable is updated. What I want to do is to keep the value of the previous row. I know I can do it b are differenty copying the content of all columns into separate variables but since some script components will have 150+ columns, I would like to find a simpler way to do it (like a copy of the structure of the input buffer).
The reason I use a script component is that the lookups are not updated dynamically, the rows I need to process may not exist in the target table and once inserted, they are not retreived subsequently by the buffer.
Thank you,
Cco
View 2 Replies
View Related
Oct 6, 2006
Hello Experts,
I am trying to load data to a sql table from flat file..I have a script component which will validate the data. I am also firing the errros when data validation fails. Once I encounter an error I want the whole package to be aborted. What I have done is declared a variable called errorcount (Scope :Package) and I am incrmenting this variable everytime an error is raised and next I have a Conditional Split which will check if this variable count is greater than 0 if yes I will not update the table.This is the only way I think this will work.
error I am getting is :The collection of variables locked for read and write access is not available outside of PostExecute.
I understand they r in the same data flow thats the reason I get this error but how can I by pass it ?
MY dataflow-> Flat File Source-Script Comp-Condtional Split-(If errorCount==0)-SQL Table
How can I redo the dataflow so that this err is not raised.
I have tried to add an output column (blnContinue) and use that in conditional stmt but as this is stored at row level values which have blnContinue as true are getting processed, I dont want this I just want to stop the package execution even if a single validation fails
Pardon my long question
Appreciate your help in advance
View 5 Replies
View Related
Dec 7, 2007
Hello,
I have a 'ForEach Loop Container' that does a select from a table and I use Variable Mappings to map each row set result to Package Variables in SSIS. This works fine. However, in the Data Flow, I have a Script component in which I need to access the values of those variables that have been set in the ForEach Loop Container. How do I do this?
Perhaps I'm on the wrong track but I guess I need to access the ADO Object Source variable set in the ForEach Loop Container? Through my own experimentation, I know that accessing the VariableDispenser collection only returns whatever default values that happen to be assigned to the variables in the SSIS GUI (not the values assigned during each iteration of the ForEach Loop).
Thanks,
Clive
View 16 Replies
View Related
May 8, 2008
Hi,
I have a script component that contains a script similar to that shown below;
Public Sub Main()
Dim sqlConn As New SqlConnection("Server=myserver;Database=mydb;Trusted_Connection=True;")
Dim SQLStmt As String
SQLStmt = "select top 10 CountID from mytable"
Dim sqlComm As New SqlCommand(SQLStmt, sqlConn)
sqlConn.Open()
Dim r As SqlDataReader = sqlComm.ExecuteReader()
While r.Read()
Dim MyValue As Integer
If r("CountID") IsNot DBNull.Value Then
MyValue = CInt(r("CountID "))
' HERE I WANT TO WRITE MyValue TO A PACKAGE VARIABLE AS A ROW
End If
End While
r.Close()
sqlConn.Close()
Dts.TaskResult = Dts.Results.Success
End Sub
Once i have a value assigned to MyValue, I want to write this as a row to a variable (DATATYPE Object Value VALUE System.Object) in the package which will be an ADO Recordset Destination that i can then loop through later.
Many thanks for any help
Phil Harbour
View 1 Replies
View Related
Oct 26, 2007
Hello,
I have a package that has a data lfow task. this task imports data from a db2 database (using the IBM Ole DB provider fro db2) and adds it to sql server database table. This package was created on the server. then though version control (using TFS source control) I check out the package on my local machine. and when I open the package I get the foll 3 errors.
Error 1 Validation error. Import Account Num from BMGP_BDR: DTS.Pipeline: The component metadata for "component "DataReader Source" (1113)" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.
Error 2 Error loading BMAG Download Xref Tables - bmag.dtsx: Microsoft.SqlServer.Dts.Pipeline.ComponentVersionMismatchException: The version of component "DataReader Source" (1113) is not compatible with this version of the DataFlow. [[The version or pipeline version or both for the specified component is higher than the current version. This package was probably created on a new version of DTS or the component than is installed on the current PC.]] at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostCheckAndPerformUpgrade(IDTSManagedComponentWrapper90 wrapper, Int32 lPipelineVersion)
Error 3 Error loading BMAG Download Xref Tables - bmag.dtsx: The component metadata for "component "DataReader Source" (1113)" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.
Please advice.
Thank you.
View 7 Replies
View Related
Apr 21, 2006
1) We are writing a custome Source component for Oracle with OCI calls, Could some one please let me know how to Enable Error Handling for the Same,
2) Is it possible to write Custome Error Handeling Component for SSIS? if yes could you please help me on how to write it.
Thanks in advance.
View 1 Replies
View Related
Jan 23, 2007
Hi,
I have a package which reads an Access file from a folder. My connection manager to this file is .NET providers for OledbMicrosoft Jet 4.0 OLE DB Provider.
Package works from my computer. But when I execute it on the server as a SQL Agent job, I get
The component metadata for "component "DataReader Source" (1) could not be upgraded to the newer version of the component. The PerformUpgrade method failed.
I copied the mdb file to a folder on the server which my packages have no problem reading data from.
My packages run under the same domain account as defined in proxies.
Appreciate a help.
Gulden
View 4 Replies
View Related
Oct 15, 2015
In my SSIS package I am looping multiple flat file to load data into target table. I have used one variable to get that filename. I have error log table which used to log the invalid record which come from various files.
All are working fine , except I want to log the filename also in my error log table. How can we use the package variable to assign the variable value in script component.so that I can map the output column to target table. I have created Filename column in script component in output column tab.
View 2 Replies
View Related
Jun 27, 2007
Hi all,
I am creating a customer data flow component for SSIS for use in a package. I've got some custom properties that I am exposing using the supplied advanced editor (no custom property editor here).
Some of my properties are enumerated types, and I have deciphered how to get those properties to show as dropdown lists of their respective enumerations. (For those of you who may be looking as hard as I did as to how to accomplish this, see the end of this post.)
I also have a few properties which request SSIS package variable names - such as an file name variable. However, I can't figure out how to tell the advanced editor that the property is looking for an SSIS variable, so that it can show a dropdown list of package variables, much like virtually any other Microsoft supplied Data Flow component can.
Is there a Type Converter I could specify for those custom properties? Is there another way to instruct SSIS that my custom property is expecting a variable? Or do I need to code a custom UI for editing my Data Flow Task?
To create a dropdown list of values for a custom property that represents an enum, do the following:
1. Create your enum definition, such as "public enum ThisIsMyEnum { one, two }"
2. Create a new class that inherits from TypeConverter, such as "public class MyEnumConverter : TypeConverter"
3. Override "CanConvertFrom", and return true if "sourceType == typeof(string)"
4. Override "CanConvertTo", and return true if "destinationType == typeof(string)"
5. Override "ConvertFrom", and return the enum value (such as "one" or "two" in my example) that corresponds to the string passed in the parameter "value"
6. Override "ConvertTo", and return a string that corresponds to the enum value passed in the parameter "value"
7. Override "GetStandardValuesSupported" and return true
8. Override "GetStandarValuesExclusive" and return true to indicate that ONLY the enum values should be accepted
9. Override "GetStandardValues", and return a new StandardValuesCollection constructed with Enum.GetValues() of your enum, such as "return new StandardValuesCollection(Enum.GetValues(typeof(ThisIsMyEnum)));"
10. Just above your "public enum" declaration, add a "TypeConverter" attribute to link your type converter to your enum, such as "[TypeConverter(typeof(MyEnumConverter))]"
11. In "ProvideComponentProperties", after you've created your custom property like this: "IDTSCustomProperty90 propEnum = ComponentMetaData.CustomPropertyCollection.New()", add another line to specify the TypeConverter property of the property to the full assembly name of your type converter, like so: "propEnum.TypeConverter = typeof(MyEnumConverter).AssemblyQualifiedName;"
View 11 Replies
View Related
Sep 28, 2005
In my Script Component properties I have included "ClientReportGroupId" as a ReadWrite variable. This variable is declared as a Package Variable.
View 23 Replies
View Related
Apr 13, 2000
Hi
Has anyone come across SQL Server giving errors like A row on 'page 52995' was accessed that has illegal length of 0 in database? I believe that it is due to some data on the page has been corrupted. Is there a way to prevent such problem? Can daily backup be able identify such problem?
View 1 Replies
View Related
Jul 10, 2006
I have a Data Flow Script Component(Destination Type) and in the properties I have a read/write variable called User::giRowCount
User::giRowCount is populated by a Row Count Component previously in the Data Flow.
After reading http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=97494&SiteID=1 it is very clear that you can actually only use variables in the PostExecute of a Data Flow Script Component or you will get an error
"Microsoft.SqlServer.Dts.Pipeline.ReadWriteVariablesNotAvailableException: The collection of variables locked for read and write access is not available outside of PostExecute."
What I need to do is actually create a file in the PreExecute and write the number of records = User::giRowCount as second line as part of the header, I also need to parse a read/write variable such as gsFilename to save me hardcoding the path
(Me.Variables.gsFilename.ToString),(Me.Variables.giRowCount.ToString)
-they must go in the PreExecute sub --workarounds please-here is the complete script component that creates a file with header, data and trailer --Is there any workaround
Thanks in advance Dave
Imports System
Imports System.Data
Imports System.Math
Imports System.IO
Imports System.Text
Imports System.Configuration
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Public Class ScriptMain
Inherits UserComponent
'Dim fs As FileStream
Dim fileName As String = "F:FilePickUpMyfilename.csv"
'Dim fileName = (Me.Variables.gsFilename.ToString)
Dim myFile As FileInfo = New FileInfo(fileName)
Dim sw As StreamWriter = myFile.CreateText
Dim sbRecord As StringBuilder = New StringBuilder
Public Overrides Sub PreExecute()
sbRecord.Append("RECORD_START").Append(vbNewLine)
End Sub
Public Overrides Sub ParsedInput_ProcessInputRow(ByVal Row As ParsedInputBuffer)
sbRecord.Append(Row.ProjectID.ToString)
sbRecord.Append(Row.TransactionRefNum.ToString)
sbRecord.Append(Row.BillToCustomerNum.ToString)
sbRecord.Append(Row.BillToAccountNum.ToString)
sbRecord.Append(Row.BillToLineNum.ToString)
sbRecord.Append(Row.BillToReassignmentNum.ToString)
sbRecord.Append(Row.ChargeCode.ToString)
sbRecord.Append(Row.NotificationMethod.ToString)
sbRecord.Append(Row.AdjustmentAmount.ToString)
sbRecord.Append(Row.AdjustmentDate.ToString)
sbRecord.Append(Row.ReparationGivenFlag)
sbRecord.Append(Row.BillingSystemProcessingErrorCode.ToString).Append(vbNewLine)
End Sub
Public Overrides Sub PostExecute()
sbRecord.Append("RECORD_COUNT").Append((vbTab))
sbRecord.Append(Me.Variables.giRowCount.ToString).Append(vbNewLine)
sbRecord.Append("RECORD_END").Append(vbNewLine)
'Now write to file before next record extract
sw.Write(sbRecord.ToString)
'Clear contents of String Builder
sbRecord.Remove(0, sbRecord.Length)
'Close file
sw.Close()
End Sub
End Class
Has anyone got a workaround
thanks in advance
Dave
View 6 Replies
View Related
Jun 10, 2008
I have a user who registered with the name "#1baseballer" in my asp.net membership database. Now when I try to manage his account using my administration utility I receive "Object reference not set to an instance of an object error". Is this because of his chosen user name and can I fix this in my code?
View 2 Replies
View Related
Dec 4, 2006
i'm trying to figure out a way to replace a handful of "Illegal" characters in our SQL tables. We are using Project Server and some of these characters are causing errors or other issues in OLAP Cube.
I'm trying to figure out a way to change the following characters to an underscore ( _ ) :
illegal characters are: / ( ) . , ' : - &
Can I just create a SQL query that loops through a column to replace all of these characters at once? or do I have to replace one character at a time?! I tested replacing one at a time and it works with the REPLACE function.
I'm not all that familiar with MSSQL, I've spent past few years working with MySQL instead.
how can my query loop? or would using CASE help me out?
thanks. any feedback is much appreciated. If you need to know more, let me know.
regards
View 2 Replies
View Related
Jul 26, 2006
Environment: Server Windows 2003 SP1, VS 2005
I ran into this problem trying to deploy an SSIS package to a development server. I tested by creating a simple SSIS package on the server itself. Two blocks an OLE DB Source block and an OLE DB Destination block. Two tables in the same database, one the source, the other the destination. Connection manager test connection works fine.
Package will execute from the IDE (locally on the development server), source block will read the table subcessfully, but when the destination block executes it fails and will stay yellow in the status screen. during the execution SQLDumper.exe is triggered. Analyzing the dump tells me:
(2b40.2938): Illegal instruction - code c000001d (first/second chance not available)
eax=04008010 ebx=00000004 ecx=00000010 edx=00000000 esi=00000940 edi=00000000
eip=7c82ed54 esp=0422f598 ebp=0422f608 iopl=0 nv up ei ng nz ac po cy
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000297
An illegal instruction was hit.
This error exists when the destination block is either an OLE DB Destinaltion or a SQL Server Destination block and the SSIS application is executing locally.
Strangely enough if I run this same SSIS application from my development laptop it works fine against either my local datbase instance (on the laptop) or against the development server (App running on laptop, DB on development server).
I have scanned the forums and search engines for this type of error, so any assistance would be appreciated.
Thanks...
View 4 Replies
View Related
Nov 13, 2015
I have a illegal keyword table name as "Illegal_keyword_Master" where near about 2000 illegal keyword are stored... Now I have a big Sentence(bunch of words)...
If any illegal is keywords is found from "Illegal_keyword_Master" table in that sentence then the sentence is "banned" otherwise the sentence is "OK"....
View 11 Replies
View Related
Nov 30, 2004
I'm stumped how to achieve my goal using stored procedures. I have a front end application that calls stored procedures to insert data. For example, customer pays a bill. To complete the payment process a command in the app is run which calls a stored procedure to insert a tender record and a second stored procedure to insert a transaction record. A customer can pay one to many bills at one time so the number of times the insert stored procedures are called is variable. I want to be able to use the begin transaction, commit and rollback statements so if there's a problem inserting a record all the inserts are rolled back. Previously the app used the visual basic begin transaction, commit, rollback, statements however I want to now use SQL stored procedures for inserts and updates. I've been struggling with this for some time and hope someone can help me.
View 4 Replies
View Related
Mar 5, 2015
I have created a kind of search function in my Excel sheet where the user can select multiple items from different listboxes.
To save the items I use an array. So in one case only 1 items off the array is filled, but another time maybe 3 items are filled in the array.
I use the array to search in a SQL database (this is string rva(i) in the code). But when the array is empty it results in an error.
This is what I have so far. (the rule at the bottom won't work also )
rc.Open "SELECT [Datum],[RvA_Nr], [RvA_Letter], [Afdeling], [EVAL], [Matrix], [Component], [AS3000], [AP04], [Rec] FROM dbo.QHSE_2ndline_history " _
& "WHERE [Afdeling] = '" & afd & "' AND [Datum] >= '" & datum1 & "' AND [Datum] <= '" & datum2 & "' AND " _
& "CASE WHEN '" & rva(1) & "' <> '' then [RvA_Nr] = '" & rva(1) & "' END AND" _
& "([Matrix] LIKE '%" & matrix(1) & "%' OR [Matrix] LIKE '%" & matrix(2) & "%' OR [Matrix] LIKE '%" & matrix(3) & "%' OR
[Code] .....
View 1 Replies
View Related
Jun 14, 2007
I have a SP search_post (e.g)
@id int,
@author varchar(40),
@keyword varchar(40),
select * from
posts
where
id = @id and author =@author and message like @keyword
in my case a user can choose to search by one or more of this elements.
what will be the best approach to write a statement that will account for the posibility of the user leaving some "parameters" empty, while also allowing for the posibility that all parameters could be filled
one approach I have thought out is this
if (@id IS NOT null)
select * from
posts where id = @id
if (@author IS NOT null)
select * from
posts where author= @author
if (@keyword IS NOT null)
select * from
posts where keyword = (@keyword
but this does not really take care of the posibility that all of them or some of them will be null while others will not
any suggestions ?
View 5 Replies
View Related
Nov 9, 2007
Background: Customer sale records are kept in table (userHistory) that records: bookID, userID, and salesDate.
Objective: To find all the customers that have purchased the same books as any given customer, say customer1. For example, customer1 bought books bookA, bookB, and bookC; the goal is to find all of the other customers who also bought these books.
My First Attempt:
SELECT DISTINCT UH1.userID
FROM userHistory as UH1, userHistory as UH2, userHistory as UH3
WHERE UH1.userid = UH2.userID
ANDUH2.userid = UH3.userID
ANDUH1.bookID = ‘bookA’
ANDUH2.bookID = ‘bookB’
ANDUH3.bookID = ‘bookC’
AND UH1.userID <> ‘customer1’
The problem here is that it cannot handle any more/less than 3 books. The above should work well for 3 books, but what if there are 2 books or 12 books? Does anybody have any suggested queries to handle a variable amount of books (eg joins)?
Thank you kindly.
Adam
View 6 Replies
View Related
May 2, 2007
We are trying to use the Import/export wizard to load a text file to a SQL Server 2005 database. The input file has a variable number of columns per row. For example, the first row has 3 columns, the second has 7, the third has 3, etc. The number of columns varies from 2 to 9 in the input file. The columns are separated by an uptick (`) and the rows are terminated by {CR}{LF}. We are using code page 1252. On processing, the wizard reads the first row (with 3 columns) ok, but then assumes all the other rows have 3 columns and parses the rows accordingly, ignoring the field and row terminators.
The process worked fine with SQL Server 2000. Is there some setting that we are missing, or some configuration on the database that we should be checking?
Thank You
View 3 Replies
View Related
Feb 6, 2008
Hi, I need to update a number of columns in a number of tables - I just don't know how many. In this case, I am updating all varchar fields and nvarchar fields to be converted to lower case. The problem is that the table structure is amended over time as columns are added programmatically, so I do not know which tables have which columns and if so which of them are varchars.
I can get a table of which fields I need to update using:
SELECT TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE
INTO tblTempLCase
FROM information_schema.columns
WHERE DATA_TYPE LIKE '%varchar'
and I can do the update with UPDATE tblxxx SET column = LOWER(column)
But what I don't know is how to step through my temporary table and do the updates. I can do it in ASP.NET, but that involves pushing commands and data between ASP and SQL, and will be too slow. How do I do it in SQL?
Thanks,
Dave Stephens
View 3 Replies
View Related
Feb 6, 2008
Hi,
I need to update a number of columns within a number of tables - I just don't know how many. In this case, I want to convert all varchar and nvarchar columns to lower-case versions of themselves. The problem is that the table structure is changed programatically, and so at any point in time I cannot be certain what fields are in which table, and what data type they are.
I know that I can get a lit of columns using:
SELECT TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE
INTO tblTempLCase
FROM information_schema.columns
WHERE DATA_TYPE LIKE '%varchar'
and do the update using:
UPDATE tblABCDE SET column = LOWER(column).
In ASP.NET I can pull in this temporary table using a SQL Data Adapter, and then step through the records to formulate the UPDATE statements and execute them all. However, I hope that this is possible in SQL too, so that I do not have to keep firing data/commands between ASP and SQL, as it should be quicker, and is also neater.
If so, how do you do it?
Thanks,
Dave Stephens
View 1 Replies
View Related
Feb 6, 2008
Hi,
I need to update a number of columns within a number of tables - I just don't know how many. In this case, I want to convert all varchar and nvarchar columns to lower-case versions of themselves. The problem is that the table structure is changed programatically, and so at any point in time I cannot be certain what fields are in which table, and what data type they are.
I know that I can get a lit of columns using:
SELECT TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION, DATA_TYPE
INTO tblTempLCase
FROM information_schema.columns
WHERE DATA_TYPE LIKE '%varchar'
and do the update using:
UPDATE tblABCDE SET column = LOWER(column).
In ASP.NET I can pull in this temporary table using a SQL Data Adapter, and then step through the records to formulate the UPDATE statements and execute them all. However, I hope that this is possible in SQL too, so that I do not have to keep firing data/commands between ASP and SQL, as it should be quicker, and is also neater.
If so, how do you do it?
Thanks,
Dave Stephens
View 1 Replies
View Related
Jul 26, 2006
hi!
I am getting some junk characters while executing sql task(which is a stored proceedure) when i execute the same sql environment it is fine.
User::ArchiveDir {? )ArchiveVoucherLog_6-26-2006
What is problem in here?
Any help
Thanks,
Jasmine
} String
View 1 Replies
View Related