Comment

Dattatraya
Doubt about Cursor,
February 26, 2009 at 5:58 AM


DECLARE @_ResourceGuid uniqueidentifier
DECLARE @Name Varchar(60)

DECLARE Display CURSOR FOR
SELECT T._ResourceGuid,I.Name
FROM dbo.Inv_Software_Component T
join dbo.Item I on I.Guid=T._ResourceGuid

OPEN Display
FETCH next FROM Display INTO @_ResourceGuid,@Name
WHILE (@@fetch_status=0)

BEGIN
print @_ResourceGuid +@Name
FETCH next FROM Display
INTO @_ResourceGuid ,@Name

END
CLOSE Display
DEALLOCATE Display

I face an Error

The data types uniqueidentifier and varchar are incompatible in the add operator

can you resolve this issue
View All Comments | View Tutorial
Related Tutorial and Articles
Quartz Tutorials

Creating Cursors in SQL
Creating Cursors in SQL       Creating Cursor in SQL is used to create a cursor in SQL... Creating Cursor in SQL. To understand it, we create a table 'Stu_Table 

SQL Tutorial

Creating Cursors in SQL
Creating Cursors in SQL       Creating Cursor in SQL is used to create a cursor in SQL... Creating Cursor in SQL. To understand it, we create a table 'Stu_Table 

Java-Tutorials

Close Cursors in SQL
Close Cursors in SQL       Close Cursors is used to close the Cursor temporary, when the open... illustrate an example from Close Cursors in SQL. To understand this example 

Quartz Tutorials

Declare Cursors in SQL
Declare Cursors in SQL       Declare Cursors in SQL is used to define cursor and its... 'Declare Cursors in SQL'. To grasp the example, we create a table 'Stu_Table 

Quartz Tutorials

Close Cursors in SQL
Close Cursors in SQL      ... it is not required. A cursor in a SQL can be closed with close... illustrates an example 'Close Cursor in SQL'. To grasp this example, we 

SQL Tutorial

Declare Cursors in SQL
Declare Cursors in SQL       Declare Cursors in SQL is used to define cursor and its... 'Declare Cursors in SQL'. To grasp the example, we create a table 'Stu_Table 

MySQL

CURSORS
CURSORS       Cursors are used when the SQL Select statement is expected to return more than one row..._name> CURSOR FOR <select_statement> Multiple cursors can be declared 

SQL Question

What is cursors?
What is cursors?  What is cursors?   Hi, Cursor... basis, instead of the typical SQL commands that operate on all the rows in the set at one time. In order to work with a cursor we need to perform some steps 

SQL Tutorial

Close Cursors in SQL
Close Cursors in SQL       Close Cursors is used to close the Cursor temporary, when the open... illustrate an example from Close Cursors in SQL. To understand this example 

SQL Tutorial

Close Cursors in SQL
Close Cursors in SQL      ... it is not required. A cursor in a SQL can be closed with close... illustrates an example 'Close Cursor in SQL'. To grasp this example, we 

SQL Question

SQL
SQL  1)What is ref cursor? Where u can use this ref cursor? 2)What is difference between procedure and function? 3)What is trigger? How many types of triggers are there? 4)What is cursor? Explain different types of Cursors 

Quartz Tutorials

Use HANDLER Statement in Cursors
Use HANDLER Statement in Cursors       Use HANDLER Statement in Cursor is used to define... basis. The Cursor help you to return a result set and return directly 

MySQL

MySQL Cursor
MySQL Cursor       Here we are going to describe about the MySQL cursor and how to declare, open... either cursors or handlers.  To create a cursor you must be familiar 

Free SQL books

SQL Example, Codes and Tutorials
; Declare Cursors in SQL Declare Cursors in SQL is used to define cursor and its characteristics.  Creating Cursors in SQL  Creating Cursor in SQL is used to create a cursor in SQL.   Close Cursors in SQL 

SQL Question

Doubt In Sql query
Doubt In Sql query  Hi Have a glance @ http://img98.imageshack.us/img98/4348/tableo.png For a single country there may be n numbers of country_notes. I Need to fetch all the distinct records of countries with the latest country 

SQL Question

SQL
SQL Trigger query  Why we use the Trigger and what it's uses?  ... statements are issued against views 9)Publish information about database events, user events, and SQL statements to subscribing applications 10)Restrict DML 

