Viewing 15 posts - 121 through 135 (of 216 total)
You can also use this :
select * from tableA where isnull(col5,'')=''
Regards ,
Amit Gupta
March 20, 2006 at 5:56 am
Use this Query :
select * from tablea where col5=replace(col5,'null','')
Regards,
Amit Gupta
March 20, 2006 at 5:20 am
Yes!!
You can create the Temp tables. in functions.
set @str='OSQL -S. -damit_db -Usa -P -Q" insert into tbl_v select count(*) from ' + @val +'" -oC:\AB.TXT'
EXEC master..xp_cmdshell @str,NOOUTPUT
Through the use of...
March 20, 2006 at 4:28 am
For that you have to use : isnull() function. to handle nulls.
Regards ,
Amit Gupta
March 20, 2006 at 4:20 am
use this simple Query :
select replace(str('2345',5),' ',0)
NOTE :
In place of '2345' you can use your Column. but it should be convert into a varchar type.
Regards ,
Amit Gupta
March 20, 2006 at 4:15 am
first try to connect direct to that server through
Query Analyser.
if it is not connected then you have to register the Sql Server.
You can do it by EM (Enterprise Manager)
Regards,
Amit Gupta.
March 20, 2006 at 4:08 am
If you have the latest backup of data, then you can restore over into Current Database,
Regards,
Amit Gupta./
March 20, 2006 at 3:45 am
Use the following Query :
SELECT a.*
FROM OPENROWSET('SQLOLEDB','<your serv_name>';'server_login';'password',
'your sql query ') AS a
Regards,
Amit Gupta.
March 20, 2006 at 3:40 am
Hi,
You can use the following Query to solve This kind of Problem :
Select * from
(SELECT 1 as col,
mnt_HeaderID as hdr_HeaderID,
BatchDate +
NotUsed +
TransactionCode +
GrossBatchTotal...
March 17, 2006 at 8:42 am
You can use the following Query :
But in this case you have to use all the columns of Table A while inserting data into Table B
insert into tableB
select <Column names>...
March 17, 2006 at 8:33 am
Hi,
Acoording to me it is Working fine,,
When you run the query :
select char(254)
it willl return : 'þ'
In your last Query your string does not contain 'þ'
character so, it is returning...
March 14, 2006 at 9:27 am
You Can use Either :
select * from <tablename> where left(col_name,1)='E'
It will display to you all the records starting from 'e'
OR
select * from <tablename> where col_name like 'E%'
Both will provide...
March 14, 2006 at 9:20 am
Sorry ?
I do't have any backup ?
but i think it will not solve my problem??
Then What i have to do???
Regards,
Amit Gupta
March 7, 2006 at 8:11 am
Hi,
Use this kind of Query ?
if exists(select * from information_schema.columns where table_name='???' and column_name='????')
begin
//////// if part
end
else
//////// else part
begin
end
Regards
Amit Gupta
March 3, 2006 at 8:23 am
Hi ,
also checks for Null values..
Select *
from tab1
where isnull(col1,'')+isnull(col2,'')+cast(isnull(col3,'') as varchar(20))
not in (select isnull(col1,'')+isnull(col2,'')+(cast(isnull(col3,'') as varchar(20)) from tab2)
Regards
Amit Gupta
March 3, 2006 at 8:19 am
Viewing 15 posts - 121 through 135 (of 216 total)