Click here to Skip to main content
15,887,343 members
Home / Discussions / Database
   

Database

 
AnswerRe: Connection String Pin
Mike Dimmick14-Oct-05 4:42
Mike Dimmick14-Oct-05 4:42 
GeneralRe: Connection String Pin
Anonymous14-Oct-05 15:32
Anonymous14-Oct-05 15:32 
QuestionOPENXML and ntext problem Pin
Luke Murray13-Oct-05 13:44
Luke Murray13-Oct-05 13:44 
QuestionListBox Display Member Pin
kenexcelon13-Oct-05 7:49
kenexcelon13-Oct-05 7:49 
AnswerRe: ListBox Display Member Pin
-Dr_X-13-Oct-05 8:44
-Dr_X-13-Oct-05 8:44 
QuestionError: JZooL & JZ006 What do I do? Pin
Crystal A13-Oct-05 3:27
sussCrystal A13-Oct-05 3:27 
AnswerRe: Error: JZooL & JZ006 What do I do? Pin
Mike Dimmick14-Oct-05 5:01
Mike Dimmick14-Oct-05 5:01 
QuestionSyntax error converting the nvarchar value 'INSERT INTO.... Pin
Mahantesh_Hongal12-Oct-05 23:25
Mahantesh_Hongal12-Oct-05 23:25 
Hi All,
I am getting the following error,

Msg 245, Level 16, State 1, Line 13
Syntax error converting the nvarchar value 'INSERT INTO [mydb].[dbo].[temp]
(
[f1],
[f2],
[f3],
[f4]
)
VALUES(
222,
333,
44,
' to a column of data type int.


while executing the below code

DECLARE @t_f1 as int
DECLARE @t_f2 as nvarchar(50)
DECLARE @t_f3 as nvarchar(50)
DECLARE @t_f4 as nvarchar(50)

set @t_f1 = 111
set @t_f2 = 222
set @t_f3e = 333
set @t_f4 = 44

declare @q as nvarchar(500)

set @q = 'INSERT INTO [mydb].[dbo].[temp]
(
[fld1],
[fld2],
[fld3],
[fld4]
)
VALUES(
'+@t_f1+',
'+@t_f2+',
'+@t_f3+',
'+@t_f4+'
)'
exec @q


My database table structure is as follows,
CREATE TABLE temp
(
fld1 int,
fld2 nvarchar(50),
fld3 nvarchar(20),
fld4 nvarchar(20),
)


Thanks in advance...
~Mahantesh V H

AnswerRe: Syntax error converting the nvarchar value 'INSERT INTO.... Pin
under281113-Oct-05 2:08
under281113-Oct-05 2:08 
GeneralRe: Syntax error converting the nvarchar value 'INSERT INTO.... Pin
Mahantesh_Hongal13-Oct-05 2:11
Mahantesh_Hongal13-Oct-05 2:11 
GeneralRe: Syntax error converting the nvarchar value 'INSERT INTO.... Pin
Edbert P13-Oct-05 17:39
Edbert P13-Oct-05 17:39 
GeneralRe: Syntax error converting the nvarchar value 'INSERT INTO.... Pin
Anonymous13-Oct-05 18:35
Anonymous13-Oct-05 18:35 
GeneralRe: Syntax error converting the nvarchar value 'INSERT INTO.... Pin
Edbert P13-Oct-05 19:08
Edbert P13-Oct-05 19:08 
QuestionInsert to SQL Error Pin
PAEC12-Oct-05 7:00
PAEC12-Oct-05 7:00 
AnswerRe: Insert to SQL Error Pin
Edbert P13-Oct-05 17:43
Edbert P13-Oct-05 17:43 
GeneralRe: Insert to SQL Error Pin
PAEC14-Oct-05 6:46
PAEC14-Oct-05 6:46 
GeneralRe: Insert to SQL Error Pin
Edbert P16-Oct-05 12:39
Edbert P16-Oct-05 12:39 
GeneralRe: Insert to SQL Error Pin
PAEC17-Oct-05 2:43
PAEC17-Oct-05 2:43 
GeneralRe: Insert to SQL Error Pin
S Douglas20-Oct-05 23:15
professionalS Douglas20-Oct-05 23:15 
Questioninsert a nre record based on highest value in a field Pin
mmcsherr12-Oct-05 4:58
mmcsherr12-Oct-05 4:58 
AnswerRe: insert a nre record based on highest value in a field Pin
Colin Angus Mackay12-Oct-05 6:01
Colin Angus Mackay12-Oct-05 6:01 
GeneralRe: insert a nre record based on highest value in a field Pin
mmcsherr12-Oct-05 7:40
mmcsherr12-Oct-05 7:40 
GeneralRe: insert a nre record based on highest value in a field Pin
Colin Angus Mackay12-Oct-05 7:44
Colin Angus Mackay12-Oct-05 7:44 
GeneralRe: insert a nre record based on highest value in a field Pin
mmcsherr12-Oct-05 9:26
mmcsherr12-Oct-05 9:26 
Questiontrigger for insert Pin
Anonymous12-Oct-05 0:11
Anonymous12-Oct-05 0:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.