manish kedar

manish kedar

  • NA
  • 229
  • 11.6k

inserting bulk data in table...

Jul 30 2018 7:11 AM
hello sir,
 
when i insert bulk data in sql table, then into date field insert previous date but i passed the current date ..please give ans.
 
query is:-
 
INSERT INTO Tbl_SmsNotification
(V_Title
,V_Message
,Dt_Date
,Fk_UserId
,Fk_ClassId
,Fk_StudentId
,V_SmsOrNotify)
SELECT
[Table].[Column].value('Title[1]','varchar(150)') as 'Title',
[Table].[Column].value('Message[1]','varchar(max)') as 'Message',
[Table].[Column].value('Dt_Date[1]','datetime') as 'Dt_Date',
[Table].[Column].value('UserId[1]','int') as 'UserId',
[Table].[Column].value('ClassId[1]','int') as 'ClassId',
[Table].[Column].value('StudentId[1]','int') as 'StudentId',
[Table].[Column].value('SmsOrNotify[1]','varchar(10)') as 'SmsOrNotify'
from @xmlNotification.nodes('/dsNotification/dtNotification') as [TABLE] ([COLUMN]

Answers (5)