Hi,
Sorry Please use like this..
DECLARE @SQL_ST VARCHAR(8000)
set @SQL_ST = 'SELECT EM.EMPLOYEE_ID,
(EM.FIRST_NAME + '' '' + ' + ' ' + 'EM.LAST_NAME) as emp_name from employee_master em'
print @SQL_ST
Regards,
Sharmila
User Profile
Collapse
-
Hi,
USE the below...
DECLARE @SQL_ST VARCHAR(8000)
set @SQL_ST = 'SELECT EM.EMPLOYEE_ID,
(EM.FIRST_NAME + ' + ' ' + 'EM.LAST_NAME) as emp_name from employee_master em'
execute (@SQL_ST)
Cheers,
SharmilaLeave a comment:
-
Hi,
Find the query for raname table name,
sp_rename 'OLD_Name','NEW _Name'
sp_rename :
Changes the name of a user-created object (for example, table, column, or user-defined data type) in the current database.
Syntax
sp_rename [ @objname = ] 'object_name' ,
[ @newname = ] 'new_name'
[ , [ @objtype = ] 'object_type' ]
Regards,...Leave a comment:
-
Hi,
Variable should be handled as follows.
go throu. the following lines for example..
DECLARE @tblName char(50)
set @tblName='Emplo yee' --Table name
DECLARE @count char(500)
set @count='(select count (*) from ' + rtrim(isnull(@t blName,0)) + ')'
PRINT @count
Then Use the variable, @count to update the second column.
Hope U understand.
Regards,...Leave a comment:
-
Hi,
You can use the DTS for transformation and schedule it.
Cheers,
Sharmila...Leave a comment:
-
Hi,
To copy text file into database ,
use the DTS method
Regards,
Sharmila...Leave a comment:
-
Hi,
Ativities of DBA are :
server management(maki ng optimized)
security
recovery and back up
Regards,
Sharmila...Leave a comment:
-
--declare the variable @info
select @info =info from inserted.
if @info=8
begin
--update statement
end
Cheers,
Sharmila
-------------------------...Leave a comment:
-
Hi,
I can give an idea that.
1. replace like with '=' sign(like left(intEncashm entID,2) ='TR')
2. instead of case, can use isnull/replace.
3. Use '(nolock)'.
Regards,
Sharmila...Leave a comment:
-
Error 18024
Hi,
while executing the below script I got the following error
Server: Msg 18024, Level 16, State 1, Line 0
xp_sendmail: failed with operating system error 32
during debugging the script if I change the extention/name of attachments('ac hpayment.xls') then it is working fine.
If I we try with the same xls extension with same file name ('achpayment.xl s') then it is not working in...
No activity results to display
Show More
Leave a comment: