Hello,
I am in a situation where i need to BCP (out ) all the records from a table uisng a batch file.
I was wondering how will i write the following logic
if exists (SELECT name
FROM sysobjects
WHERE name = N'MY_TABLE_NAME'
AND type = 'U')
echo main..MY_TABLE_NAME >>..................
.........................
something something....................
-----------
bcp main..MY_TABLE_NAME out............................