The error I get is:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Syntax error converting the varchar value '1,2,3 ' to a column of data type tinyint.
It works in a SQL statment but I can pass it to a store procedure
DK
On Tuesday 02 Mar 2004 15:56 pm, Doug
On Wednesday 03 Mar 2004 12:06 pm, Doug Kronenberger wrote:
Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Syntax error converting the
varchar value '1,2,3 ' to a column of data type tinyint.
It works in a SQL statment but I can pass it to a store procedure
What
On Tuesday 02 Mar 2004 15:56 pm, Doug Kronenbergeer wrote:
How do I pass a the string 1,2,3 so that it can be convert into the
tinyint. Needless to sa DivisionID is a tinyint.
You can't convert something with comma's in to a number.
Having said that, your code should work, because your passing
Two things,
Modify the create statement to be :
CREATE PROCEDURE spTest @arg_DivID CHAR(255)
Its also better practice not to name a user stored procedure with the prefix
sp_- use usp_ or something else which does not conflict with system
naming.
You cannot convert a comma seperated
you have a lot of options really.loop over the list, stick it into a table var or temp table, and do a subselect.play around with it.
(not u neil :P)
-Original Message-
From: Robertson-Ravo, Neil (RX)
To: CF-Talk
Sent: 3/2/04 11:07 AM
Subject: RE: SQL Stored Proc
Two things,
Modify
with another approach here:
http://sqlteam.com/item.asp?ItemID=11499
-Original Message-
From: Thomas Chiverton
To: CF-Talk
Sent: 3/2/04 10:18 AM
Subject: Re: SQL Stored Proc
On Tuesday 02 Mar 2004 15:56 pm, Doug Kronenbergeer wrote:
How do I pass a the string 1,2,3 so that it can be convert
: sql Stored Proc
Can anyone else give me any insight on this?
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:08 PM
To: CF-Talk
Subject: RE: sql Stored Proc
I recieve an error incorrect synatx near the keyword and.
declare @col
I agree Kevan.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2002 09:46
To: CF-Talk
Subject: RE: sql Stored Proc
I don't think you can use a variable to build dynamic sql like that. I think
you have to build the sql statement in a string
Thanks stephen. But then as an ex-thoughtbubbler I would naturally be right.
-Original Message-
From: Stephen Galligan [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2002 10:08
To: CF-Talk
Subject: RE: sql Stored Proc
I agree Kevan.
-Original Message-
From: [EMAIL PROTECTED] [mailto
To: CF-Talk
Subject: RE: sql Stored Proc
Thanks stephen. But then as an ex-thoughtbubbler I would naturally be right.
-Original Message-
From: Stephen Galligan [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2002 10:08
To: CF-Talk
Subject: RE: sql Stored Proc
I agree Kevan.
-Original
Well they say these things always come back to haunt you, only glad it's you
and not me they'll be spooking.
-Original Message-
From: Andy Ewings [mailto:[EMAIL PROTECTED]]
Sent: 02 May 2002 12:39
To: CF-Talk
Subject: RE: sql Stored Proc
:) - good man Kevan!...I remember
If the colors didnt come across the declare and set all work fine the part
that is giving me a problem is the @col when I try to use it in the query.
Does anyone know how to make this work correctly?
Joshua TIpton
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent:
You missed the word AS in the declare statement:
DECLARE @col AS nvarchar(30)
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 9:00 AM
To: CF-Talk
Subject: RE: sql Stored Proc
If the colors didnt come across the declare and set all
Oops... My Bad... Tested after... Not needed...
-Original Message-
From: Costas Piliotis
Sent: Wednesday, May 01, 2002 9:00 AM
To: CF-Talk
Subject: RE: sql Stored Proc
You missed the word AS in the declare statement:
DECLARE @col AS nvarchar(30)
-Original Message-
From
you don't need it..
-Original Message-
From: Costas Piliotis [mailto:[EMAIL PROTECTED]]
Sent: 01 May 2002 17:00
To: CF-Talk
Subject: RE: sql Stored Proc
You missed the word AS in the declare statement:
DECLARE @col AS nvarchar(30)
-Original Message-
From: Joshua
: Wednesday, May 01, 2002 12:00 PM
To: CF-Talk
Subject: RE: sql Stored Proc
You missed the word AS in the declare statement:
DECLARE @col AS nvarchar(30)
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 9:00 AM
To: CF-Talk
Subject: RE: sql Stored
Can anyone else give me any insight on this?
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:08 PM
To: CF-Talk
Subject: RE: sql Stored Proc
I recieve an error incorrect synatx near the keyword and.
declare @col as varchar(500
Stored Proc
Can anyone else give me any insight on this?
-Original Message-
From: Joshua Tipton [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 12:08 PM
To: CF-Talk
Subject: RE: sql Stored Proc
I recieve an error incorrect synatx near the keyword and.
declare @col as varchar
I haven't done that, but I'd start by looking at xp_cmdshell - you might be
able to do something with that and the DIR command.
As for a good mailing list, check out www.swynk.com.
Bob
-Original Message-
From: Akbar Pasha [mailto:[EMAIL PROTECTED]]
Sent: March 29, 2001 2:56 PM
To:
thanx bob. i got it using that.:)
-Original Message-
From: Bob Silverberg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 3:27 PM
To: CF-Talk
Subject: RE: (SQL Stored Proc)
I haven't done that, but I'd start by looking at xp_cmdshell - you might
be
able to do something
Great! Mind sharing your solution with the rest of us?
Bob
-Original Message-
From: Akbar Pasha [mailto:[EMAIL PROTECTED]]
Sent: March 29, 2001 3:35 PM
To: CF-Talk
Subject: RE: (SQL Stored Proc)
thanx bob. i got it using that.:)
-Original Message-
From: Bob Silverberg
Stored Proc)
Great! Mind sharing your solution with the rest of us?
Bob
-Original Message-
From: Akbar Pasha [mailto:[EMAIL PROTECTED]]
Sent: March 29, 2001 3:35 PM
To: CF-Talk
Subject: RE: (SQL Stored Proc)
thanx bob. i got it using that.:)
-Original Message-
From: Bob
22 matches
Mail list logo