Solved

If record exist in declare table @tt

Posted on 2013-01-16
1
289 Views
Last Modified: 2013-01-16
I have declared a table namely @tt in which inserting some values to the text file.

I need to update table b if data is available in @tt otherwise exit. Like is

if @tt Row>0 then
Select..............

Please help me how to check data is in @tt or not.

Mehram
0
Comment
Question by:Mehram
1 Comment
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 500 total points
ID: 38782056
try

if exists(select 1 from @tt )
begin
   -- data present

end
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Adventure works database .msi 4 60
SQL Server; storing data in offline mode. 10 67
spx for moving values to new table 5 70
Query 14 54
There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now