Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 20th, 2004, 01:10 AM
Registered User
 
Join Date: Aug 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Oracle's Analyze Table equivalent ?

Hi,

In Oracle, the below query is valid :

insert into test(sno,sno1) values(1,2) returning id into val_ret;

// The above query in Oracle returns the affected row id's to the PL/SQL or host vriable(val_ret)

Is there any equivalent for the above in SQL Server ?

Please advice,

Thanks,
Smitha

 
Old October 20th, 2004, 09:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Smitha,

Is that you want to parse the Query in SQL query analyser to see if that query is a valid one, and if not show what the error is?

If so, in SQL query Analyser, Key in your query and use CTRL+F5 or Select PARSE from QUERY Menu.

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old October 21st, 2004, 11:21 AM
joefawcett's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts
Default

I'm not an Oracle expert but it looks like you'd need this (assuming you'd declared val_ret previously:
Code:
insert into test(sno,sno1) values(1,2)
SET @val_ret = @@IDENTITY
--

Joe
 
Old October 21st, 2004, 12:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

I believe, I was out of focus while replying my last post on this. Joe's reply opened my eyes. That should be what you were looking for, smitha.

Cheers!

_________________________
- Vijay G
Strive for Perfection





Similar Threads
Thread Thread Starter Forum Replies Last Post
Analyze of a BLOB yanis97 J2EE 0 September 8th, 2006 05:37 AM
Oracle's Analyze Table equivalent ? smitha SQL Server 2000 1 October 27th, 2004 04:04 PM
Oracle's Analyze Table equivalent ? smitha SQL Server 2000 1 October 11th, 2004 08:24 AM
what is table cellspacing equivalent in css? nerssi CSS Cascading Style Sheets 5 September 19th, 2004 09:48 AM
what is table cellspacing equivalent in css? nerssi Javascript 1 September 19th, 2004 02:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.