Thansk for your reply edward. However, I dont normall use Interbase and your example didnt make a lot of sence. I managed to find a similar example but I dont follow part of it.<br><br>when I run :<br><br>select * from rdb$relations WHERE RDB$RELATION_NAME = 'MyTable'<br>
and<br>DROP TABLE MyTable;<br>COMMIT;<br><br>It tells me DROP is an invalid token. So I assume the "And" is not part of the SQL statement.<br>So what I dont follow is, just doing a "SELECT" to see if a record exists then dropping the table seems like something is missing.<br>
<br>in a programming sense, I would expect something like<br><br>IF select * from rdb$relations WHERE RDB$RELATION_NAME = 'MyTable' <> '' then<br>
DROP TABLE MyTable;<br>
<br>I know thats not real code, but my point is, just because I can do a select, doesnt tell me if the table exists or not to try to delete it.......I hope you follow what I am meaning.<br><br>Jeremy<br><br><br><div class="gmail_quote">
On Tue, Jun 16, 2009 at 4:05 PM, John Bird <span dir="ltr"><<a href="mailto:johnkbird@paradise.net.nz">johnkbird@paradise.net.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff">
<div><font color="#000000" face="Arial" size="2">For a good working example
see</font></div>
<div><font color="#000000" face="Arial" size="2"></font> </div>
<div><font color="#000000" face="Arial" size="2"><a href="http://xkcd.com/327/" target="_blank">http://xkcd.com/327/</a></font></div>
<div><font color="#000000" face="Arial" size="2"></font> </div>
<div><font color="#000000" face="Arial" size="2">(Standard disclaimer - do not
try this at home!)</font></div>
<div><font color="#000000" face="Arial" size="2"></font> </div>
<div>John</div>
<div><font color="#000000" face="Arial" size="2"></font> </div>
<div>----- Original Message ----- </div>
<blockquote style="border-left: 2px solid rgb(0, 0, 0); padding-left: 5px; padding-right: 0px; margin-left: 5px; margin-right: 0px;"><div class="im">
<div style="background: rgb(228, 228, 228) none repeat scroll 0% 0%; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<b>From:</b>
<a title="jscoulter@gmail.com" href="mailto:jscoulter@gmail.com" target="_blank">Jeremy
Coulter</a> </div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b> <a title="delphi@delphi.org.nz" href="mailto:delphi@delphi.org.nz" target="_blank">NZ Borland Developers Group - Delphi
List</a> </div>
</div><div><div></div><div class="h5"><div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">
<b>Sent:</b> Tuesday, June 16, 2009 3:35
PM</div>
<div style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b> Re: [DUG] Drop table in
Interbase</div>
<div><font color="#000000" face="Arial" size="2"></font><br></div>ok cool I will try
that.<br><br>Thanks, Jeremy<br><br>
<div class="gmail_quote">On Tue, Jun 16, 2009 at 2:54 PM, Edward Koryagin <span dir="ltr"><<a href="mailto:ed_iv2001@yahoo.co.nz" target="_blank">ed_iv2001@yahoo.co.nz</a>></span>
wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote"><font color="#000000" face="Arial" size="2"></font><br>select *
from rdb$relations ...<br>and<br>DROP TABLE ....<br>Edward
Koryagin<br><br><br>--- On Tue, 16/6/09, Jeremy Coulter <<a href="mailto:jscoulter@gmail.com" target="_blank">jscoulter@gmail.com</a>>
wrote:<br><br>> From: Jeremy Coulter <<a href="mailto:jscoulter@gmail.com" target="_blank">jscoulter@gmail.com</a>><br>>
Subject: [DUG] Drop table in Interbase<br>> To: "NZ Borland Developers
Group - Delphi List" <<a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a>><br>>
Received: Tuesday, 16 June, 2009, 1:31 PM<br>
<div>
<div></div>
<div>> Hi all.<br>> In interbase, how do I drop a table if it
already exists?<br>> I want to check for a table exists and if it does
exist,<br>> drop it.<br>><br>> I have Googled, but I cant seem to
find anything. I am<br>> prob. searching wrong
:-)<br>><br>><br>> Jeremy<br>><br>><br></div></div>>
-----Inline Attachment Follows-----<br>><br>>
_______________________________________________<br>> NZ Borland
Developers Group - Delphi mailing list<br>> Post: <a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br>> Admin:
<a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a><br>>
with Subject:
unsubscribe<br><br><br><br><br>_______________________________________________<br>NZ
Borland Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br>Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe:
send an email to <a href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a>
with Subject: unsubscribe<br></blockquote></div><br>
</div></div><p>
</p><hr><div class="im">
<p></p>_______________________________________________<br>NZ Borland
Developers Group - Delphi mailing list<br>Post: <a href="mailto:delphi@delphi.org.nz" target="_blank">delphi@delphi.org.nz</a><br>Admin:
<a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>Unsubscribe: send an email to
<a href="mailto:delphi-request@delphi.org.nz" target="_blank">delphi-request@delphi.org.nz</a> with Subject:
unsubscribe</div></blockquote></div>
<br>_______________________________________________<br>
NZ Borland Developers Group - Delphi mailing list<br>
Post: <a href="mailto:delphi@delphi.org.nz">delphi@delphi.org.nz</a><br>
Admin: <a href="http://delphi.org.nz/mailman/listinfo/delphi" target="_blank">http://delphi.org.nz/mailman/listinfo/delphi</a><br>
Unsubscribe: send an email to <a href="mailto:delphi-request@delphi.org.nz">delphi-request@delphi.org.nz</a> with Subject: unsubscribe<br></blockquote></div><br>