Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 record datatype in sql2005

Author  Topic 

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-16 : 09:49:50
How to implement record datatype in sqlserver 2005

I have a code written in oracle to convert into sqlserver

rec_fx MARGIN_CALC%ROWTYPE;

kindly help.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-16 : 09:55:09
seems like what you're asking for is table variables in SQL

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-16 : 10:43:17
Thanks Visakh,
Can I use the table varible in 2005, I'll try and get back to you.

Regards,
aak
Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-16 : 15:00:44
Hi Visakh

I came to know that we cannot use a table variable with SELECT INTO.

Actually I want to implement a record datatype of Oracle. in sqlserver
I have to use this table variable( or temp table) inside a cursor loop

Regards,
aak

Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-16 : 15:39:48
I have a table in the database, need to define a table variable of that table type in my procedure, and I'have to use this in cursor loop
how can I do this?
Go to Top of Page

aakcse
Aged Yak Warrior

570 Posts

Posted - 2010-03-16 : 15:39:49
I have a table in the database, need to define a table variable of that table type in my procedure, and I'have to use this in cursor loop
how can I do this?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-03-17 : 01:17:56
quote:
Originally posted by aakcse

I have a table in the database, need to define a table variable of that table type in my procedure, and I'have to use this in cursor loop
how can I do this?


what are you trying to do with cursor?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -