Jump to content

plss help ... SQL Query for inserting bulk records in one shot.....


Recommended Posts

Posted

edhi in correct syntax aithe, text book vadu ela seppadu....  sCo_^Y sCo_^Y sCo_^Y sCo_^Y sCo_^Y sCo_^Y


[img]http://i52.tinypic.com/2ah739h.jpg[/img]

  • Replies 31
  • Created
  • Last Reply

Top Posters In This Topic

  • Jambhalheart

    13

  • galigannarao

    5

  • Herndon- VA

    5

  • tom bhayya

    3

Popular Days

Top Posters In This Topic

Posted

[quote author=Fake ID link=topic=203091.msg2475924#msg2475924 date=1308161815]
Oka saari aa table script copy cheyyi ikkada.
[/quote]

USE [example]
GO

/****** Object:  Table [dbo].[test]    Script Date: 06/15/2011 23:49:07 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[test](
[id] [varchar](50) NULL,
[name] [ntext] NULL,
[row] [timestamp] NOT NULL,
[iden] [uniqueidentifier] NULL,
[bits] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO


Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475937#msg2475937 date=1308161978]
USE [example]
GO

/****** Object:  Table [dbo].[test]    Script Date: 06/15/2011 23:49:07 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[test](
[id] [varchar](50) NULL,
[name] [ntext] NULL,
[b][row] [timestamp] NOT NULL,[/b]
                [iden] [uniqueidentifier] NULL,
[bits] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO
[/quote]


Insert la ID and Name icchinav. Aa bold cheshina column ki iyyali kada input. Adi Not Null kada. Daaniki emanna trigger raashinra?

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475937#msg2475937 date=1308161978]
USE [example]
GO

/****** Object:  Table [dbo].[test]    Script Date: 06/15/2011 23:49:07 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[test](
[id] [varchar](50) NULL,
[name] [ntext] NULL,
[b] [row] [timestamp] NOT NULL,[/b]
[iden] [uniqueidentifier] NULL,
[bits] [bit] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO
[/quote]not null column okati undi kada baa. mari daniki data pass cheyyaliga. sCo_^Y

Posted

[quote author=Fake ID link=topic=203091.msg2475945#msg2475945 date=1308162185]

Insert la ID and Name icchinav. Aa bold cheshina column ki iyyali kada input. Adi Not Null kada. Daaniki emanna trigger raashinra?
[/quote]


emi ledhu anna.... adhi oka simple rowversion datatype column.... sql server will automatically update that column with a unique number... we will not supply any value for that...


triggers kuda rayaledhu anna.... adhi oka simple table anthe...

select * from test                ani kodithe edhi output...




id    name        row                                iden        bits
1 a         0x00000000000007E3 NULL 0
2 b         0x0000000000001771 NULL NULL

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475959#msg2475959 date=1308162508]

emi ledhu anna.... adhi oka simple rowversion datatype column.... sql server will automatically update that column with a unique number... we will not supply any value for that...


triggers kuda rayaledhu anna.... adhi oka simple table anthe...

select * from test                ani kodithe edhi output...




id    name        row                                iden        bits
1 a         0x00000000000007E3 NULL 0
2 b         0x0000000000001771 NULL NULL
[/quote]

declare name as varchar.....

and try inserting.... sCo_^Y sCo_^Y sCo_^Y

Posted

adhi syntax error ani chupisthondi kadha...

even if, not null column ki value pass cheyakapoyina, syntax error radhu, column is not null, u have to pass some value ani vastundi...

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475959#msg2475959 date=1308162508]

emi ledhu anna.... adhi oka simple rowversion datatype column.... sql server will automatically update that column with a unique number... we will not supply any value for that...


triggers kuda rayaledhu anna.... adhi oka simple table anthe...

select * from test                ani kodithe edhi output...




id    name        row                                iden        bits
1 a         [b]0x00000000000007E3[/b] NULL 0
2 b         [b]0x0000000000001771[/b] NULL NULL
[/quote]

Sure aa? Aa row annadi Timestamp ani undi kada.

As far as I know (Oracle ayite) Some thing should be provided anukunta. Automatic ga em teeskodu unledd you write a trigger on Insert.

Try putting sysdate into that column. It should solve. And aa bold la unna column width penchi choodu (drag), neeku data kanipistadi. It is not just an ID

Posted

[quote author=INFATUATION link=topic=203091.msg2475966#msg2475966 date=1308162652]
declare name as varchar.....

and try inserting.... sCo_^Y sCo_^Y sCo_^Y
[/quote]


chesanu anna.. but still no result..

[img]http://i54.tinypic.com/27yx0zk.jpg[/img]

[quote author=Fake ID link=topic=203091.msg2475969#msg2475969 date=1308162714]
Sure aa? Aa row annadi Timestamp ani undi kada.

As far as I know (Oracle ayite) Some thing should be provided anukunta. Automatic ga em teeskodu unledd you write a trigger on Insert.

Try putting sysdate into that column. It should solve. And aa bold la unna column width penchi choodu (drag), neeku data kanipistadi. It is not just an ID
[/quote]


100 % sure anna.... kavali, ante rowversion datatype of sql server ani search cheyi , u will get more clarity.... rowversion datatype vunna column ni sql server automatic ga oka sollu value esthundi... and moreover, if u want, I will remove that column and I will ok naa....

Posted

ok here it is guys...

I have dropped that confusing column....


[img]http://i51.tinypic.com/zuob4l.jpg[/img]


still no result....  &*B@ &*B@

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2475994#msg2475994 date=1308163183]

chesanu anna.. but still no result..

[img]http://i54.tinypic.com/27yx0zk.jpg[/img]


100 % sure anna.... kavali, ante rowversion datatype of sql server ani search cheyi , u will get more clarity.... rowversion datatype vunna column ni sql server automatic ga oka sollu value esthundi... and moreover, if u want, I will remove that column and I will ok naa....
[/quote]

id varchar ga ichav ga...so id lu kuda single quotes lo petti try cheyyi..... sCo_^Y sCo_^Y sCo_^Y

Posted

Paina nuvvu icchina create script la Datatype timestamp not null ani choopistundi kada  sCo_^Y sCo_^Y

Posted

[quote author=Fake ID link=topic=203091.msg2476032#msg2476032 date=1308163605]
Paina nuvvu icchina create script la Datatype timestamp not null ani choopistundi kada  sCo_^Y sCo_^Y
[/quote]

I removed that column anna... see above pic...

@infactuation


yes, anna, that is not varchar only... even I posted that pic also while changing it to varchar....

Posted

[quote author=Maddy_Rulez link=topic=203091.msg2476055#msg2476055 date=1308163860]
I removed that column anna... see above pic...

@infactuation


yes, anna, that is not varchar only... even I posted that pic also while changing it to varchar....
[/quote]

values('3','c'), ('4','d').........................ila ichi choodu...!!!

×
×
  • Create New...