Click here to Skip to main content
15,886,724 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to create an audit table? Pin
Eddy Vluggen12-Jul-14 22:57
professionalEddy Vluggen12-Jul-14 22:57 
GeneralRe: How to create an audit table? Pin
jschell14-Jul-14 9:05
jschell14-Jul-14 9:05 
GeneralRe: How to create an audit table? Pin
jschell11-Jul-14 9:11
jschell11-Jul-14 9:11 
GeneralRe: How to create an audit table? Pin
Mycroft Holmes11-Jul-14 14:19
professionalMycroft Holmes11-Jul-14 14:19 
QuestionSQL Server Express Setup Command Line Problem Pin
Amr Muhammed9-Jul-14 11:25
Amr Muhammed9-Jul-14 11:25 
AnswerRe: SQL Server Express Setup Command Line Problem Pin
Bernhard Hiller9-Jul-14 21:11
Bernhard Hiller9-Jul-14 21:11 
GeneralRe: SQL Server Express Setup Command Line Problem Pin
Amr Muhammed11-Jul-14 3:28
Amr Muhammed11-Jul-14 3:28 
QuestionError converting data type varchar to numeric Pin
Maideen Abdul Kader5-Jul-14 19:42
Maideen Abdul Kader5-Jul-14 19:42 
Hi

i have issue in stored procedure converting data type

Destination table dbo.Z_tbl_CirculationCopy_TEMP has numeric data type
But source table Z_tbl_Import_temp have VarChar Type

If I export data from source, I have error message

Msg 8114, Level 16, State 5, Procedure Z_usp_IMPORT_EXCEL_UNPIVOT_1, Line 10
Error converting data type varchar to numeric.

Pls help to resolve this issue

Thanking you in advance

Maideen

Below is my store procedure


SQL
INSERT INTO dbo.Z_tbl_CirculationCopy_TEMP([MEMBER],[LANGUAGE],[TYPE],[PLATFORM],[CATEGORY],[MAINAREA],[STATE],[COPIES],
[MONTHNAME],[YEARNO],[REMARKS],[AVGISSUE_PAID],[AVGISSUE_FREE],[BCP_NTT],[BCP_50],[BCP_20],[BCP_20_Below],
[WP_TOTAL],[SABAH_TOTAL],[SARAWAK_TOTAL],[EM_Total])

SELECT [MEMBER],[LANGUAGE],[TYPE],[PLATFORM],[CATEGORY],[MAINAREA],[STATE],[COPIES],
[MONTHNAME],[YEARNO],[REMARKS],[AVGISSUE_PAID],[AVGISSUE_FREE],[BCP_NTT],[BCP_50],[BCP_20],[BCP_20_Below],
[WP_TOTAL],[SABAH_TOTAL],[SARAWAK_TOTAL],[EM_Total]

FROM (SELECT [MEMBER],[LANGUAGE],[TYPE],[PLATFORM],[CATEGORY],[MAINAREA],[MONTHNAME],[YEARNO],[REMARKS],
[AVGISSUE_PAID],[AVGISSUE_FREE],[BCP_NTT],[BCP_50],[BCP_20], [BCP_20_Below],
[WP_TOTAL],[SABAH_Total],[SARAWAK_Total],[EM_Total],
[Perlis],[Kedah],[Penang],[Perak],[Kelantan],[Terengganu],[Pahang],[Selangor],[WP],[NegriSembilan],[Melaka],[Johor],
[KotaKinaBalu],[sandakan],[Tawau],[Kudat],[Pendalaman],[Labuan],[SABAH_Other],
[Kuching],[Miri],[Sibu],[Bintulu],[SriAman],[KotaSemerahan],[Sarikei],[SARAWAK_Others],[Others]
FROM dbo.Z_tbl_Import_temp ) P

UNPIVOT (Copies FOR State IN ([Perlis],[Kedah],[Penang],[Perak],[Kelantan],[Terengganu],[Pahang],[Selangor],
[WP],[NegriSembilan],[Melaka],[Johor],
[KotaKinaBalu],[Sandakan],[Tawau],[Kudat],[Pendalaman],[Labuan],[SABAH_Other],
[Kuching],[Miri],[Sibu],[Bintulu],[SriAman],[KotaSemerahan],[Sarikei],[SARAWAK_Others],[Others]
))AS unpvt

AnswerRe: Error converting data type varchar to numeric Pin
Mycroft Holmes6-Jul-14 13:01
professionalMycroft Holmes6-Jul-14 13:01 
QuestionCan not connect to my database from asp .net application Pin
Stephen Holdorf5-Jul-14 0:15
Stephen Holdorf5-Jul-14 0:15 
AnswerRe: Can not connect to my database from asp .net application Pin
Eddy Vluggen5-Jul-14 1:23
professionalEddy Vluggen5-Jul-14 1:23 
GeneralRe: Can not connect to my database from asp .net application Pin
Stephen Holdorf5-Jul-14 2:03
Stephen Holdorf5-Jul-14 2:03 
GeneralRe: Can not connect to my database from asp .net application Pin
Stephen Holdorf5-Jul-14 2:08
Stephen Holdorf5-Jul-14 2:08 
GeneralRe: Can not connect to my database from asp .net application Pin
Stephen Holdorf5-Jul-14 2:26
Stephen Holdorf5-Jul-14 2:26 
GeneralRe: Can not connect to my database from asp .net application Pin
Eddy Vluggen5-Jul-14 22:46
professionalEddy Vluggen5-Jul-14 22:46 
GeneralRe: Can not connect to my database from asp .net application Pin
Jörgen Andersson6-Jul-14 11:23
professionalJörgen Andersson6-Jul-14 11:23 
AnswerRe: Can not connect to my database from asp .net application Pin
Bernhard Hiller6-Jul-14 21:01
Bernhard Hiller6-Jul-14 21:01 
QuestionRe: Can not connect to my database from asp .net application Pin
Richard Deeming7-Jul-14 3:14
mveRichard Deeming7-Jul-14 3:14 
AnswerRe: Can not connect to my database from asp .net application Pin
Hemant Singh Rautela7-Jul-14 3:31
professionalHemant Singh Rautela7-Jul-14 3:31 
QuestionComplex SQL queries Pin
data modeling guy3-Jul-14 5:14
data modeling guy3-Jul-14 5:14 
AnswerRe: Complex SQL queries Pin
Richard MacCutchan3-Jul-14 5:22
mveRichard MacCutchan3-Jul-14 5:22 
GeneralRe: Complex SQL queries Pin
data modeling guy3-Jul-14 20:02
data modeling guy3-Jul-14 20:02 
AnswerRe: Complex SQL queries Pin
PIEBALDconsult3-Jul-14 5:53
mvePIEBALDconsult3-Jul-14 5:53 
GeneralRe: Complex SQL queries Pin
data modeling guy3-Jul-14 20:03
data modeling guy3-Jul-14 20:03 
AnswerRe: Complex SQL queries Pin
Eddy Vluggen3-Jul-14 11:24
professionalEddy Vluggen3-Jul-14 11:24 

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.