SQL Question

SQL
statements are issued against views 9)Publish information about database events, user events, and SQL statements to subscribing applications 10)Restrict DML 

SQL Question

SQL
statements are issued against views 9)Publish information about database events, user events, and SQL statements to subscribing applications 10)Restrict DML 

SQL Question

SQL
statements are issued against views 9)Publish information about database events, user events, and SQL statements to subscribing applications 10)Restrict DML 

JDBC Questions

Sql Connection is not creating
it is creating sql connection and allwoing me to access excel but when i am...Sql Connection is not creating  Hi i am developing an web application..for that i am using excel as database. To connect for database am using jdbc 

SQL Question

sql tips for optimizing queries
learn about indexing, sargability and the ways to replace cursors and looping...sql tips for optimizing queries  Can anyone share tips on how to optimize sql queries ?   Optimizing SQL Query Remove user-defined inline 

SQL Tutorial

Use HANDLER Statement in Cursors
Use HANDLER Statement in Cursors       Use HANDLER Statement in Cursor is used to define... basis. The Cursor help you to return a result set and return directly 

SQL Question

Creating Database - SQL
Creating Database  Hi I am Guru I am having the confusion in creating the database.Actually Just I joined one small company. I am... ciao.co.uk. we are creating the database in mysql. 1> category->subcategory-> 

SQL Question

learn sql - SQL
learn sql  how to learn sql......idont know anything about programming knowledge  Hi Friend, Please visit the following link: http://www.roseindia.net/sql/ Thanks 

SQL Tutorial

SQL
Query Language (SQL), a standard language used for creating, updating, querying... of data. SQL consists of structured statements used in creating tables, and also... SQL - SQL Introduction     

JDBC Questions

creating jdbc sql statements - JDBC
creating jdbc sql statements  I had written the following program and when i compile it it is giving some errors...can u give the reason.. Actually i had created table in MS Access by giving name as jdbcsecond and dsn name 

SQL Question

SQL Error - SQL
SQL Error  Invalid character value for cast specification on column number 5 (Designation) Whats this error about this if the field i specified in programming error. ie DB fields in above question 

SQL Question

insertion in SQL - SQL
in the database because of single code in the name. dbase is MS-SQL emp.name data type... as I know string parameter in SQL is denoted as 'john' . I think thats why.... calrify my doubt........  Hi friend, Code to solve the problem 

SQL Question

large resultset values - SQL
"com.microsoft.sqlserver.jdbc.SQLServerException: The system is out of memory. Use server side cursors for large result.... Please help me To avoid such problems as becoz my project is about to deliver 

SQL Question

Java and SQL - SQL
in getting a data to SQL. my problem is on how to come up with a pop up alert message in the user interface where in the message will be coming from the SQL table. the message was in the SQL table and i want to get that message 

SQL Question

sql
difference between sql and oracle  what is the difference between sql and oracle 

SQL Question

sql
sql  how to get first row in sql with using where condition in sql? how to get last row in sql with using where condition in sql 

SQL Question

database - SQL
not have Cursor Support, SQL Server does. * MySQL does not support Stored...database  Is there any difference between sql ans mysql?  Hi rahul, Following are some specific technical differences in MySQL and SQL 

Date Calendar

doubt - Date Calendar
doubt about retrieve dates from Database  Retrieve dates from...){ System.out.println("SQL statement is not executed!"); } } catch...){ System.out.println("SQL statement is not executed!" 

SQL Question

dbms - SQL
dbms  what is the process of creating new user in sql? tell me the process 

SQL Question

sql
sql  I want interview sql questions   Please visit the following link: SQL Tutorials 

SQL Question

Sql
Sql  how to find maximum of a101,a102,a103 from a table in sql 

SQL Question

SQL
SQL  hii What is sql?   hello, SQL, which stands for Structured Query Language, is a special-purpose language used to define, access, and manipulate data. SQL is non procedural, meaning that it describes 

SQL Question

sql
sql  returning value from a store procedure in sql with example   Please visit the following links: http://www.roseindia.net/mysql/mysql5/stored-procedures-and-functions.shtml http://www.roseindia.net/sql/create 

SQL Question

SQL
SQL  In my computer i have microsoft sql 2008.how can i set that in the cmd.i want to use that in cmd.what is the default username and password 

SQL Question

SQl
SQl  . Given two tables: table1(player, groundname, numcenturies); table2(ground_name, country); Write and SQL query for the following: " Select all the players from table1 who has 

Java Beginners

doubt
creating the instance. You can download the java decompiler from the following link 

SQL Question

SQL
SQL   1)How to Store 1000 records in Oracle object. 2)Write a query for calculate highest, 3rd Highest & 10th highest salary from emp teble. 3)What is Sequence. 4)How to use rowid in Sql. 5)What is Views. 6)How 

