Convert String From Textbox To Int - SQL Code
Jan 14, 2008
How do I convert for example, a value comming from C# app "TextboxGBDataDeleted" to int column GBdatadeleted? I have a RangeValidator on this textbox to accept only numbers. I don't want to write C# code. I woul prefer to do this is SQL. Thank you.
My SQL update statement:
INSERT INTO KPITbl
(Lead, WRM, PTDB, PAR, PM, RequestingLOB, LOB, StartLocation, FinishLocation, Description, ProjectType, ServerName, ServerType, DCOorSTANDALONE, Responsible,
Status, RAG, StartDates, EndDates, TreeOrDomainImpacted, NumOfSites, NumOfUsers, GBdatamoved, GBdatadeleted, NumOfSrvrsAdded,
NumOfSrvrsDecommed, NumOfAppsDeployed, EUTEngineeringConsult, Comments, TimeSpend, Complexity, ECM, LastUpdated)
VALUES (@Lead,@WRM,@PTDB,@PAR,@PM,@RequestingLOB,@LOB,@StartLocation,@FinishLocation,@Description,@ProjectType,@ServerName,@ServerType,@DCOorSTANDALONE,@Responsible,@Status,@RAG,@StartDates,@EndDates,@TreeOrDomainImpacted,@NumOfSites,@NumOfUsers,@GBdatamoved,@GBdatadeleted,@NumOfSrvrsAdded,@NumOfSrvrsDecommed,@NumOfAppsDeployed,@EUTEngineeringConsult,@Comments,@TimeSpend,@Complexity,@ECM,(getdate() ) )
~~~~~~~~~~~~~~~~~~~~~~MY TABLE~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CREATE TABLE [dbo].[KPITbl](
[TaskID] [int] IDENTITY(1,1) NOT NULL,
[Lead] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[WRM] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PTDB] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PAR] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PM] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RequestingLOB] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LOB] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[StartLocation] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FinishLocation] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Description] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ProjectType] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServerName] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ServerType] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Responsible] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Status] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RAG] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[StartDates] [smalldatetime] NULL,
[EndDates] [smalldatetime] NULL,
[TreeorDomainImpacted] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NumOfSites] [int] NULL,
[NumOfUsers] [int] NULL,
[GBdatamoved] [int] NULL,
[GBdatadeleted] [int] NULL,
[NumOfSrvrsAdded] [int] NULL,
[NumOfSrvrsDecommed] [int] NULL,
[NumOfAppsDeployed] [int] NULL,
[EUTEngineeringConsult] [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Comments] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TimeSpend] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Complexity] [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LastUpdated] [smalldatetime] NULL,
[DCOorSTANDALONE] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ECM] [nvarchar](255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[StatusCompletedDate] [smalldatetime] NULL,
[StatusCancelledDate] [smalldatetime] NULL,
CONSTRAINT [PK_Sheet1a] PRIMARY KEY CLUSTERED
(
[TaskID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
View 4 Replies
ADVERTISEMENT
Jun 9, 2007
Hi all,I have this code that I use for my Search function:SELECT DISTINCT [MUSIC_TITLE], [MUSIC_ORIGINAL_SINGER], [MUSIC_PERFORMER]FROM t_musicWHERE (@MUSIC_TITLE IS NULL OR [MUSIC_TITLE] LIKE '%' + @MUSIC_TITLE + '%') AND (@MUSIC_ARTIST IS NULL OR ([MUSIC_ORIGINAL_SINGER] LIKE '%' + @MUSIC_ARTIST + '%' OR [MUSIC_PERFORMER] LIKE '%' + @MUSIC_ARTIST + '%')) But right now if I don't enter anything in one of the textbox (2 have two, either of them can be left empty), the above Sql statement doesn't return anything since ADO.NET can't tell an empty textbox and treat it at null... So anyone please help me how to detect an empty textbox and set that to null for the above SQL statement to work. (It work in SQL Manager Studio, when I set one of the parameter = null.) I'm very new to ASP.NET stuffs, so if someone can help me to convert that function to code-behind and help me to call it from the .aspx, that would be even better as I don't want to put the code in my .aspx page... But I'm not quite there yet. Thank you all,Kenny.
View 19 Replies
View Related
May 31, 2007
I have a problem in which I would like to use the value of the togglestate property for textbox in embedded code to drive some other logic.
My first question is, "Can it be done?" and if so, how?
View 2 Replies
View Related
Aug 15, 2006
Dear Experts,Ok, I hate to ask such a seemingly dumb question, but I'vealready spent far too much time on this. More that Iwould care to admit.In Sql server, how do I simply change a character into a number??????In Oracle, it is:select to_number(20.55)from dualTO_NUMBER(20.55)----------------20.55And we are on with our lives.In sql server, using the Northwinds database:SELECTr.regionid,STR(r.regionid,7,2) as a_string,CONVERT(numeric, STR(r.regionid,7,2)) as a_number,cast ( STR(r.regionid) as int ) as cast_to_numberFROM REGION R1 1.00112 2.00223 3.00334 4.0044SELECTr.regionid,STR(r.regionid,7,2) as a_string,CONVERT(numeric, STR(r.regionid,7,2) ) as a_number,cast (STR(r.regionid,7,2) as numeric ) as cast_to_numberFROM REGION R1 1.00112 2.00223 3.00334 4.0044Str converts from number to string in one motion.Isn't there a simple function in Sql Server to convertfrom string to number?What is the secret?Thanks
View 4 Replies
View Related
Apr 10, 2007
As I'm searching for solutions to my problem (see my most recent post before this one if you're interested), I keep coming upon "command-based expressions." I keep seeing examples such as:
= "select a,b from table1 where c=0"
I can't put that in a textbox can I? I tried it and it just spits out the string on report execution, it doesn't actually execute the command.
So what's up? Should that be able to be put right in a textbox? That would solve a world of problems for me if it could be.
Thanks for any info, as always.
cmk
View 1 Replies
View Related
Jan 23, 2008
Hello
I am pretty new to reporting services. Now i have something like this. on the .cs file, i have a fullName lets say
String fullName = "John Smith",
Now I want to pass this string to the report's textBox and show this value on this textbox.
How can i do this?
1.How should i write in .cs file?
2. How should i set the expression for the textbox?
Thank you very much. It is very urgent! Please help!
View 6 Replies
View Related
Apr 10, 2008
I'd like to convert this vba code from access to run in sql 2000 and I'm a newbie to vba and am not sure how to do this. can I get the same functionality from an sp?
' Global SYSTEM Variables...
Global GBL_SystemName As String
Global GBL_CommonPath As String
Global GBL_WorkPath As String
Global GBL_DataUpdatePath As String
Global GBL_ArchivePath As String
Global GBL_LiveMarsPath As String
Global GBL_MARS_DSN_Name As String
Global GBL_MARS_DB_Server As String
Global GBL_MARS_DB_Name As String
Global GBL_RawData_DSN_Name As String
Global GBL_RawData_DB_Server As String
Global GBL_RawData_DB_Name As String
' Global CLIENT Variables...
Global GBL_ClientName As String
Global GBL_ClientAbbrev As String
Global GBL_MedisunEligibilityAge As Long
Global GBL_DoctorsManualEntryFlag As String
Global GBL_LastUpdateDate As Date
Global GBL_LastInvoiceGTEDate As Date
Global GBL_LastInvoiceLTEDate As Date
Global GBL_NewInvoiceGTEDate As Date
Global GBL_NewInvoiceLTEDate As Date
Public Function Get_Globals(G_name As String)
Select Case UCase(G_name)
Case UCase("SystemName")
Get_Globals = GBL_SystemName
Case UCase("ClientName")
Get_Globals = GBL_ClientName
Case UCase("ClientAbbrev")
Get_Globals = GBL_ClientAbbrev
Case UCase("MedisunEligibilityAge")
Get_Globals = GBL_MedisunEligibilityAge
Case UCase("LastUpdateDate")
Get_Globals = GBL_LastUpdateDate
Case UCase("LastInvoiceGTEDate")
Get_Globals = GBL_LastInvoiceGTEDate
Case UCase("LastInvoiceLTEDate")
Get_Globals = GBL_LastInvoiceLTEDate
Case UCase("NewInvoiceGTEDate")
Get_Globals = GBL_NewInvoiceGTEDate
Case UCase("NewInvoiceLTEDate")
Get_Globals = GBL_NewInvoiceLTEDate
Case UCase("WorkPath")
Get_Globals = GBL_WorkPath
Case UCase("DataUpdatePath")
Get_Globals = GBL_DataUpdatePath
Case UCase("ArchivePath")
Get_Globals = GBL_ArchivePath
Case UCase("LiveMarsPath")
Get_Globals = GBL_LiveMarsPath
Case UCase("CommonPath")
Get_Globals = GBL_CommonPath
Case UCase("MARS_DSN_Name")
Get_Globals = GBL_MARS_DSN_Name
Case UCase("MARS_DB_Server")
Get_Globals = GBL_MARS_DB_Server
Case UCase("MARS_DB_Name")
Get_Globals = GBL_MARS_DB_Name
Case UCase("RawData_DSN_Name")
Get_Globals = GBL_RawData_DSN_Name
Case UCase("RawData_DB_Server")
Get_Globals = GBL_RawData_DB_Server
Case UCase("RawData_DB_Name")
Get_Globals = GBL_RawData_DB_Name
Case UCase("DoctorsManualEntryFlag")
Get_Globals = GBL_DoctorsManualEntryFlag
End Select
End Function
Public Sub GetProperties(strPropertyTblName As String, Optional strClientCode As String)
' Create database connection and recordset...
Set con = Application.CurrentProject.Connection
Set rs = CreateObject("ADODB.Recordset")
strSQL = "select * from tln_" & strPropertyTblName & "Properties"
If UCase(Trim(strPropertyTblName)) = "CLIENT" Then
strSQL = strSQL & " where CPClientCode = '" & strClientCode & "'"
End If
rs.Open strSQL, con, 1 ' 1 = adOpenKeyset
If Not rs.EOF Then
Do While Not rs.EOF
Select Case UCase(Trim(rs("PropertyName")))
Case UCase("MARS_DSN_Name")
GBL_MARS_DSN_Name = rs("PropertyValue")
Case UCase("MARS_DB_Server")
GBL_MARS_DB_Server = rs("PropertyValue")
Case UCase("MARS_DB_Name")
GBL_MARS_DB_Name = rs("PropertyValue")
Case UCase("RawData_DSN_Name")
GBL_RawData_DSN_Name = rs("PropertyValue")
Case UCase("RawData_DB_Server")
GBL_RawData_DB_Server = rs("PropertyValue")
Case UCase("RawData_DB_Name")
GBL_RawData_DB_Name = rs("PropertyValue")
Case UCase("SystemName")
GBL_SystemName = rs("PropertyValue")
Case UCase("ClientName")
GBL_ClientName = rs("PropertyValue")
Case UCase("ClientAbbrev")
GBL_ClientAbbrev = rs("PropertyValue")
Case UCase("MedisunEligibilityAge")
GBL_MedisunEligibilityAge = rs("PropertyValue")
Case UCase("WorkPath")
GBL_WorkPath = rs("PropertyValue")
If Right(Trim(GBL_WorkPath), 1) <> "" Then
GBL_WorkPath = GBL_WorkPath & ""
End If
Case UCase("DataUpdatePath")
GBL_DataUpdatePath = rs("PropertyValue")
If Right(Trim(GBL_DataUpdatePath), 1) <> "" Then
GBL_DataUpdatePath = GBL_DataUpdatePath & ""
End If
Case UCase("ArchivePath")
GBL_ArchivePath = rs("PropertyValue")
If Right(Trim(GBL_ArchivePath), 1) <> "" Then
GBL_ArchivePath = GBL_ArchivePath & ""
End If
Case UCase("LiveMarsPath")
GBL_LiveMarsPath = rs("PropertyValue")
If Right(Trim(GBL_LiveMarsPath), 1) <> "" Then
GBL_LiveMarsPath = GBL_LiveMarsPath & ""
End If
Case UCase("CommonPath")
GBL_CommonPath = rs("PropertyValue")
If Right(Trim(GBL_CommonPath), 1) <> "" Then
GBL_CommonPath = GBL_CommonPath & ""
End If
Case UCase("DoctorsManualEntryFlag")
GBL_DoctorsManualEntryFlag = UCase(rs("PropertyValue"))
If Trim(GBL_DoctorsManualEntryFlag) = "" Then
GBL_DoctorsManualEntryFlag = "Y"
End If
Case Else
' Invalid property... do nothing...
End Select
rs.MoveNext
Loop
End If
rs.Close
Set rs = Nothing
Set con = Nothing
End Sub
View 13 Replies
View Related
Jun 24, 2008
Hello does anyone know how to convert this access code to sql. Also is there a program out there that will do it for you.
IIf([Ceridian]![UnionIndicator]="U" And [YearsService]>=3,[HealthBenefits]![medplan.Bi-WeeklyURBio-Rad]*26,[HealthBenefits]![medplan.Bi-WeeklyBio-Rad]*26) AS MedicalCostER, IIf([Ceridian]![UnionIndicator]="U" And [YearsService]>=3,[medplan]![Bi-WeeklyUREE]*26,[medplan]![Bi-WeeklyEE]*26) AS MEdicalCostEE
View 1 Replies
View Related
Jul 5, 2007
Hi, all
I've seach the threads before. a lot of discussion about C# to VSA.
So could anyone with experience on conversion from C# to SSIS/VSA give me a suggestion?
I 've C# code application which complete some ETL process. Now I need to convert all the ETL process to SSIS pacakge. the function of part of C# code is to get the result from stored procedure and then write the result to excel file, not row by row.
the C# code call Microsoft.Office.Interop.Excel as a object to write excel file.
But in VSA, I can't add Microsoft.Office.Interop.Excel as a reference so I can convert C# to VB.net regarding writing excel file.
So any solution about that?
any help will be appreciated.........
View 5 Replies
View Related
Dec 23, 2004
Dear All,
Lately i have started to convert my sql code to stored procedures, however i am still a bit new on this matter.
I have the following Sql Statement which I wish to convert to a stored procedure:-
SELECT MAX(" & id & ") As maxID FROM " & table
where id and table are parameters that I am passing to this sql from a function which is called getMaxID
for example, in the vb.net code i call it as follows:-
getMaxID("personID", "persons")
Can anyone tell me how to convert it to a Stored Proc please
Thanks for your help and time
Johann
View 2 Replies
View Related
Dec 21, 2000
i had worked on oracle 8i and i am planning to work on sql server 2000,i am requested by a company to help in converting there pl/sql code of oracle 8.0 to something equivalent which works on sql server 7.0 as they want to have similar code on both..i had not worked on sql server 7.0 ,but as pl/sql code works only on oracle stuff..so could kindly anyone guide me in this as to whether there is any product which coverts pl/code (the existing pl/code runs into thousands of line) automatically..i will be very grateful if anyone can enlighten me with such a product(software) or script.. along with its information and site address..any resources and any guidance as to how to go about about this conversion will be very invaluable..hope to hear soon from you guys...early response....will be appreciated..
with regards,
vijay.
sql server 7.0 on winnt
pl/sql code on oracle 8.0
View 2 Replies
View Related
Aug 8, 2006
Hello,
How do I convert VBSCRIPT code in a DTS package which is used for data validation to SQL 2005 SSIS?
Thanks,
Michael
View 2 Replies
View Related
Jul 29, 2015
This is a string i am getting from sql server.
00000006637120150522187449637100 34
10-000000003444378351108502007
01016800002413
10-000000091541378538466562009
01016800002420
[Code] .....
View 9 Replies
View Related
Oct 26, 2007
I am having a problem while converting datetime to varchar with code 106. Here is the code and result I get:
TSQL Code:
SELECT CONVERT(VARCHAR(100), GETDATE(), 106)
Result:
"26 10 2007"
My expected result:
"26 Oct 2007" or "26 October 2007"
Have you encountered this problem before? Is it related to the SQL server setting? Please help and thank you in advance.
View 6 Replies
View Related
May 24, 2007
I want to add up the values in a couple of text boxes in another textbox. How do I refer to the textboxes?
fields!textbox1.value doesn't work..what does?
View 1 Replies
View Related
Jul 10, 2014
using sql 2008, trying to convert a string to int
Example
Table1 has a varchar which i want to cast to int
00125000000 to int 125000000
i used the following
cast(B.[Assessment] as int) as [USER1_01],
with the result 125000000
Table2 has the same field in a different format.
0.00125
i need to find a way to convert one of them so they both match. if i did a join and matched the fields.
I tried
cast (10000000000 * cast([USER1_01] as NUMERIC(6,6)) as INT) as [USER1_01]
but for some reason it dosent look like they match, although they look the same. maybe a type problem?
View 3 Replies
View Related
Jul 7, 2006
I search the help for T-sql, still don't know how to convert a number, for example 12345 to a string with formating like 12,345
Thanks for your help.
View 1 Replies
View Related
Jul 17, 2007
Hello all,Currently i am having problem with the conversion from object to string. I am using SqlCommand to draw data from DB, and the statement i used is:String ires = myCommand.ExecuteScalar().ToString();and then convert ires to int by int.Parse(ires) I have got no problem during the compilation, but it gives me the exception during the runtime...any one got any ideas? Thanks
View 11 Replies
View Related
Aug 1, 2007
I'm working with an SqlDataSource, and I'm just wondering how to get the data to a String if I'm sure the select statement will only return 1 piece of data. Any ideas?
View 2 Replies
View Related
May 12, 2004
I want all the null (blank) values returned by a stored procedure to be shown as a string like "n/a", how to do that easily? Thanks
View 2 Replies
View Related
Jan 2, 2006
hi , i have a problem
i have an textarea that i want to convert to DateTime format (dd/MM/yyyy) .
the data in the textarea is (dd/MM/yyyy for example 21/12/2005).
i need it to add this data in sql server , in smalldatetime formation colum .
plz help.
View 2 Replies
View Related
Feb 1, 2000
Hi folks,
I'm trying to import data from a text file (UnicodeData.txt) into
an SQL table. Some of the fields are unicode values (16 bits)
expressed as four hexidecimal digits. I've succeeded in importing
the data as character strings, but I have not found a way to convert
them into numbers. (They could be stored as int or nchar.)
I've tried convert(binary/int/whatever, string); E.g.
select convert(int, '0x1111') from import_unicode
gives the error
Syntax error converting the varchar value '0x1111' to a column of data type int.
I could write code to strip off one character at a time, convert the
hex digit to a decimal value, shift left, etc., but I find it hard
to believe that's the best way.
Any help is appreciated. Please email answer to lars_huttar@sil.org
as I don't read this board.
Thanks,
Lars Huttar
lars_huttar@sil.org
View 3 Replies
View Related
Dec 7, 1999
I'm using SQL 7.0 SP1.
I am using DTS to read in a date with the format of YYYYMMDD. I am trying to convert this date to MM/DD/YYYY and then use the CDate function with the following code to load it into a Datetime column in SQL Server:
Function Main()
strDate = DTSSource("Col002")
strYear = Left(strDate, 4)
strMonth = Mid(strDate, 5, 2)
strDay = Right(strDate, 2)
strHoldDate = strMonth + "/" + strDay + "/" + strYear
DTSDestination("DateName") = strHoldDate
Main = DTSTransformStat_OK
End Function
My DTS package will execute without errors, but it does not add the row. I have been successful using CDate when the source date is in the format MM/DD/YYYY.
Also, do you have any tips on how to debug DTS? How to see what's in a variable, etc.?
Thanks!
Lisa
View 1 Replies
View Related
Sep 4, 2014
To start, I am NOT a SQL programmer. I have to do some minimal SQL administration (DB Creation, Backups, Security) on spatial databases that are for the most part managed by a 3rd party program. My experience with T-SQL is mostly simple tasks (i.e. Select and Update statements)..However I have been requested to calculate an ID Field using the values of two other fields. Per the request, I need to convert one field to Hex and concatenate with the second field.
ex. Field 1 + Field 2(hex string) = Field 3
Field 1 = 'FF02324323'
Field 2 = 'Smith Creek'
Field 3 = 'FF02324323536D69746820437265656B'
Field 1 VarChar(10) (Code)
Field 2 VarChar(65) (Common Name)
Field 3 VarChar(max) (ResourceID)
Spent half the day searching and have tried various forms of CAST, CONVERT, fn_varbintohexstr and others but have unable to come up with the correct combination to get what I need.
View 3 Replies
View Related
Oct 29, 2014
In our ERP system we have a field which is a date-picker in the user front end, but the value is stored in an NVARCHAR field and not always consistently. How can I convert this to a date (preferably in the format YYYY-MM-DD HH:MM) that I could use in a calculation?
select code, spec_value from spec_checklist_remind where spec_checklist_id = 17
code spec_value
------------ -----------------------------------------------------------------------
05MC0001 22/07/2014
05MC0002 23/07/2014
06MT0001 01-May-2014
06MT0002 01-May-2014
06MT0006 01/05/2014
06MT0007 01-May-2014
06MT0008 01/05/2014
View 5 Replies
View Related
Dec 6, 2014
I have a column which keeps numeric data in form of String, but I want to convert it to number e.g. from "1001" to 1001,
Which function I can use to do it?
[URL] .....
View 2 Replies
View Related
Jul 13, 2006
hey, guys
I got a strange question. :)
In SQL Server,
declare @Item8 as varchar(100)
declare @str as varchar(100)
set @str = '@Item8'
Is there any way I can reference @str to @Item8 ?
Thanks
View 1 Replies
View Related
Jul 19, 2006
hi,
I have a bit string like '000111010101101110000111' , how to convert it to varbinary format like 0x1D5B83?
Thanks.
View 1 Replies
View Related
May 4, 2007
Hi,
I am new to SSIS and have been trying to load a date from a Table1.ColumnA (varchar(50)) to a Table2.ColumnB(smalldatetime).
I tried using the Derived Column and Data Conversion controls but I get the below error.
Error converting data type DBTYPE_DBTIMESTAMP to datetime
What do I do to load this data.
Thanks,
Noel
View 8 Replies
View Related
Jul 29, 2007
Hi all,
I defined an user string type varible in the package as AccountLen. I am trying to use this varible in the Expression of Derived Column transformation.
I want to retrieve a part of column, i.e: Right(Column1, @AccountLen), this is always wrong because the AccountLen is string type. How I can convert it to the numeric so that can be used in the RIGHT function?
Thanks
View 3 Replies
View Related
Jan 15, 2008
Hi Everyone -
iam facing a small problem i want to convert an output from the context_info() which is binary to string (or int)
example:
SET CONTEXT_INFO 3
select CONTEXT_INFO() --- it will return 0x0000000300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
the requested output is to be 3 again
thanx
Maylo
View 3 Replies
View Related
Oct 4, 2007
CREATE TABLE USERTABLE(
USERID int,
USERNAME varchar(20));
INSERT INTO USERTABLE VALUES (1,'x');
INSERT INTO USERTABLE VALUES (2,'y');
INSERT INTO USERTABLE VALUES (3,'z');
CREATE TABLE ACCESSTABLE(
ACCESSTYPE varchar(50),
USERIDS varchar(20));
INSERT INTO ACCESSTABLE VALUES('Enabled Users','1,2');
INSERT INTO ACCESSTABLE VALUES('Disabled Users','3');
Select USERNAME from USERTABLE where USERID IN (select USERIDS from ACCESSTABLE where ACCESSTYPE='Enabled Users');
I get the following error for the above query.
Syntax error converting the varchar value '1,2' to a column of data type int.
Please advice me.
View 1 Replies
View Related
Dec 8, 2007
Hi,
I am getting an issue when i try to run a package which was validated against an oracle database on windows with UTF8. When I try to run the same package(no changes, just changing the conenction parameters to point to an oracle database on UNIX with UTF16), the package fails with error saying cannot convert unicode to string for string columns.
The same run through fine if I refresh the metadata against the UNIX database, but then it doesnt run against the Windows database.
Can anyone please suggest how to overcome this scenario. My issue is, I need to run my package against various database(by just pointing the database connection details) without changing anything in the package.
Please suggest.
Thanks,
Manish
View 5 Replies
View Related