|
Hi Sir,
Iam using Sql 2000.Its not working.If there is any solution please rely me.
Regard's
Veeresh
i want to join this group
|
|
|
|
|
I've just had it tested on SQL 2000 and it worked. How is it failing? Whats the error?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
One minut sir.I will check once again.Thanks for replying.
Regard's
Veeresh
i want to join this group
|
|
|
|
|
Hi,
Thanks sir i got it really thanks a lot
Regard's
Veeresh
i want to join this group
|
|
|
|
|
You are welcome
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi here is the code in my page
Dim attachment As String = "attachment; filename=Contacts.pdf"
Response.AddHeader("content-disposition", attachment)
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/pdf"
when i try to open it, it opens Acrobat Reader but the Acrobat Reader gives me an error in the form of a message box with this message "Acrobat could not open 'PressRelease[1].pdf' because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded)."
any idea?
pls....
|
|
|
|
|
sandhya14 wrote: any idea?
Here's an idea. Post your question in the right forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
sandhya14 wrote: Hi here is the code in my page
Dim attachment As String = "attachment; filename=Contacts.pdf"
Response.AddHeader("content-disposition", attachment)
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Response.ContentType = "application/pdf"
when i try to open it, it opens Acrobat Reader but the Acrobat Reader gives me an error in the form of a message box with this message "Acrobat could not open 'PressRelease[1].pdf' because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded)."
I seem to be missing the select statement here, which seems to suggest that you've picked the wrong forum. Try the ASP.NET one instead.
|
|
|
|
|
I want to execute a stored procedure once per day.(i want to delete some records from a datatable).Is there any direct way do this?
Please help me out.
Thanks.
|
|
|
|
|
You can use SQL Server Agent. This link explains it all:
MSDN SQL Server Agent
Bob
Ashfield Consultants Ltd
|
|
|
|
|
|
Use a SQL job
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Ya. I'll do it.thanks in advanced.
|
|
|
|
|
Is there any way to do scheduling execution of sp using C#.
Any suggestions...
thanks
|
|
|
|
|
How do I add a column to multiple table when some of the table already have the column name I wish to add.
Thanks in advance,
Michael
|
|
|
|
|
Simple. You can't. If the column name exists in the table then you can't add it again, it wouldn't make sense.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
I understand that if it is there I cannot add it again, however can I use a command such as "IF NOT EXIST" or something similar I have tried variations and can't seem to get it correct does anyone know how I can do this.
Michael
|
|
|
|
|
Assuming you are using sql server (2000 or 2005)
old way
if not exists (select 1 from syscolumns where name = 'column1' and id = object_id('table1'))<br />
begin<br />
alter table table1<br />
add column1 int<br />
end
or, using the views that come as standard
if not exists(select 1 from information_schema.columns where table_name = 'table1' and column_name = 'column1')<br />
begin<br />
alter table table1<br />
add column1 int<br />
end
Ensure you do a USE {database} first as these only work in the current database
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Could somebody kindly point me to an article about performing a join that excludes the results from another table? I believe that it is something resembling WHERE tblFirstTable.Key...NOT IN tblSecondTable.Key or something.
modified on Tuesday, January 29, 2008 5:19:13 PM
|
|
|
|
|
I have written a small query to illustrate how to do this.
As you were polite in asking for an article and not the code (to be honest it's quicker for me to write the code than find an article).
This example shows how to find all the animals in the zoo table that are not on the feeding table - I guess some animals are going to go hungry.
<br />
select distinct z.animal<br />
from zoo z<br />
left join feeding f<br />
on z.animal= f.animal<br />
and f.animal is null<br />
Regards
Guy
You always pass failure on the way to success.
|
|
|
|
|
I am running in a problem of not able to restore a differential database backup through a scheduled job. The Restoration command is :
declare @str nvarchar(4000)
declare @spid int
while exists (select spid from sysprocesses where dbid= db_id('SGOTA'))
begin
set @spid = (select min(spid) from sysprocesses where dbid= db_id('SGOTA'))
set @str= 'kill ' + convert(nvarchar,@spid)
execute sp_executesql @str
end
RESTORE DATABASE SGOTA from disk='d:\FTP\DB Backup\OTA\sg_Differential_Backup.BAK'
with standby ='C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\UNDO_SGOTA.DAT'
The error I am receiving is:
Executed as user: NT AUTHORITY\SYSTEM. The preceding restore operation did not specify WITH NORECOVERY or WITH STANDBY. Restart the restore sequence, specifying WITH NORECOVERY or WITH STANDBY for all but the final step. [SQLSTATE 42000] (Error 4306) RESTORE DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed.
I have taken a full backup earlier. Both the databases have a Bulk-Logged Recovery model and the destination database is in read-only mode.
I am in an urgent need of the solution. Kindly help.
-----Have A Nice Day-----
|
|
|
|
|
i hv created a database named Sample.....
In this database i have 3 tables named Department,Division,Location..All tables are having data also....nw i need to delete the data from all the three table at a time through query.....
is it posiible?.
if so,den what is the query for that?....
any kind of information is appreciatable...
please help me...
|
|
|
|
|
try over referential integrity using primaty and foreign key, with cascade delete oprion on tables
when u delete one row(Col001) from MyTableOne cascade delete will delete all rows in other tables that have referential integrity with table MyTableOne on Col001.
|
|
|
|
|
sorry i didnt get u.....am new to sqlserver.....can u pls tel me how to do this
|
|
|
|