SQL Question

oracle - SQL
oracle  how many attributes in cursor what are they?  Hi Friend, It is having four attributes: 1)%ISOPEN 2)%FOUND 3)%NOTFOUND 4)%ROWCOUNT Thanks 

SQL Question

SQL
SQL  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d %M %Y') FROM 

SQL Question

SQL
SQL  how to get ( 15 march 2011) and (15/03/2011) output using SQL   Use the following queries to get the data from database in the given format. For (15 march 2011) format: SELECT DATE_FORMAT(dob, '%d %M %Y') FROM 

SQL Question

SQL
tables EMP, and DEPT, the structure for which are given above. Write SQL queries 

SQL Question

SQL
 

SQL Question

SQL
 

SQL Question

SQL
 

SQL Question

SQL
 

SQL Question

SQL
 

SQL Question

SQL
 

SQL Question

SQL
 

Development process Questions

sql
 

SQL Question

sql
 

SQL Question

sql
 

SQL Question

SQL
 

SQL Question

sql
 

SQL Question

SQL
 

SQL Question

Datawarehousing - SQL
Datawarehousing  What is Datawarehousing? Can you write tutorials on about Datawarehousing 

SQL Question

sql - SQL
order by SQL Query  What is order by in SQL and when this query is used in SQL?Thanks!  Hi,In case of mysql you can user following query.Select salary from salary_table order by salary desc limit 3,1Thanks 

JDBC Questions

SQL Exception
SQL Exception  I want stores data in to the databse table but it can't be stores it shows an error about sql exception. blackberry.html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org 

SQL Question

sql - SQL
want query? 4.what is the diffrence between sql and plsql?  Hi Friend... HAVING n>1; Difference between SQL and PL/SQL: SQL is a structured query...(select,insert,update etc.), manipulate objects(DDL) and data(DML). PL/SQL 

SQL Tutorial

Using while loop to loop through a cursor
Using while loop to loop through a cursor       Cursor in SQL is used to define a set... while loop to loop through a cursor'. The Example create a table Stu_Table 

XML Questions

XML in SQL Server
XML in SQL Server  Hi..... please anyone tell me about What is the purpose of FOR XML in SQL Server? Thanks 

SQL Question

sql - SQL
sql  write a dyamic sql program to display the name of a employee whose salary is <5000  Hi Friend, Use the following query... the following link: http://www.roseindia.net/sql/ Thanks 

Java Beginners

"Doubt on Swing" - Java Beginners
"Doubt on Swing"  Hi Friend.... Thanks for ur goog Response.. i need to create a GUI Like... pic1.gif RadioButton pic2.gif... button..it should link to d sql.. how oes it possible friend.. Thanks 

Java Magazine Questions

doubt about J2EE connetivity
doubt about J2EE connetivity  steps to connect J2EE components with MYSQL 

SQL Question

SQL - SQL
SQL  How to combine 'LIKE' and 'IN' operators in sql query?   select name from tab1 where name like 'R%' AND city in('bangalore','mumbai'); Table Name: tab1 FieldName ===================== | name | city 

SQL Question

SQL - SQL
SQL  Jus c da case we hve certain images in some folder or some area in sql can we create trigger or procedure so dat in front like in asp page while clicking image it will be showed in page ...... ...I mean writing code for each 

SQL Question

sql - SQL
sql functions with examples  I need sql functions with examples to learn fast.  Hi friend,<%@ page language="java" import...("SQL statement is not executed!"); } } catch (Exception e 

Quartz Tutorials

Using while loop to loop through a cursor
Using while loop to loop through a cursor       Cursor in SQL is used to define a set... while loop to loop through a cursor'. The Example create a table Stu_Table 

SQL Question

SQL - SQL
 

SQL Question

sql - SQL
 

SQL Question

sql - SQL
 

SQL Question

SQL - SQL
 

SQL Question

sql - SQL
 

Eclipse Plugins

SQL Edge
SQL Edge       SQL Edge not only allows users to execute SQL scripts, but also provides a powerful way to visualize data relationships. With SQL Edge, users can use only 

SQL Question

.Net and SQl 2000 Login page
.Net and SQl 2000 Login page  Please help me creating a login page using dot net using data base sql 2000 

SQL Question

sql server - SQL
sql server  what is SQL server? & what is oracle? are they same 

Java Beginners

How sql Queries possible in DAO without creating Database connections - Java Beginners
How sql Queries possible in DAO without creating Database connections  In DAO we are writting sql queries , how it is possible without creating and closing database connections 

SQL Question

MySql function - SQL
MySql function  Hi sir/madam, I am creating a function in mysql5.0, but it is stating that 'You have an error in SQL systax; check the manual... is appreciated well in advance. Thank you, The SQL code is as follows 

JMS Questions

doubt about JMS selector
doubt about JMS selector  Hi! , i have a little problem with message selector in JMS api. I'am try develop a request and response with JMS queue, but I didn├?┬┤t get success. in my case, i send a message to server, server 

XML Questions

Doubt about Xstream Converter
Doubt about Xstream Converter  Hi, I am using the Xstream freamwork to read a lot of files in a batch operation. I use a custom converter Xstream to read some properties of my Xml file, but when I changed my application 

JMS Questions

doubt about JMS selector
doubt about JMS selector  Hi! , i have a little problem with message selector in JMS api. I'am try develop a request and response with JMS queue, but I didn├?┬┤t get success. I use this reference site like guide. in my 

Java-Tutorials

SQL GROUP BY Example
SQL GROUP BY Example In this section we will discuss about the group by statement in SQL. In this tutorial we will use MySQL for using the SQL statements... be used with or without the SQL aggregate functions written with the SELECT 

SQL Question

sql server - SQL
sql server  How many no of tables can be joined in same sql server 

Java Beginners

doubt - Java Beginners
SQL statement"); System.exit(1); } //Display text read 

SQL Question

SQL help - SQL
SQL help  Hi Deepak, Can u pls tell me what is the difference between PL/SQL and MYSQL? Is there any difference in generating the code 

Hibernate Questions

creating table in hibernate
creating table in hibernate  how to create table by the help... tell me about that with example, it is very urgent to me and i didn't get any... < property name="show_sql">true < property name="dialect"> 

Java Beginners

How to import data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase??
How to import data from sql server table into an excel file by creating... data from sql server table into an excel file by creating the rows dynamically in the excel according to the dataabase?? There is a table in sql server having 

SQL Question

SQL JOINS - SQL
SQL JOINS  Hom many Joins In Sql?plz explian all those things?  Hi Friend, Please visit the following link: http://www.roseindia.net/sql/sqljoin/index.shtml Hope that it will be helpful for you. Thanks 

Java Beginners

sql component
sql component  is sql package is the component of jdbc 

JDBC Questions

An SQL Locator.
An SQL Locator.  What is an SQL Locator 

SQL Question

sql 2000 - SQL
sql 2000  why binary data when inserted into the sql column of data type image or binary is stored in the form of hexadecimal nos. instead of the name of the file inserted????? Thanx for ur response in advance 

SQL Question

auto sql script - SQL
auto sql script  Is there a way of generating inserts scripts using the table structure for oracle database 

Java Beginners

How to make a CRUD without using SQL Server? by just using your GUI? (CRUD = Creating, Register, Update, Delete)
How to make a CRUD without using SQL Server? by just using your GUI? (CRUD = Creating, Register, Update, Delete)  well I got a Program that can Register Update and delete a account to SQL Server. from now on we have to make 

SQL Question

SQL injunctions - SQL
SQL injunctions  Could you please tell me how to handle the sql injunctions?  Hi friend, SQL injection is a technique that exploits.... Prevention against SQL injection, User input must not directly be embedded in SQL 

Programming Tutorials

SQL
SQL       SQL SQL is an English like language consisting of commands to store, retrieve, maintain & regulate access to your database. SQL*Plus SQL*Plus 

Advertisements

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles