<?xml version="1.0" encoding="utf-8"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>DaniWeb IT Discussion Community - 16,126,127,128,129,142</title>
		<link>http://www.daniweb.com/forums/</link>
		<description>Tech support, programming, web development, and internet marketing community. Forums to get free computer help and support.</description>
		<language>en-US</language>
		<lastBuildDate>Mon, 09 Nov 2009 07:01:07 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/alphaimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - 16,126,127,128,129,142</title>
			<link>http://www.daniweb.com/forums/</link>
		</image>
		<item>
			<title>mysql file created in php</title>
			<link>http://www.daniweb.com/forums/thread237140.html</link>
			<pubDate>Mon, 09 Nov 2009 06:08:56 GMT</pubDate>
			<description><![CDATA[i have a project that implements the using of database. i chose to use php as the application interface and mysql as the database. 
 
at the end of this month, we should submit the softcopy. now, i'm confused with the files of my project. 
i'm using wamp server, and in folder www there are php and...]]></description>
			<content:encoded><![CDATA[<div>i have a project that implements the using of database. i chose to use php as the application interface and mysql as the database.<br />
<br />
at the end of this month, we should submit the softcopy. now, i'm confused with the files of my project.<br />
i'm using wamp server, and in folder www there are php and html files. but, i don't know which file is the database file. as far as i know, the database is the file with .db extension. but, i can't find it.<br />
<br />
does anyone know which file is the database?<br />
thx so much.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>AirGear</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread237140.html</guid>
		</item>
		<item>
			<title>problem with wamp</title>
			<link>http://www.daniweb.com/forums/thread237119.html</link>
			<pubDate>Mon, 09 Nov 2009 04:19:59 GMT</pubDate>
			<description><![CDATA[I set a password to mysql console in wamp. I followed a video tutorial. 
And it was successful. 
But now I can't access phpmyadmin or localhost.  
It says invalid password ...And gives no option to type the password. 
 
How can I solve this??]]></description>
			<content:encoded><![CDATA[<div>I set a password to mysql console in wamp. I followed a video tutorial.<br />
And it was successful.<br />
But now I can't access phpmyadmin or localhost. <br />
It says invalid password ...And gives no option to type the password.<br />
<br />
How can I solve this??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread237119.html</guid>
		</item>
		<item>
			<title><![CDATA[creating files with 'outfile'??]]></title>
			<link>http://www.daniweb.com/forums/thread237118.html</link>
			<pubDate>Mon, 09 Nov 2009 04:16:06 GMT</pubDate>
			<description><![CDATA[I created some data files with 'outfile ' command. 
 
The files are created in the mysql folder.{I use WAMP} 
I want to create those files in another directory. 
 
How can I do that? 
 
Thankx in advance.]]></description>
			<content:encoded><![CDATA[<div>I created some data files with 'outfile ' command.<br />
<br />
The files are created in the mysql folder.{I use WAMP}<br />
I want to create those files in another directory.<br />
<br />
How can I do that?<br />
<br />
Thankx in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread237118.html</guid>
		</item>
		<item>
			<title>Delete Rows</title>
			<link>http://www.daniweb.com/forums/thread236999.html</link>
			<pubDate>Sun, 08 Nov 2009 15:23:25 GMT</pubDate>
			<description><![CDATA[Hi 
 
I wonder how I do to remove usersid from 1915 to 1945 for example in MS Sql? 
 
Delete from [dbo].[user] where user ID = 1915 to userID 1945 
 
When i add that i get this message: 
 
Msg 156, Level 15, State 1, Line 2 
Incorrect syntax near the keyword 'to'.]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I wonder how I do to remove usersid from 1915 to 1945 for example in MS Sql?<br />
<br />
Delete from [dbo].[user] where user ID = 1915 to userID 1945<br />
<br />
When i add that i get this message:<br />
<br />
Msg 156, Level 15, State 1, Line 2<br />
Incorrect syntax near the keyword 'to'.<br />
Msg 156, Level 15, State 1, Line 3<br />
Incorrect syntax near the keyword 'to'.<br />
<br />
Can someone please tell me what is wrong?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Kaddolas</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236999.html</guid>
		</item>
		<item>
			<title>MS SQL Recursion problem</title>
			<link>http://www.daniweb.com/forums/thread236984.html</link>
			<pubDate>Sun, 08 Nov 2009 13:26:28 GMT</pubDate>
			<description>I have following tables 
table1 
nr_key1 
nr_dad1 
 
table2 
nr_key2 
value 
(repeated ~n times with same nr_key2 and different value)</description>
			<content:encoded><![CDATA[<div>I have following tables<br />
table1<br />
nr_key1<br />
nr_dad1<br />
<br />
table2<br />
nr_key2<br />
value<br />
(repeated ~n times with same nr_key2 and different value)<br />
<br />
in table2 nr_key1 = nr_key2<br />
<br />
After I have iterated through nr_key1 I want to use recursion to select nr_key1 = nr_dad1 and iterate again table2 with the new nr_key1. This should be repeated as long as nr_dad1 is null. I have succesfully got the result but only if nr_key1 = nr_key2 contains values. If table2 is empty for the current nr_key1 my recursion is broken. I receive error if I try to use outer join in my recursion. Also my current solution is quite slow, because I am iterating the whole hierarchy again from each value found in table2. Is it possible to implement some sort of a check?<br />
<br />
Maybe my approach is wrong? Any suggestions will be highly appreciated thanks.<br />
<br />
 <pre style="margin:20px; line-height:13px">with test (NR_KEY1, NR_DAD1, VALUE, leveli)&nbsp; <br />
AS<br />
(<br />
select a.NR_KEY1, a.NR_DAD1, VALUE,<br />
1 as leveli<br />
from table1<br />
right outer join table2 a ON<br />
NR_KEY2 = a.NR_KEY1 where a.NR_KEY1 = 10020<br />
<br />
union all<br />
<br />
select a.NR_KEY1, a.NR_DAD1, e.VALUE, <br />
eh.leveli + 1 as leveli<br />
from table1 e<br />
&nbsp; &nbsp; &nbsp; &nbsp; inner join table2 a ON<br />
&nbsp; &nbsp; &nbsp; &nbsp; e.NR_KEY2 = a.NR_KEY1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; inner join test eh ON <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; e.NR_KEY2 = eh.NR_DAD1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where e.NR_KEY2 = eh.NR_DAD1<br />
)<br />
select * from test order by leveli</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>elauri</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236984.html</guid>
		</item>
		<item>
			<title>database design for webstore with over 2000 products</title>
			<link>http://www.daniweb.com/forums/thread236954.html</link>
			<pubDate>Sun, 08 Nov 2009 09:43:39 GMT</pubDate>
			<description>what do i need im a newb just wondering. have subscibed will be otofied of any posts.</description>
			<content:encoded><![CDATA[<div>what do i need im a newb just wondering. have subscibed will be otofied of any posts.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>SKANK!!!!!</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236954.html</guid>
		</item>
		<item>
			<title>Retrieve row based column having null value in sql2000</title>
			<link>http://www.daniweb.com/forums/thread236768.html</link>
			<pubDate>Sat, 07 Nov 2009 11:59:05 GMT</pubDate>
			<description>Hello 
   i wish to retrieve rows from  a table based on a particular column which contains null values in sql2000 server I try ed a lot but its not working please help me.</description>
			<content:encoded><![CDATA[<div>Hello<br />
   i wish to retrieve rows from  a table based on a particular column which contains null values in sql2000 server I try ed a lot but its not working please help me.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>shine_jose</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236768.html</guid>
		</item>
		<item>
			<title>Tables appear under wrong database in SQL Server Mgmt. Studio Express</title>
			<link>http://www.daniweb.com/forums/thread236606.html</link>
			<pubDate>Fri, 06 Nov 2009 16:54:58 GMT</pubDate>
			<description><![CDATA[Whenever I create a new database from a C# program and create tables for that database, the tables always show up under the creator's default database instead of being listed under the newly created database. This observation is from Microsoft SQL Server Management Studio Express. Is there some...]]></description>
			<content:encoded><![CDATA[<div>Whenever I create a new database from a C# program and create tables for that database, the tables always show up under the creator's default database instead of being listed under the newly created database. This observation is from Microsoft SQL Server Management Studio Express. Is there some setting in Microsoft SQL Server Management Studio Express that I may apply to the users to remedy this?<br />
<br />
FYI: SQL Server 9.0.3042<br />
       SQL Server Management Studio Express 9.00.2047.00</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>lukeser</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236606.html</guid>
		</item>
		<item>
			<title>Connect by prior command</title>
			<link>http://www.daniweb.com/forums/thread236562.html</link>
			<pubDate>Fri, 06 Nov 2009 12:54:36 GMT</pubDate>
			<description>Hi All, 
Can anybody give me a solution how to solve or write a query for this scenario? 
 
there is table called ITT1 with the columns 
 
FATHER, CHILD_NUM, CODE, CODE_QTY 
a 1 b 1 
b 1 c 1.5 
c 1 d 2 
d 1 e 1</description>
			<content:encoded><![CDATA[<div>Hi All,<br />
Can anybody give me a solution how to solve or write a query for this scenario?<br />
<br />
there is table called ITT1 with the columns<br />
<br />
FATHER, CHILD_NUM, CODE, CODE_QTY<br />
a 1 b 1<br />
b 1 c 1.5<br />
c 1 d 2<br />
d 1 e 1<br />
<br />
There are 3 columns father,child_num,code &amp; the code_quantity.<br />
It is explained as 'a' is my FINAL finished good and is produced from raw material 'b' using 1kg.<br />
and here 'b' becomes my finished good and is produced from raw material 'c' using 1kg.<br />
and here 'c' becomes my finished good and is produced from raw material 'd' using 1kg.<br />
and here 'd' becomes my finished good and is produced from raw material 'e' using 1kg.<br />
<br />
now i want how much raw material 'e' is required to produced for eg. 20kg of 'a'<br />
<br />
should i use connect by prior or sub queries will help in this regards.<br />
kindly advice.<br />
<br />
Regards,<br />
Faheem</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>sk.faheemuddin</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236562.html</guid>
		</item>
		<item>
			<title>Universal character set?</title>
			<link>http://www.daniweb.com/forums/thread236543.html</link>
			<pubDate>Fri, 06 Nov 2009 10:48:03 GMT</pubDate>
			<description>I have a database that needs to hold names of people from all around the world. Some names have special characters in them such as é and ¢ 
 
Is there a character set I can use that will accept any character no matter what language it is (with the exception of non-English looking characters like...</description>
			<content:encoded><![CDATA[<div>I have a database that needs to hold names of people from all around the world. Some names have special characters in them such as é and ¢<br />
<br />
Is there a character set I can use that will accept any character no matter what language it is (with the exception of non-English looking characters like chinese characters for instance)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Venom Rush</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236543.html</guid>
		</item>
		<item>
			<title>LEFT JOIN problem</title>
			<link>http://www.daniweb.com/forums/thread236427.html</link>
			<pubDate>Fri, 06 Nov 2009 00:11:40 GMT</pubDate>
			<description>Hi All! 
 
I have 3 tables: 
 
test1 
id     name1 
 1     value1 
 
test2 
id     name2</description>
			<content:encoded><![CDATA[<div>Hi All!<br />
<br />
I have 3 tables:<br />
<br />
test1<br />
id     name1<br />
 1     value1<br />
<br />
test2<br />
id     name2<br />
 1     value2<br />
<br />
test3<br />
id     name3<br />
 3     value3_01<br />
 4     value3_02<br />
<br />
I want to display all records of table test1 with values of table test2 (test1.id = test2.id) and values of test3 (if test.id match with test1.id) - in this case test3 has no common ids with test1  so NULLs are displayed.<br />
How to make sql query to display:<br />
id1     name1   name2    name3<br />
   1     value1   value2     NULL<br />
<br />
I constructed query:<br />
 <pre style="margin:20px; line-height:13px">SELECT t1.id as id1, t1.name1 as name1, t2.name2 as name2, t3.name3 as name3<br />
FROM (test1 t1) LEFT JOIN (test3 t3, test2 t2)<br />
ON (t1.id=t2.id and t1.id=t3.id)</pre>but it gives me:<br />
<br />
id1     name1  name2   name3<br />
   1     value1   NULL     NULL<br />
<br />
name2 is NULL instead of desired &quot;value2&quot;. WHY?<br />
<br />
LEFT JOIN DEFINITION:<br />
SQL LEFT JOIN Keyword<br />
The LEFT JOIN keyword returns all rows from the left table, even if there are no matches in the right table.<br />
<br />
There are no matches in test3 table when joining test1 table so name3 from table3 is NULL in result.<br />
<br />
BUT There are matches in table test2 (test2.id=1 and test1.id=1) so why null is displayed?<br />
<br />
Hope anyone can help me. I am in big trouble.<br />
 <br />
Thanks in advace.<br />
Tom</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>pc131</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236427.html</guid>
		</item>
		<item>
			<title><![CDATA['UPDATE'ing table with same value over and over again!]]></title>
			<link>http://www.daniweb.com/forums/thread236359.html</link>
			<pubDate>Thu, 05 Nov 2009 19:44:33 GMT</pubDate>
			<description><![CDATA[One of the UPDATE queries I am trying to run is not quite working the way I want it to. I know this query is the culprit, but can't quite figure out how to fix it! Here's the story: 
------------------------------------------------------- 
I have 3 tables: let's call them tblUsers, tblDueVisits and...]]></description>
			<content:encoded><![CDATA[<div>One of the UPDATE queries I am trying to run is not quite working the way I want it to. I know this query is the culprit, but can't quite figure out how to fix it! Here's the story:<br />
-------------------------------------------------------<br />
I have 3 tables: let's call them tblUsers, tblDueVisits and tblWindows<br />
tblUsers:  UserID (PK, int), FirstName (char), LastName (char), BirthDate (smalldatetime), etc.<br />
tblDueVisits: UserID (int), DueDate (smalldatetime), WindowName(char). UserID + DueDate together make up the key for this table.<br />
tblWindows: WindowID (int), WindowName (varchar)<br />
tblWindows stores a pre-defined maximum number of records (say 10). This table will, at least, theoretically never change.<br />
Now this is what I have to do:<br />
•	Check how many records a particular User ID (say ID # 1) has in tblDueVisits. For the sake of this example assume there are 5 records.<br />
•	Next, SELECT the TOP 5 WindowName from tblWindows.<br />
•	UPDATE tblDueVisits to store the WindowName in tblDueVisits WHERE UserID = 1.<br />
(The front-end user selects an ID# from a web page’s drop down box)<br />
-----------------------------------------------------<br />
I have written the T-SQL loop statements to do this, but somehow the UPDATE doesn’t work. Specifically, what happens is that the same WindowName gets written 5 times rather than writing the 5 different WindowNames once each!!<br />
<br />
Let me know if I wasn't totally clear about something, or if you need me to post the code for this.<br />
<br />
Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>SQL_n00b</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236359.html</guid>
		</item>
		<item>
			<title>.sql file loses characters</title>
			<link>http://www.daniweb.com/forums/thread236299.html</link>
			<pubDate>Thu, 05 Nov 2009 15:13:22 GMT</pubDate>
			<description><![CDATA[Hello 
New member and pretty ignorant about SQL I should say. 
I have made regular backups of mySQL database and now that I need to restore it* I see all the characters (UTF-8) characters have changed to wierd characters *that make no sense at all.   
I am using *phpMyAdmin's Export tool *which...]]></description>
			<content:encoded><![CDATA[<div>Hello<br />
New member and pretty ignorant about SQL I should say.<br />
I have made regular backups of mySQL database and now that I need to restore it<span style="font-weight:bold"> I see all the characters (UTF-8) characters have changed to wierd characters </span>that make no sense at all.  <br />
I am using <span style="font-weight:bold">phpMyAdmin's Export tool </span>which generates a .sql file.  But I see no option while saving this file to select UTF-8 or ASCII.<br />
<br />
<span style="font-weight:bold"><span style="color:Green"><span style="color:green">2 questions:<br />
1. HOw can I restore my backup file into proper characers?<br />
2.what can I do in future to avoid this problem and save the .sql file as UTF-8.</span></span></span><br />
Greatly appreciate your attention<br />
L</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Logical1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236299.html</guid>
		</item>
		<item>
			<title>exclude</title>
			<link>http://www.daniweb.com/forums/thread236270.html</link>
			<pubDate>Thu, 05 Nov 2009 13:18:11 GMT</pubDate>
			<description><![CDATA[hi 
 
i have two tables, one is products, the other is for 'discounts' on those products... when adding a new 'discount' i want to avoid adding two discounts to a single product... so i was looking for some sort of Right Join which would exclude all products which have a match in the discount...]]></description>
			<content:encoded><![CDATA[<div>hi<br />
<br />
i have two tables, one is products, the other is for 'discounts' on those products... when adding a new 'discount' i want to avoid adding two discounts to a single product... so i was looking for some sort of Right Join which would exclude all products which have a match in the discount table?!<br />
<br />
Ill be using a 'select' to choose a product to add a discount to... the query needs to output all product name without a corresponding discount entry...<br />
<br />
any ideas?<br />
<br />
lworks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>lifeworks</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236270.html</guid>
		</item>
		<item>
			<title>strong sa password error</title>
			<link>http://www.daniweb.com/forums/thread236119.html</link>
			<pubDate>Thu, 05 Nov 2009 02:52:06 GMT</pubDate>
			<description><![CDATA[hello 
i m using a library management software for which i need sql server 
while installing ms sql 2005 at one point installer gives me this message and throw me out. the message is " To continue, you must provide a strong sa password. To review strong password requirements, click Help on the...]]></description>
			<content:encoded><![CDATA[<div>hello<br />
i m using a library management software for which i need sql server<br />
while installing ms sql 2005 at one point installer gives me this message and throw me out. the message is &quot; To continue, you must provide a strong sa password. To review strong password requirements, click Help on the Authentication Mode page.<br />
<br />
For help, click: http://go.microsoft.com/fwlink?LinkID=20476&amp;ProdName=Microsoft+SQL+Server&amp;ProdVer=9.00.4035.00&amp;EvtSrc=setup.rll&amp;EvtID=SQLSetup90&amp;EvtType=28000&quot;<br />
i cannot complete the installation even after giving various passwords<br />
<br />
pl help me<br />
<br />
thanx in advance</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>bmanish</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236119.html</guid>
		</item>
		<item>
			<title>What does mysql return when the selection doesnt exist?</title>
			<link>http://www.daniweb.com/forums/thread236046.html</link>
			<pubDate>Wed, 04 Nov 2009 19:51:03 GMT</pubDate>
			<description><![CDATA[Ok so what does mysql return when the select query doesnt exist. So say I query the database: SELECT username FROM user WHERE username='test' AND password='test' 
 
Ok so say test doesnt exist what will the database return because i code in java and have made a method that should return true or...]]></description>
			<content:encoded><![CDATA[<div>Ok so what does mysql return when the select query doesnt exist. So say I query the database: SELECT username FROM user WHERE username='test' AND password='test'<br />
<br />
Ok so say test doesnt exist what will the database return because i code in java and have made a method that should return true or false. True if the the thing exists in the query and false if it doesnt. But for some reason it always returns true. It turns out because mysql returns something each time.<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jakx12</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread236046.html</guid>
		</item>
		<item>
			<title>Get records from current year</title>
			<link>http://www.daniweb.com/forums/thread235940.html</link>
			<pubDate>Wed, 04 Nov 2009 11:33:05 GMT</pubDate>
			<description>Dear SQL sharks.... 
 
Please somebody help me with this struggle. I have been searching the web for hours now. 
 
I have a table with sales data. In this table i have a columne called SalesAmount, CustomerName and SalesDate(the format i smalldatetime) 
 
Now I would like to retreive all the...</description>
			<content:encoded><![CDATA[<div>Dear SQL sharks....<br />
<br />
Please somebody help me with this struggle. I have been searching the web for hours now.<br />
<br />
I have a table with sales data. In this table i have a columne called SalesAmount, CustomerName and SalesDate(the format i smalldatetime)<br />
<br />
Now I would like to retreive all the records where SalesDate is within current year...How do I do this??<br />
I want to make a sum of this years sales numbers and when i pass newsyear it should start from zero again.<br />
<br />
I really hope somebody can help me!!<br />
<br />
Kristian</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>21KristianN</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235940.html</guid>
		</item>
		<item>
			<title>how to get back my database with damaged wamp server??</title>
			<link>http://www.daniweb.com/forums/thread235883.html</link>
			<pubDate>Wed, 04 Nov 2009 07:40:26 GMT</pubDate>
			<description><![CDATA["My wamp server got damaged recently and i had no backup for my databases. I had reinstalled the wamp server and replaced the bin/mysql/data folder to the new one but I only get the database and not the tables inside it. I need help!!!!!!!! ";]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">&quot;My wamp server got damaged recently and i had no backup for my databases. I had reinstalled the wamp server and replaced the bin/mysql/data folder to the new one but I only get the database and not the tables inside it. I need help!!!!!!!! &quot;;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>sfsrocky</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235883.html</guid>
		</item>
		<item>
			<title>Remove last chars</title>
			<link>http://www.daniweb.com/forums/thread235757.html</link>
			<pubDate>Tue, 03 Nov 2009 20:40:37 GMT</pubDate>
			<description><![CDATA[Hello all, i would like to know how it is possible to remove for example last 20 characters, or by specifing the string to remove. 
For example i have 2 rows (in reality there are more than 100, thats why im not working it out by hand) with the next content: 
insert into abc (1,"hello...]]></description>
			<content:encoded><![CDATA[<div>Hello all, i would like to know how it is possible to remove for example last 20 characters, or by specifing the string to remove.<br />
For example i have 2 rows (in reality there are more than 100, thats why im not working it out by hand) with the next content:<br />
insert into abc (1,&quot;hello &lt;b&gt;b&lt;/b&gt;lol&quot;);<br />
insert into abc(2,&quot;bye &lt;b&gt;a&lt;/b&gt;lol&quot;);<br />
i would like to remove 3 last characters or the string &quot;lol&quot;.<br />
Thanks in advance.<br />
Have a good day.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jen140</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235757.html</guid>
		</item>
		<item>
			<title>SQL help</title>
			<link>http://www.daniweb.com/forums/thread235706.html</link>
			<pubDate>Tue, 03 Nov 2009 17:15:59 GMT</pubDate>
			<description><![CDATA[I have tried several different things with none providing the correct results.  Any help is appreciated.   
 
I have the following: 
Table A         Table B 
Pallet_No     Pallet_No 
Qty              Qty 
 
I need to return: 
- All of the Pallet_No's from Table A that are not in Table B 
- All of...]]></description>
			<content:encoded><![CDATA[<div>I have tried several different things with none providing the correct results.  Any help is appreciated.  <br />
<br />
I have the following:<br />
Table A         Table B<br />
Pallet_No     Pallet_No<br />
Qty              Qty<br />
<br />
I need to return:<br />
- All of the Pallet_No's from Table A that are not in Table B<br />
- All of the Pallet_No's from Table B that are not in Table A<br />
- All the Pallet_No's where there is a difference in Qty b/w Table A and Table B.<br />
<br />
Thanks for your help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>cjmartin</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235706.html</guid>
		</item>
		<item>
			<title>Application of Database Recovery System</title>
			<link>http://www.daniweb.com/forums/thread235667.html</link>
			<pubDate>Tue, 03 Nov 2009 13:43:46 GMT</pubDate>
			<description><![CDATA[I've got an assignment about database recovery system. I need to find an organization/enterprise and figure out its recovery system. I ask for help from someone who ever made or knew database recovery system applied by an organization/enterprise. Please share me some details. 
 
Thank you. 
 
Best...]]></description>
			<content:encoded><![CDATA[<div>I've got an assignment about database recovery system. I need to find an organization/enterprise and figure out its recovery system. I ask for help from someone who ever made or knew database recovery system applied by an organization/enterprise. Please share me some details.<br />
<br />
Thank you.<br />
<br />
Best regards,</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>Arcaiz</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235667.html</guid>
		</item>
		<item>
			<title>SSIS Variable is Empty</title>
			<link>http://www.daniweb.com/forums/thread235662.html</link>
			<pubDate>Tue, 03 Nov 2009 13:24:03 GMT</pubDate>
			<description>Good Day all 
 
i have created a Global Variable as depicted in the following Pic 
 
http://www.tiyaneproperties.co.za/SSIS/pic1.JPG 
 
The Following Screen-shot shows how i created my Variable and its Properties 
 
http://www.tiyaneproperties.co.za/SSIS/pic2.JPG 
...</description>
			<content:encoded><![CDATA[<div>Good Day all<br />
<br />
i have created a Global Variable as depicted in the following Pic<br />
<br />
<a rel="nofollow" class="t" href="http://www.tiyaneproperties.co.za/SSIS/pic1.JPG" target="_blank">http://www.tiyaneproperties.co.za/SSIS/pic1.JPG</a><br />
<br />
The Following Screen-shot shows how i created my Variable and its Properties<br />
<br />
<a rel="nofollow" class="t" href="http://www.tiyaneproperties.co.za/SSIS/pic2.JPG" target="_blank">http://www.tiyaneproperties.co.za/SSIS/pic2.JPG<br />
</a><br />
<br />
and the Following Screen-shot shows the Script Editor Properties<br />
<a rel="nofollow" class="t" href="http://www.tiyaneproperties.co.za/SSIS/pic3.JPG" target="_blank"><br />
http://www.tiyaneproperties.co.za/SSIS/pic3.JPG</a><br />
<br />
and the Last pic is the code that write to the XML File<br />
<br />
<a rel="nofollow" class="t" href="http://www.tiyaneproperties.co.za/SSIS/pic4.JPG" target="_blank">http://www.tiyaneproperties.co.za/SSIS/pic4.JPG</a><br />
<br />
The Variable comes back empty and at the end the file comes back empty. So i added a if statement as you can see to make sure that the part that write to the file has no problems.<br />
<br />
Thank you</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>vuyiswamb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235662.html</guid>
		</item>
		<item>
			<title>How to store a big database</title>
			<link>http://www.daniweb.com/forums/thread235639.html</link>
			<pubDate>Tue, 03 Nov 2009 11:38:18 GMT</pubDate>
			<description><![CDATA[Hi and I have been working on a project involving a rather large database. My question is "For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the database containing the...]]></description>
			<content:encoded><![CDATA[<div>Hi and I have been working on a project involving a rather large database. My question is &quot;For a database with over 20529860 rows, is it better to have 3330 tables spreaded equally or to split into multiple databases or would it be better to have 49950 tables in the database containing the information?&quot; The reason I ask is that having all those rows in the one table makes it really slow with the Where clause and I'm not sure which way is the best way to design this database with mysql. I found that anything over 15MB in one table takes too long to lookup so if I had to guess I would spread it over the 49950 tables ((255-33)*15*15) but sounds like a ridiculous number of tables to store the one set of data. <span style="font-weight:bold">So does anybody have any ideas on how to store potentially 1,000,000,000 rows in mysql.</span> Each row only contains a few bytes. Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>cwarn23</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235639.html</guid>
		</item>
		<item>
			<title>Integer or Numeric</title>
			<link>http://www.daniweb.com/forums/thread235596.html</link>
			<pubDate>Tue, 03 Nov 2009 09:18:15 GMT</pubDate>
			<description><![CDATA[Hi, 
I've imported a Visual FoxPro database to MS SQL Server 2008 and had a couple of queries; 
The VFP tables used Numeric(5,0) for the Index fields, but I'm thinking of converting them to Integers in SQL Server. Is there any issues I should be aware of? A co-worker keeps telling me that Integers...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
I've imported a Visual FoxPro database to MS SQL Server 2008 and had a couple of queries;<br />
The VFP tables used Numeric(5,0) for the Index fields, but I'm thinking of converting them to Integers in SQL Server. Is there any issues I should be aware of? A co-worker keeps telling me that Integers are &quot;slower&quot; to search on, which I find a bit hard to believe. I always thought that you would you use Numerics for data that requires precision, such as financial data and Integers for counters whole number id's and so on. Am I wrong or missing something?<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Wenners</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235596.html</guid>
		</item>
		<item>
			<title>insert date</title>
			<link>http://www.daniweb.com/forums/thread235554.html</link>
			<pubDate>Tue, 03 Nov 2009 04:31:46 GMT</pubDate>
			<description>how to insert system current date by using sql query in  SQL SERVER 2005</description>
			<content:encoded><![CDATA[<div>how to insert system current date by using sql query in  SQL SERVER 2005</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>pavankotturi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235554.html</guid>
		</item>
		<item>
			<title>Extract table statistics DDL</title>
			<link>http://www.daniweb.com/forums/thread235483.html</link>
			<pubDate>Mon, 02 Nov 2009 21:58:37 GMT</pubDate>
			<description><![CDATA[Hello everyone, 
 
I searched extensively but was unable to find a solution to this problem. I'm attempting to generate the CREATE STATISTICS statement that was used to create an already existing statistics in an MSSQL db from its name or the table's name. I'm able to obtain the columns and the...]]></description>
			<content:encoded><![CDATA[<div>Hello everyone,<br />
<br />
I searched extensively but was unable to find a solution to this problem. I'm attempting to generate the CREATE STATISTICS statement that was used to create an already existing statistics in an MSSQL db from its name or the table's name. I'm able to obtain the columns and the filter definition, but I cannot find anywhere that specifies the &quot;FULLSCAN&quot;, &quot;SAMPLE&quot; and &quot;STATS_STREAM&quot; WITH options. I am querying the sys.stats and sys.stats_columns.<br />
<br />
Please help me out with this! Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>vkubushyn</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235483.html</guid>
		</item>
		<item>
			<title>Union identical tables in one view</title>
			<link>http://www.daniweb.com/forums/thread235451.html</link>
			<pubDate>Mon, 02 Nov 2009 19:43:47 GMT</pubDate>
			<description>Hello all, 
 
my first post. 
 
I have identical tables in my db. Is there a way to create a view with dynamic query to combine/union all the identical tables into one view? 
 
dbo.table.x-1 
dbo.table.x-2 
dbo.table.x-3 
dbo.table.x-{n}</description>
			<content:encoded><![CDATA[<div>Hello all,<br />
<br />
my first post.<br />
<br />
I have identical tables in my db. Is there a way to create a view with dynamic query to combine/union all the identical tables into one view?<br />
<br />
dbo.table.x-1<br />
dbo.table.x-2<br />
dbo.table.x-3<br />
dbo.table.x-{n}</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>elauri</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235451.html</guid>
		</item>
		<item>
			<title>dbms</title>
			<link>http://www.daniweb.com/forums/thread235406.html</link>
			<pubDate>Mon, 02 Nov 2009 16:39:53 GMT</pubDate>
			<description>Hi, 
     i m simran,a be student of cs .i want to make a project an minor project on any topic.plz help me 
plz rep quikly. 
Thank you.</description>
			<content:encoded><![CDATA[<div>Hi,<br />
     i m simran,a be student of cs .i want to make a project an minor project on any topic.plz help me<br />
plz rep quikly.<br />
Thank you.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>pritesh007</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235406.html</guid>
		</item>
		<item>
			<title>SSRS delete blank rows</title>
			<link>http://www.daniweb.com/forums/thread235365.html</link>
			<pubDate>Mon, 02 Nov 2009 14:30:05 GMT</pubDate>
			<description>i am using SSRS 2005. In my dataset there are some blank rows and in SSRS is showing blank rows. Is there a way that i just show rows with data and ignore blank rows. i set the visibility property but it is showing blank line. 
 
dataset: 
 
a 
b 
c 
blank 
d 
blank</description>
			<content:encoded><![CDATA[<div>i am using SSRS 2005. In my dataset there are some blank rows and in SSRS is showing blank rows. Is there a way that i just show rows with data and ignore blank rows. i set the visibility property but it is showing blank line.<br />
<br />
dataset:<br />
<br />
a<br />
b<br />
c<br />
blank<br />
d<br />
blank<br />
blank<br />
e<br />
<br />
i want output like:<br />
<br />
a<br />
b<br />
c<br />
d<br />
e<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>azamsalam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235365.html</guid>
		</item>
		<item>
			<title>SQL statement for easier db a search</title>
			<link>http://www.daniweb.com/forums/thread235346.html</link>
			<pubDate>Mon, 02 Nov 2009 13:04:12 GMT</pubDate>
			<description>Hi. 
I have a web application whereby I perform  a search through 4 fields, namely:book serial no.,tel no.,gender and publishing date.In my jsp page variables picking the values respectively are:serial,tel,gender and datez.These are submitted to the java class.Currently, I perform my searches as...</description>
			<content:encoded><![CDATA[<div>Hi.<br />
I have a web application whereby I perform  a search through 4 fields, namely:book serial no.,tel no.,gender and publishing date.In my jsp page variables picking the values respectively are:serial,tel,gender and datez.These are submitted to the java class.Currently, I perform my searches as follows(in java class):<br />
/***********************************************/<br />
 <pre style="margin:20px; line-height:13px">//......after connecting to db and all that<br />
<br />
<br />
if(serial.equals(&quot;&quot;) )<br />
&nbsp;{<br />
&nbsp;if(!tel.equals(&quot;&quot;) )//<br />
&nbsp;{<br />
&nbsp; &nbsp; query = &quot;SELECT * FROM tbooks WHERE tbooks.tel=' &quot;+tel+&quot; ' &quot;;<br />
&nbsp;}<br />
&nbsp; else if(gender.equals(&quot;&quot;))<br />
&nbsp;{<br />
&nbsp;  query = &quot;SELECT * FROM tbooks WHERE tbooks.gender=' &quot;+gender+&quot; ' &quot;;<br />
&nbsp;}<br />
&nbsp; &nbsp; &nbsp; }//end if<br />
else if (!serial.equals(&quot;&quot;))<br />
{<br />
query = &quot;SELECT * FROM tbooks WHERE tbooks.serial=' &quot;+serial+&quot; ' &quot;;<br />
}<br />
<br />
//query is the statement to be executed later as&nbsp; <br />
//ResultSet rs = statement.executeQuery(query);<br />
// more code goes here.......</pre>/********************************************/<br />
The main question here is, Is there an SQL statement that works well in place of my nested if statements? (i.e if serial no is present ,tel is absent, gender is present and date is absent, then it brings results considering the present values only)....Kind of bringing results of .. <pre style="margin:20px; line-height:13px">SELECT * FROM tbooks WHERE serial = ' &quot;+serial+&quot; ' AND tel= ' &quot;+tel+&quot; ' AND gender= ' &quot;+gender+&quot; ' AND datez= ' &quot;+datez+&quot; '</pre>....even if one variable is null it considers only the non-empty variables.Thank you so much in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>dangari</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235346.html</guid>
		</item>
		<item>
			<title>SET datatype</title>
			<link>http://www.daniweb.com/forums/thread235319.html</link>
			<pubDate>Mon, 02 Nov 2009 10:45:47 GMT</pubDate>
			<description>hey.. 
 
i have a table with one column defined as SET 
somethin like (a,b,c) 
 
does anybody know the sql query to be run inorder to get elements like 
a 
b 
c  
all seperately so as to save it in an array in php script..??</description>
			<content:encoded><![CDATA[<div>hey..<br />
<br />
i have a table with one column defined as SET<br />
somethin like (a,b,c)<br />
<br />
does anybody know the sql query to be run inorder to get elements like<br />
a<br />
b<br />
c <br />
all seperately so as to save it in an array in php script..??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jyotidagia</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235319.html</guid>
		</item>
		<item>
			<title>Help BCP The Following Query</title>
			<link>http://www.daniweb.com/forums/thread235317.html</link>
			<pubDate>Mon, 02 Nov 2009 10:34:19 GMT</pubDate>
			<description><![CDATA[Good Day All  
 
I have the Following Query  
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code...]]></description>
			<content:encoded><![CDATA[<div>Good Day All <br />
<br />
I have the Following Query <br />
 <pre style="margin:20px; line-height:13px">DECLARE @CurrentTime DATETIME<br />
SET @CurrentTime = CURRENT_TIMESTAMP<br />
select tr.Descr [Room], tb.Purpose [Purpose], tb.Description [Description],<br />
convert(varchar,datepart(hour,tb.starttime))+':'+convert(varchar,datepart(minute,tb.starttime)) [Start Time],<br />
convert(varchar,datepart(hour,tb.endtime))+':'+convert(varchar,datepart(minute,tb.endtime)) [End Time],<br />
tu.name [Requested by] from tbl_booking tb inner join tbl_resource tr<br />
on tb.resources = tr.id<br />
inner join tbl_user tu on tu.id = tb.RequestedByUser<br />
where (day(startdate) = day(@CurrentTime))and(month(startdate)=month(@CurrentTime))and(year(startdate)=year(@CurrentTime))and(tb.status=1)<br />
order by [Room],[Start Time]<br />
for xml raw</pre><br />
This creates an XML, but now i want to store it in <br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  C:\X.XML  <hr /> </td> </tr> </table> </div>how can i BCP this Query <br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>vuyiswamb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235317.html</guid>
		</item>
		<item>
			<title>SQL question releated to group by</title>
			<link>http://www.daniweb.com/forums/thread235316.html</link>
			<pubDate>Mon, 02 Nov 2009 10:32:49 GMT</pubDate>
			<description>Hi, 
 
I hope someone can help me creating a sql for the purpose i have. 
 
I have a table named case_score_t with these columns: 
id, case_id, user_id, score, created_date 
 
I am interested in picking the rows with the greatest created_date, for a certain user_id. 
 
I now this SQL with give me...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I hope someone can help me creating a sql for the purpose i have.<br />
<br />
I have a table named case_score_t with these columns:<br />
id, case_id, user_id, score, created_date<br />
<br />
I am interested in picking the rows with the greatest created_date, for a certain user_id.<br />
<br />
I now this SQL with give me the result:<br />
 <pre style="margin:20px; line-height:13px">SELECT *, max(created) FROM case_score_t cs WHERE cs.user_id = 1449 GROUP BY cs.case_id;</pre><br />
The problem is that i have is that i get an extra column, the max(created) column back.<br />
<br />
Is there anyway to do the same query(maybe with subselect's or something), without getting the extra column.<br />
<br />
So basically i want something like:  <pre style="margin:20px; line-height:13px">SELECt * FROM ......</pre>and is should return the same result.<br />
<br />
Thanks in advance.<br />
Cemils</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Cemils</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235316.html</guid>
		</item>
		<item>
			<title>Student ID</title>
			<link>http://www.daniweb.com/forums/thread235230.html</link>
			<pubDate>Mon, 02 Nov 2009 03:26:21 GMT</pubDate>
			<description><![CDATA[Unrecognized database format <Faculty of Science>. (Error 3343)]]></description>
			<content:encoded><![CDATA[<div>Unrecognized database format &lt;Faculty of Science&gt;. (Error 3343)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum128.html">MS Access and FileMaker Pro</category>
			<dc:creator>rabicu</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235230.html</guid>
		</item>
		<item>
			<title>syntax query for backup database for one month in sql server 2000</title>
			<link>http://www.daniweb.com/forums/thread235205.html</link>
			<pubDate>Mon, 02 Nov 2009 01:55:25 GMT</pubDate>
			<description><![CDATA[hi, 
 
how the way backup database in sql server 2000 with syntax sql for one month, i mean query. Thank's]]></description>
			<content:encoded><![CDATA[<div>hi,<br />
<br />
how the way backup database in sql server 2000 with syntax sql for one month, i mean query. Thank's</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>hery</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235205.html</guid>
		</item>
		<item>
			<title>Stored Procedures Help please</title>
			<link>http://www.daniweb.com/forums/thread235024.html</link>
			<pubDate>Sun, 01 Nov 2009 06:12:57 GMT</pubDate>
			<description>I have made stored procedures in Oracle...but need to export them to mysql. I have searched on google but cant figure out the syntax. 
 
Here is the oracle procedure: 
 
 
create or replace procedure delgroup 
(g_id in number) 
 
is</description>
			<content:encoded><![CDATA[<div>I have made stored procedures in Oracle...but need to export them to mysql. I have searched on google but cant figure out the syntax.<br />
<br />
Here is the oracle procedure:<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">create or replace procedure delgroup<br />
(g_id in number)<br />
<br />
is<br />
<br />
begin<br />
<br />
DELETE FROM grouptable WHERE GROUP_ID=g_id;<br />
<br />
commit;<br />
end;</pre><br />
<br />
I jus basically want to delete the group from the group table..depending on which group id (the arguement) the user types in.<br />
<br />
How would i do this exact same procedure in mysql?<br />
<br />
Please some assistance guys :)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>badmanmc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread235024.html</guid>
		</item>
		<item>
			<title>Stored Procedure with Increments</title>
			<link>http://www.daniweb.com/forums/thread234691.html</link>
			<pubDate>Fri, 30 Oct 2009 13:44:53 GMT</pubDate>
			<description>I need some help I have managed to get this far (as below), from thatI can put a AAA_NUMBER and be able to get that record details and thats the 1st step that I wanted the 2nd step that I want is say if the DOCID is not available I then need the system to generate a new number (the tricky bit for...</description>
			<content:encoded><![CDATA[<div>I need some help I have managed to get this far (as below), from thatI can put a AAA_NUMBER and be able to get that record details and thats the 1st step that I wanted the 2nd step that I want is say if the DOCID is not available I then need the system to generate a new number (the tricky bit for me now is to have it do the increment since I want the system to 1st look at the current year since each and every year has a different sequence) so the YEAR_SEQUENCE table has CURRENT_YEAR, SEQUENCE, LAST_NUM Fields so it will be incrementing from the last generated number (+1 increment)<br />
<br />
Any suggestions or twicks are welcome!<br />
<br />
 <pre style="margin:20px; line-height:13px">CREATE PROCEDURE Sp_Show_Presc_Num<br />
<br />
@AAA_NUMBER VARCHAR(7) <br />
<br />
AS <br />
<br />
SELECT<br />
&lt;TABLE A&gt;.Surname,<br />
&lt;TABLE A&gt;.Initials,<br />
&lt;TABLE A&gt;.AAA_NUMBER,<br />
&lt;TABLE B&gt;.DOCID,<br />
CONVERT(VARCHAR (10),&lt;TABLE B&gt;.ALLOCATIONDATE,103) AS ALLOCATIONDATE,<br />
&lt;TABLE A&gt;.Sex_Code<br />
FROM &lt;TABLE A&gt;<br />
LEFT JOIN &lt;TABLE B&gt; ON &lt;TABLE B&gt;.BBBNUMBER = &lt;TABLE A&gt;.AAA_NUMBER<br />
WHERE AAA_NUMBER=@AAA_NUMBER</pre><br />
EXECUTION EXAMPLE<br />
---------------------------------------------------------------------USE [TEST DB] <br />
EXEC [Sp_Show_Presc_Num] '4300058'<br />
--------------------------------------------------------------------- <br />
<br />
<span style="font-weight:bold">MORE INFO</span><br />
Some of the them are populated and the DocID should be displayed if available or else if its NULL then there should be an option for the user to have one generated<br />
<br />
The are 3 table<br />
&lt;TABLE A&gt; which will display these fields(Surname, Initials, AAA_NUMBER)<br />
&lt;TABLE B&gt; which will display these fields(DOCID,ALLOCATIONDATE)<br />
&lt;TABLE C&gt; which has these fields (@ the moment)(CURRENT_YEAR, SEQUENCE, LAST_NUM)<br />
<br />
the ALLOCATIONDATE is populated when the DOCID is generated so its on that day</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>wchitamb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234691.html</guid>
		</item>
		<item>
			<title>php mysql</title>
			<link>http://www.daniweb.com/forums/thread234662.html</link>
			<pubDate>Fri, 30 Oct 2009 10:52:05 GMT</pubDate>
			<description><![CDATA[could someone point out the error in the followin php/mysql code 
 
$strSearchVal = $_GET['q']; 
//database connection.. 
//... 
 
$strSQL = "SELECT DISTINCT area FROM hospital where area like '%'+ $strSearchVal; "; 
$result = mysql_query($strSQL); 
 
while ($arrThisRow = mysql_fetch_array($result...]]></description>
			<content:encoded><![CDATA[<div>could someone point out the error in the followin php/mysql code<br />
<br />
 <pre style="margin:20px; line-height:13px">$strSearchVal = $_GET&#91;'q'&#93;;<br />
//database connection..<br />
//...<br />
<br />
$strSQL = &quot;SELECT DISTINCT area FROM hospital where area like '%'+ $strSearchVal; &quot;;<br />
$result = mysql_query($strSQL);<br />
<br />
while ($arrThisRow = mysql_fetch_array($result )) {<br />
&nbsp;echo '&lt;li&gt;' . $arrThisRow&#91;'area'&#93; . '&lt;/li&gt;';</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jyotidagia</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234662.html</guid>
		</item>
		<item>
			<title>ERD help!</title>
			<link>http://www.daniweb.com/forums/thread234639.html</link>
			<pubDate>Fri, 30 Oct 2009 09:31:42 GMT</pubDate>
			<description><![CDATA[I have to make an ERD diagram using this scenario case and I'm not sure if I have all the required tables/fields in my ERD. Is my entities normalized up to 3NF? Are the relationships correct? 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I have to make an ERD diagram using this scenario case and I'm not sure if I have all the required tables/fields in my ERD. Is my entities normalized up to 3NF? Are the relationships correct?<br />
 <pre style="margin:20px; line-height:13px"><br />
Background<br />
<br />
The Brisbane Driving School was established in Brisbane in 1992. Since then, the School has grown steadily and now has several offices in most of the main suburbs of Brisbane. However, the School is now so large that more and more administrative staff members are being employed to cope with the ever-increasing amount of paperwork. Furthermore, the communication and sharing of information between offices is poor. The Director of the School, Dave Darcy, feels that too many mistakes are being made and that the success of the School will be short-lived if he does not do something to remedy the situation. He knows that a database could help in part to solve the problem and has approached you to help in creating a database system to support the run­ning of the Brisbane Driving School. The Director has provided the following brief description of how the Brisbane Driving School operates.<br />
<br />
The company has now employed over 120 staff. Around 100 of them are driving instructors.&nbsp; Over the years BDS has accumulated over 4000 customers. Around 100,000 lessons have been delivered and around 5000 driving tests arranged.<br />
<br />
How the company operates<br />
<br />
Each office has a Manager (who tends to also be a Senior Instructor), several Senior Instructors, Instructors, and administrative staff. All instructors should possess a valid Queensland Instructor licence. The Manager is responsible for the day-to-day running of the office. Clients must first register at an office and this requires that they complete an application form, which records their personal details. Before the first lesson, a client is requested to attend an interview with an Instructor to assess the needs of the client and to ensure that the client holds a valid provisional driving license. A client is free to ask for a particular Instructor or to request that an Instructor be changed at any stage throughout the process of learning to drive. After the interview, a driving course is agreed and the first lesson is booked. A client may request individual lessons or book a block of lessons for a reduced fee. An individual lesson is for one hour, which begins and ends at the office. A lesson is with a particular Instructor in a particular car at a given time. Lessons can start as early as 8am and as late as 8pm. After each lesson, the Instructor records the progress made by the client and notes the mileage used during the lesson. The School has a pool of cars, which are adapted for the purposes of teaching. Each Instructor is allocated to a particular car. As well as teaching, the Instructors are free to use the cars for personal use. The cars are inspected at regular intervals for faults. Once ready, a client applies for a driving test date. The school will arrange to make the booking. To obtain a driving license the client must pass the road test. It is the responsibility of the Instructor to ensure that the client is best prepared for the test. The Instructor is not responsible for testing the client and is not in the car during the test but should be available to drop off and pick up the client before and after the test at the Driving Test Centre. If a client fails to pass, the Instructor must record the reasons for the failure.<br />
<br />
In this case study you have to design a database that incorporates all the above information and records, and design a user-friendly user interface for data entry staff and driving instructors to update information. Driving instructors are allowed to access and update data for those lessons and driving tests under his/her own name. They are allowed to see their learners’ details but not allow to change make any changes.&nbsp; The data entry staff and the branch manager can see all data and have all rights.</pre><br />
Here's  a screenshot of the ERD diagram <a rel="nofollow" class="t" href="http://www.lovelyanime.com/erd.gif" target="_blank">http://www.lovelyanime.com/erd.gif</a></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>MuffinKun</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234639.html</guid>
		</item>
		<item>
			<title>Pls Guide me in creating data base</title>
			<link>http://www.daniweb.com/forums/thread234617.html</link>
			<pubDate>Fri, 30 Oct 2009 08:01:34 GMT</pubDate>
			<description>I want to create a data base so that i can keep record of individuals and search their record easily 
 
Students under go different personality tests and checked by three different teachers of differnt departments. After their test these three teachers sit in a meeting to discuss each student in...</description>
			<content:encoded><![CDATA[<div>I want to create a data base so that i can keep record of individuals and search their record easily<br />
<br />
Students under go different personality tests and checked by three different teachers of differnt departments. After their test these three teachers sit in a meeting to discuss each student in their field. the results have been then compiled based on their grades.<br />
<br />
it is a continuous process, so we make batch of some students and each batch has a alphabatical identity for example &quot;ABCD&quot; and each student is allloted with a number e.g &quot;1 - 10&quot; if a group comprises of 10 students. Now each teacher checks him and gives him grades separately. The grades are in alphabets like  A1, A2, A3, B1, B2, B3, C1, c2, c3, d1, d2, d3, e1, e2, e3. After meeting they decide in which grade he should be placed.<br />
<br />
so i want a data base in which the batch identity and number should be his identity, name of student, grade given by each teacher along with teacher names and over all grade for that batch, commencing date , end date, their intelligence and mechanical test grade (in numerics), Group position (in numerics), and their quiz test number.<br />
<br />
so i can search by batch number, whole group should be displayed, by name, by individual grade, over all grade, teacher name, grp position, intelligence, mechanical grades<br />
<br />
can any body help and guide me inmaking this type of data base,</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum128.html">MS Access and FileMaker Pro</category>
			<dc:creator>Babu sab</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234617.html</guid>
		</item>
		<item>
			<title>MySQL Query - Searching for multiple keywords</title>
			<link>http://www.daniweb.com/forums/thread234601.html</link>
			<pubDate>Fri, 30 Oct 2009 05:52:01 GMT</pubDate>
			<description>Hello, 
 
I have a two tables created to apply keywords to a given entry: 
 
Table:  File 
FileID (int, pk, auto incr) 
Name (varchar) 
 
Table File_Keyword 
KeywordID (int, pk, auto incr)</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I have a two tables created to apply keywords to a given entry:<br />
<br />
Table:  File<br />
FileID (int, pk, auto incr)<br />
Name (varchar)<br />
<br />
Table File_Keyword<br />
KeywordID (int, pk, auto incr)<br />
FileID (fk)<br />
Keyword (varchar)<br />
<br />
<br />
Given that I have a record in table File with 2 corresponding records in table File_Keyword assigning keywords &quot;ABC&quot; and &quot;XYZ&quot; to the given FileID.<br />
<br />
What is a simple sql query to only return results if both strings are matched:<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT file.FileID WHERE file.FileID=file_keyword.FileID AND (file_keyword.Keyword LIKE '%ABC%' AND file_keyword.Keyword LIKE '%XYZ%');</pre><br />
<br />
Any assistance would be appreciated.<br />
<br />
Thank you in advance.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>aptitudedude</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234601.html</guid>
		</item>
		<item>
			<title>foreach tutorial</title>
			<link>http://www.daniweb.com/forums/thread234523.html</link>
			<pubDate>Thu, 29 Oct 2009 20:39:18 GMT</pubDate>
			<description><![CDATA[I have be struggling to turn the below while loop into a foreach loop with no result, so I am asking for help here on how to do this. 
   <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>I have be struggling to turn the below while loop into a foreach loop with no result, so I am asking for help here on how to do this.<br />
  <pre style="margin:20px; line-height:13px">$query = &quot;Select * from TIME_TABLE Where<br />
Extract(month from DATE_FIELD ) = DATE_FORMAT(NOW(), '%c')<br />
and<br />
Extract(day from DATE_FIELD ) = DATE_FORMAT(NOW(), '%e')<br />
order by DATE_FIELD, DESCRIPTION&quot;;<br />
$result = $mysqli-&gt;query($query);<br />
<br />
while ($row = $result-&gt;fetch_array(MYSQLI_ASSOC)) {<br />
&nbsp; &nbsp; $dbItems .=&nbsp; &quot;&lt;item&gt; &lt;record_num&gt;&quot; . $row['RECORD_NUM'] . &quot;&lt;/record_num&gt;&quot; .<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;date_field&gt;&quot; .&nbsp;  $row['DATE_FIELD'] . &quot;&lt;/date_field&gt;&quot; .<br />
&nbsp; &nbsp; &nbsp; &nbsp; &quot;&lt;description&gt;&quot; .&nbsp; $row['DESCRIPTION'] . &quot;&lt;/description&gt; &lt;/item&gt;&quot;;<br />
}</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rouse</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234523.html</guid>
		</item>
		<item>
			<title>My homework</title>
			<link>http://www.daniweb.com/forums/thread234465.html</link>
			<pubDate>Thu, 29 Oct 2009 14:54:02 GMT</pubDate>
			<description>i am trying to design a hotel maintenance database that keep the maintenance of the hotel.,can someone think of the entities i should use for that?need it as soon as possible.....thanks</description>
			<content:encoded><![CDATA[<div>i am trying to design a hotel maintenance database that keep the maintenance of the hotel.,can someone think of the entities i should use for that?need it as soon as possible.....thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>didie_rock</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234465.html</guid>
		</item>
		<item>
			<title>SQL to return two of each value from table?</title>
			<link>http://www.daniweb.com/forums/thread234440.html</link>
			<pubDate>Thu, 29 Oct 2009 14:20:11 GMT</pubDate>
			<description><![CDATA[Hi everyone, 
 
I sat down to create a what I thought was simple SQL query but once I got thinking about it I realised I'm not sure where to start. 
 
The objective is to return two resorts from a Resorts table for each country code in that table.  
 
Countries table - Lists all countries 
Resorts...]]></description>
			<content:encoded><![CDATA[<div>Hi everyone,<br />
<br />
I sat down to create a what I thought was simple SQL query but once I got thinking about it I realised I'm not sure where to start.<br />
<br />
The objective is to return two resorts from a Resorts table for each country code in that table. <br />
<br />
Countries table - Lists all countries<br />
Resorts table - Lists resorts and what country code they have which links them to the Countries table.<br />
<br />
I've included a screenshot of what data is in the Resorts table. Basically I just need the two resort names from each country code. The other data can be ignored as it's just airport codes etc.<br />
 <br />
<br />
Any ideas to help me out?<br />
<br />
Many thanks for any help!</div>  <br /> <div style="padding:5px">    <fieldset class="fieldset"> <legend>Attached Images</legend> <table cellpadding="0" cellspacing="5" border="0"> <tr> <td><img class="inlineimg" src="http://www.daniweb.com/forums/images/attach/png.gif" alt="File Type: png" width="16" height="16" border="0" style="vertical-align:baseline" /></td> <td><a href="http://www.daniweb.com/forums/attachment.php?attachmentid=12367&amp;d=1256825864" target="_blank">Picture 1.png</a> (25.8 KB)</td> </tr> </table> </fieldset>   </div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rickya100</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234440.html</guid>
		</item>
		<item>
			<title>MS SQL: Converting row printing to column based printing</title>
			<link>http://www.daniweb.com/forums/thread234309.html</link>
			<pubDate>Thu, 29 Oct 2009 05:14:58 GMT</pubDate>
			<description><![CDATA[Hi, I am doing a student progression system where the application is able to keep track of student marks. I have a problem currently and I've been spending nights on this.  
 
Let me briefly explain. Marks are calculated based on their hurdles. So for instance, H1 = xx%, H2 = xx%. The number of...]]></description>
			<content:encoded><![CDATA[<div>Hi, I am doing a student progression system where the application is able to keep track of student marks. I have a problem currently and I've been spending nights on this. <br />
<br />
Let me briefly explain. Marks are calculated based on their hurdles. So for instance, H1 = xx%, H2 = xx%. The number of hurdles vary for different subjects. The code below is able to provide me the calculated marks based on each individual's hurdles in rows. However, I'm trying to output it in a horizontal format. Meaning:<br />
<br />
Instead of:<br />
<br />
xx%<br />
xx%<br />
<br />
I want it to be: xx% xx% (in two columns)<br />
<br />
I've tried using the CASE clause in my SELECT section but that only works if the hurdles are static and fixed. My problem is the hurdles are dynamic as well. Is there anyone who has some idea on how to workaround this issue? Thanks in advance guys!! :)<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT&nbsp; &nbsp;  SUM(Marks.marks_value) * Hurdle.hurdle_weight / 100 AS total<br />
FROM&nbsp; &nbsp; &nbsp; &nbsp;  Marks INNER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Student ON Marks.student_id = Student.student_id INNER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Class ON Student.student_id = Class.student_id INNER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MarkingCriteria ON Marks.criteria_id = MarkingCriteria.criteria_id INNER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AssessmentComponent ON MarkingCriteria.component_id = AssessmentComponent.component_id INNER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Hurdle ON AssessmentComponent.hurdle_id = Hurdle.hurdle_id<br />
GROUP BY Hurdle.hurdle_id, Hurdle.hurdle_weight, Student.student_id, Class.student_id<br />
ORDER BY Hurdle.hurdle_id</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>dfs3000my</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234309.html</guid>
		</item>
		<item>
			<title><![CDATA[Q&A]]></title>
			<link>http://www.daniweb.com/forums/thread234241.html</link>
			<pubDate>Thu, 29 Oct 2009 00:43:49 GMT</pubDate>
			<description><![CDATA[As a volunteer for a non-profit organization, I've been asked to delve into a database which would allow us to transfer data from our old Q&A  program (the floppies are really floppies) to one that will be compatible with OS post Win XP. Apparently Q & A will not operate on Vista or Win 7. Since...]]></description>
			<content:encoded><![CDATA[<div>As a volunteer for a non-profit organization, I've been asked to delve into a database which would allow us to transfer data from our old Q&amp;A  program (the floppies are really floppies) to one that will be compatible with OS post Win XP. Apparently Q &amp; A will not operate on Vista or Win 7. Since Q&amp;A not only holds our membership &amp; volunteer lists and contact information, but also all the data for 5 different fundraising events (it includes such things as vendors, invoices issued to vendors, point of sale and also calculates our percentage of sales, applicable taxes and exemptions, etc.) it would be prudent to do something before it's non-functional.<br />
We've looked at some of the programs available for handling non-profit orgs but find that they are far too complex for our needs as well as too costly for our limited budget (we are a completely self-supporting community centre in a rural area).<br />
Since volunteers would be handling all this info, it needs to be easy to learn and use.<br />
Frankly, I haven't worked with databases since the advent of dBase and have forgotten everything I ever knew.<br />
Anyone have any ideas?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>romi65</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234241.html</guid>
		</item>
		<item>
			<title>Cute: I need to remove the db_backupoperator permissions from the db_owner role.</title>
			<link>http://www.daniweb.com/forums/thread234206.html</link>
			<pubDate>Wed, 28 Oct 2009 22:13:50 GMT</pubDate>
			<description><![CDATA[The reason is that : 
 
1. I wish to run multiple databases on a single server. 
To do this securely each login must be granted db_owner on the database so we can use "deny view any database" to hide the other databases from view. (login can see all databases they are owner of however). 
 
2. This...]]></description>
			<content:encoded><![CDATA[<div>The reason is that :<br />
<br />
1. I wish to run multiple databases on a single server.<br />
To do this securely each login must be granted db_owner on the database so we can use &quot;deny view any database&quot; to hide the other databases from view. (login can see all databases they are owner of however).<br />
<br />
2. This creates a problem. We do not wish the users to be able to create backups even though they are db_owners.<br />
It's here that I am having difficulties. <br />
<br />
Any ideas?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>BratNZ</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234206.html</guid>
		</item>
		<item>
			<title>View Help</title>
			<link>http://www.daniweb.com/forums/thread234162.html</link>
			<pubDate>Wed, 28 Oct 2009 18:39:24 GMT</pubDate>
			<description><![CDATA[In the view below, I need the line "isnull(wwr.packed_qty, isnull((select sum(qty_on_hand) from lot_loc where item = coi.item and loc like 'P%'), 0)) packed_qty, " to include a "or 'S%'", so that both P and S are found, but I get a syntax error when I add it. 
What is the correct syntax that I am...]]></description>
			<content:encoded><![CDATA[<div>In the view below, I need the line &quot;<span style="color:Red">isnull(wwr.packed_qty, isnull((select sum(qty_on_hand) from lot_loc where item = coi.item and loc like 'P%'), 0)) packed_qty,</span> &quot; to include a &quot;<span style="color:red">or 'S%</span>'&quot;, so that both P and S are found, but I get a syntax error when I add it.<br />
What is the correct syntax that I am missing?<br />
This is what I used <span style="color:Green">isnull(wwr.packed_qty, isnull((select sum(qty_on_hand) from lot_loc where item = coi.item and loc like 'P%' or 'S%'), 0)) packed_qty, </span> and got the syntax at 'or' error.<br />
Below is the whole &quot;Current&quot; view.<br />
<br />
<br />
 <pre style="margin:20px; line-height:13px">CREATE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; view [dbo].[SII_vwYardsOnHandDueRpt]<br />
as<br />
SELECT&nbsp; isnull(wwr.greige_item, (select top 1 item from item where family_code = 'GREIGE' and coi.item like item.item + '%')) greige_item, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.greige_yds, 0) greige_yds, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.finished_item, (select top 1 item from item where family_code = 'FINISHED' and coi.item like item.item + '%')) finished_item, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.finished_yds, 0) finished_yds, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.packed_item, coi.item) packed_item, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.packed_desc, it.description) packed_desc, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.packed_qty, isnull((select sum(qty_on_hand) from lot_loc where item = coi.item and loc like 'P%'), 0)) packed_qty, <br />
&nbsp; &nbsp; &nbsp; &nbsp; isnull(wwr.pack_uom, it.u_m) pack_uom, <br />
&nbsp; &nbsp; &nbsp; &nbsp; coi.co_num, <br />
&nbsp; &nbsp; &nbsp; &nbsp; coi.co_line, <br />
&nbsp; &nbsp; &nbsp; &nbsp; coi.co_release, <br />
&nbsp; &nbsp; &nbsp; &nbsp; coi.due_date, <br />
&nbsp; &nbsp; &nbsp; &nbsp; (coi.qty_ordered - coi.qty_shipped) * dbo.SIIItemSalesUOM2(coi.co_num, coi.co_line, coi.co_release) qty_due, <br />
&nbsp; &nbsp; &nbsp; &nbsp; coi.u_m sales_uom, <br />
&nbsp; &nbsp; &nbsp; &nbsp; ca.[name] customer_name,<br />
&nbsp; &nbsp; &nbsp; &nbsp; dbo._SIIQtyDueInYards(coi.co_num, coi.co_line, coi.co_release) qty_due_yds<br />
FROM&nbsp; &nbsp; coitem coi WITH(NOLOCK)<br />
INNER JOIN item it WITH(NOLOCK)<br />
ON&nbsp; &nbsp; &nbsp; it.item = coi.item <br />
LEFT OUTER JOIN co WITH(NOLOCK)<br />
ON&nbsp; &nbsp; &nbsp; co.co_num = coi.co_num <br />
LEFT OUTER JOIN custaddr ca WITH(NOLOCK)<br />
ON&nbsp; &nbsp; &nbsp; ca.cust_num = co.cust_num <br />
&nbsp; &nbsp; AND ca.cust_seq = co.cust_seq <br />
LEFT OUTER JOIN SII_vwWipWebReport wwr <br />
ON&nbsp; &nbsp; &nbsp; wwr.packed_item = coi.item <br />
WHERE&nbsp;  co.stat&nbsp; in ('O', 'S') <br />
&nbsp; &nbsp; AND coi.stat in ('O', 'S')</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Moordoom</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234162.html</guid>
		</item>
		<item>
			<title>somebody help please in creating student information system</title>
			<link>http://www.daniweb.com/forums/thread234149.html</link>
			<pubDate>Wed, 28 Oct 2009 17:18:58 GMT</pubDate>
			<description>i want to create student information system. but i have not a single idea regarding this problem. 
the requirment is thatit should have tables, forms,subforms,relationships,switch board manager,macros, main form. queris,(DDL and DML),SQL functions of the following entities...</description>
			<content:encoded><![CDATA[<div>i want to create student information system. but i have not a single idea regarding this problem.<br />
the requirment is thatit should have tables, forms,subforms,relationships,switch board manager,macros, main form. queris,(DDL and DML),SQL functions of the following entities<br />
STUDENT,TEACHER,DEPARTMENT,COURSE.<br />
u can also contect me on my ID. &lt;EMAIL SNIPPED&gt;<br />
please i need helpe but from the begining please. me waiting.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum128.html">MS Access and FileMaker Pro</category>
			<dc:creator>caapri</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234149.html</guid>
		</item>
		<item>
			<title>Warning Code : 1265</title>
			<link>http://www.daniweb.com/forums/thread234131.html</link>
			<pubDate>Wed, 28 Oct 2009 16:11:41 GMT</pubDate>
			<description><![CDATA[I am receiving MySQL error 1265 when I try to insert records into a table and after googling this error I am no closer to understanding the problem. 
Here is the error message that is returned: 
Warning Code : 1265 
Data truncated for column 'DATE_FIELD' at row 1 
 
Here is the table definition: 
 ...]]></description>
			<content:encoded><![CDATA[<div>I am receiving MySQL error 1265 when I try to insert records into a table and after googling this error I am no closer to understanding the problem.<br />
Here is the error message that is returned:<br />
Warning Code : 1265<br />
Data truncated for column 'DATE_FIELD' at row 1<br />
<br />
Here is the table definition:<br />
 <pre style="margin:20px; line-height:13px">CREATE TABLE&nbsp; `test`.`TIME_TABLE` (<br />
`RECORD_NUM` INT( 6 ) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT&nbsp; 'Number of Records',<br />
`DATE_FIELD` DATE NOT NULL COMMENT&nbsp; 'Date of the event',<br />
`DESCRIPTION` VARCHAR( 1000 ) NOT NULL COMMENT&nbsp; 'Detail of the event'<br />
) ENGINE = MYISAM COMMENT =&nbsp; 'This day in history'<br />
<br />
Here is a typical insert:</pre>  <pre style="margin:20px; line-height:13px">INSERT INTO TIME_TABLE ( DATE_FIELD, DESCRIPTION ) VALUES ('28, October&nbsp; &nbsp; 1971' , 'Great Britain launched Prospero, the first of four X-3 satellites.');</pre><br />
When inspecting the table the DATE-FIELD is set to ‘0000-00-00’</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>rouse</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234131.html</guid>
		</item>
		<item>
			<title>SSIS Permission Problem</title>
			<link>http://www.daniweb.com/forums/thread234084.html</link>
			<pubDate>Wed, 28 Oct 2009 08:08:35 GMT</pubDate>
			<description>Good Day All 
 
I have a Package created and hosted in a Machine(Theresa) that has SQL 2008 and i have my Development Machine(Vuyiswa) that has IIS and am Debugging from the my machine. i have a ASP.NET 2.0 App and am executing a Package that in another machine. The First thing i did was to share a...</description>
			<content:encoded><![CDATA[<div>Good Day All<br />
<br />
I have a Package created and hosted in a Machine(Theresa) that has SQL 2008 and i have my Development Machine(Vuyiswa) that has IIS and am Debugging from the my machine. i have a ASP.NET 2.0 App and am executing a Package that in another machine. The First thing i did was to share a directory where the Packages are stored when i install the packages and supplied &quot;Everyone&quot;,&quot;ASP.NET&quot;,&quot;Vuyiswa&quot; Accounts permissions to to access this share. i can go into the share from the another machine without any problem. i have a code like this in my ASP.NET App<br />
<br />
 <pre style="margin:20px; line-height:13px"> try<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Start the SSIS Here<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Application app = new Application();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Package package = null;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; package = app.LoadPackage(@&quot;D:\Program Files\Microsoft SQL Server\100\DTS\Packages\OMEGA\OMEGA.dtsx&quot;, null);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //@&quot;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Packages\OMEGA\OMEGA.dtsx&quot;, null);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Variables vars = package.Variables;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vars[&quot;Time1&quot;].Value = time;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vars[&quot;Time2&quot;].Value = time;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vars[&quot;Time3&quot;].Value = time;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; vars[&quot;TTBLTYPE&quot;].Value = THREAD_DATA[1].ToString();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //package.Connections[&quot;SQLNCLI10.1&quot;].ConnectionString = obj.GetConnectionString(THREAD_DATA[0].ToString());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Excute Package<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (results == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; foreach (Microsoft.SqlServer.Dts.Runtime.DtsError local_DtsError in package.Errors)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine(&quot;Package Execution results: {0}&quot;, local_DtsError.Description.ToString());<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Console.WriteLine();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; catch (DtsException ex)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Exception = ex.Message;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</pre><br />
This execute Fine until the<br />
<br />
 <pre style="margin:20px; line-height:13px"> Microsoft.SqlServer.Dts.Runtime.DTSExecResult results = package.Execute();</pre><br />
it does not stop here , but i trap it here<br />
<br />
 <pre style="margin:20px; line-height:13px"> if (results == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)</pre>            <br />
<br />
<br />
 and the Error am Getting is<br />
<br />
<span style="font-weight:bold">&quot;SSIS Error Code DTS_E_OLEDBERROR.  An OLE DB error has occurred. Error code: 0x80040E4D.\r\nAn OLE DB record is available.  Source:\&quot;Microsoft SQL Server Native Client 10.0&quot;  Hresult: 0x80040E4D  Description:  &quot;Login failed for user 'sa'</span><br />
<br />
On my Package i use the &quot;sa&quot; credentials and my Protection Level is &quot;Dont Save Sensative&quot;<br />
<br />
Thank you<br />
<br />
<br />
Vuyiswa Maseko</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>vuyiswamb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234084.html</guid>
		</item>
		<item>
			<title>Problems restoring mysql database backups</title>
			<link>http://www.daniweb.com/forums/thread234061.html</link>
			<pubDate>Wed, 28 Oct 2009 06:33:31 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I tried to restore my decompressed database *'cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql'* 
 
using the command : 
 
 
---Quote--- 
mysql -h localhost -u root -proot123 info < /backups/daily/cyberview_db_2809/cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql 
---End Quote---]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I tried to restore my decompressed database <span style="font-weight:bold">'cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql'</span><br />
<br />
using the command :<br />
<br />
<div style="margin:20px; margin-top:5px; "> <div class="smallfont" style="margin-bottom:2px">Quote:</div> <table cellpadding="5" cellspacing="0" border="0" width="100%"> <tr> <td class="alt2"> <hr />  mysql -h localhost -u root -proot123 info &lt; /backups/daily/cyberview_db_2809/cyberview_db_2809_2009-10-27_17h30m.Tuesday.sql  <hr /> </td> </tr> </table> </div>but there was no restoration.<br />
<br />
I checked the <span style="font-weight:bold">/var/lib/mysql</span> directory where all restored databases are located, and in the 'info' folder, the only script that was available was 'db.opt'. Nothing else was created.<br />
<br />
Why is this? Pls help.<br />
<br />
Tqs.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Aigini</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234061.html</guid>
		</item>
		<item>
			<title>creating headr name dynamically</title>
			<link>http://www.daniweb.com/forums/thread234358.html</link>
			<pubDate>Wed, 28 Oct 2009 06:09:25 GMT</pubDate>
			<description>I created 2 tables 
  
 1  st table as csat 
csat_code        csat_ou_cod   csat_csaeid cus name 
CSA00001	ADM00001	6825	CUS08349 
CSA00002	ADM00001	6826	CUS08347 
CSA00003	ADM00001	6832	CUS08351 
CSA02547	ADM00001	6824	CUS04150</description>
			<content:encoded><![CDATA[<div>I created 2 tables<br />
 <br />
 1  st table as csat<br />
csat_code        csat_ou_cod   csat_csaeid cus name<br />
CSA00001	ADM00001	6825	CUS08349<br />
CSA00002	ADM00001	6826	CUS08347<br />
CSA00003	ADM00001	6832	CUS08351<br />
CSA02547	ADM00001	6824	CUS04150<br />
<br />
<br />
 table2 as csat_survey<br />
<br />
surveycode csat_code         qns id   ans id<br />
SUR00001	CSA02547	1	   3<br />
SUR00002	CSA02547	4	   7<br />
<br />
<br />
now i want the resut is<br />
<br />
<br />
csat_code   csat_case_id      qns id(column name)<br />
<br />
<br />
like  the row field of qns id ( table2) is cloumn for my solution table. and the number of qns also varied .so i have to create the dynamic header.. plz any one help me? how can i get this solution?<br />
<br />
<br />
Thanks in advance<br />
<br />
   Sangita.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>shangita</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234358.html</guid>
		</item>
		<item>
			<title>Oracle table design help</title>
			<link>http://www.daniweb.com/forums/thread234051.html</link>
			<pubDate>Wed, 28 Oct 2009 05:47:22 GMT</pubDate>
			<description><![CDATA[I have around 2 million vouchers of some fixed denomination (say 10 and 20)  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags"...]]></description>
			<content:encoded><![CDATA[<div>I have around 2 million vouchers of some fixed denomination (say 10 and 20) <pre style="margin:20px; line-height:13px">create table vouchers(pin varchar2(20) primary key ,amount number,status char(1),extra_value number);<br />
create index IDX_AMOUNT_STATUS on vouchers(amount,status);</pre>Typical values<br />
 <pre style="margin:20px; line-height:13px">amount,status ,count(status)<br />
10&nbsp; &nbsp;  N&nbsp; &nbsp; &nbsp;  1000000&nbsp; &nbsp; &nbsp;  <br />
10&nbsp; &nbsp;  U&nbsp; &nbsp; &nbsp; &nbsp; 700000&nbsp; &nbsp; &nbsp;  <br />
20&nbsp; &nbsp;  N&nbsp; &nbsp; &nbsp; &nbsp; 300000</pre>For each payment transaction,I fetch one voucher wrt.transaction amount and mark it as used<br />
(So it will not be used for any other transaction)<br />
   <pre style="margin:20px; line-height:13px">UPDATE vouchers SET status='U' <br />
&nbsp;WHERE amount=:txn_amount AND staus='N' AND rownum=1<br />
&nbsp;RETURNING pin,extra_value INTO :pin,:extra;</pre> I have 10 parallel threads processing incoming transaction. I am expecting 30 transactions per second. <br />
 Initially the update takes 0.002 millisecond but after few hours it reaches 2 seconds.<br />
 <br />
 I even tried with partitioning table also(status N one partition and defalut another partition).<br />
<br />
Platform details<br />
Linux RHEL 5<br />
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production<br />
 <br />
 Suggestions please.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>johnbach</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234051.html</guid>
		</item>
		<item>
			<title>Smart Searches</title>
			<link>http://www.daniweb.com/forums/thread234052.html</link>
			<pubDate>Wed, 28 Oct 2009 05:46:58 GMT</pubDate>
			<description><![CDATA[Simply put, I need a better query. I have a table that contains 85000 rows, each row has a TITLE and an ABSTRACT (they are academic papers). 
 
What I need is to do a realistic SMART search in my query. 
Right now I'm doing  <div class="codeblock"> <div class="spaced"> <div style="float:right;...]]></description>
			<content:encoded><![CDATA[<div>Simply put, I need a better query. I have a table that contains 85000 rows, each row has a TITLE and an ABSTRACT (they are academic papers).<br />
<br />
What I need is to do a realistic SMART search in my query.<br />
Right now I'm doing <pre style="margin:20px; line-height:13px">SELECT * FROM PsPapers WHERE Title LIKE '%MySearchString%'</pre> which is, as you can see, a fairly retarded search system. This has several problems:<ol style="list-style-type: decimal"><li>If the search is &quot;othello essays&quot; then my query only gives you ones where the title contains &quot;othello essays&quot; even though something like &quot;essays on othello&quot; I would also want to be returned because the title is OBVIOUSLY on point.</li>
<li>My query doesn't use the abstracts right now, the reason is that the abstracts contain alot of crap and should be WEIGHTED MUCH LESS than titles. I would want title matches to list HIGHER than abstract matches.</li>
<li>There is no real cleverness or weighting here. The older cgi system I'm trying to replace uses code taken from an actual search engine so I need to at least ATTEMPT to do a smart search.</li>
</ol><br />
Any thoughts on a better query?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>mmxbass</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234052.html</guid>
		</item>
		<item>
			<title>problem with wamp...</title>
			<link>http://www.daniweb.com/forums/thread234031.html</link>
			<pubDate>Wed, 28 Oct 2009 03:25:56 GMT</pubDate>
			<description><![CDATA[I installed WAMP5 1.7.0  
When I try to access localhost & phpmyadmin, it asks for a username and password.  
I'm pretty sure that  i didn't configured any. 
I  installed the same thing in another computer, and it worked. 
what could be the problem?]]></description>
			<content:encoded><![CDATA[<div>I installed WAMP5 1.7.0 <br />
When I try to access localhost &amp; phpmyadmin, it asks for a username and password. <br />
I'm pretty sure that  i didn't configured any.<br />
I  installed the same thing in another computer, and it worked.<br />
what could be the problem?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>jrosh</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234031.html</guid>
		</item>
		<item>
			<title>Connection Strings to network.</title>
			<link>http://www.daniweb.com/forums/thread234019.html</link>
			<pubDate>Wed, 28 Oct 2009 02:49:18 GMT</pubDate>
			<description><![CDATA[it seem my connection string doesnt work? 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a>...]]></description>
			<content:encoded><![CDATA[<div>it seem my connection string doesnt work?<br />
<br />
 <pre style="margin:20px; line-height:13px">$connect = mssql_connect(&quot;192.170.10.798&quot;,&quot;sa&quot;,&quot;gasd&quot;) or die(mssql_error());<br />
$test = mssql_select_db(&quot;banex&quot;, $connect) or die (mssql_error());</pre><br />
whats wrong with my connection string?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>nanat07</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread234019.html</guid>
		</item>
		<item>
			<title>how do i get started with MySQL</title>
			<link>http://www.daniweb.com/forums/thread233931.html</link>
			<pubDate>Tue, 27 Oct 2009 17:33:28 GMT</pubDate>
			<description>how do i get started with MySQL and get the command prompt like MySQL monitor to write the command for creating a database in MySQL?</description>
			<content:encoded><![CDATA[<div>how do i get started with MySQL and get the command prompt like MySQL monitor to write the command for creating a database in MySQL?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>romilc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233931.html</guid>
		</item>
		<item>
			<title>sql convert vertical to horizontal</title>
			<link>http://www.daniweb.com/forums/thread233907.html</link>
			<pubDate>Tue, 27 Oct 2009 15:55:40 GMT</pubDate>
			<description>I am using SQL Server 2005. I have a data from SQL like this. 
 
ID        ID2      PartNo 
 
75        23921  DENT  
75        26145  PLGD  
75        26145  PRRP  
75        26145  SIST  
75        57290  PRMD 
75        57290  abc</description>
			<content:encoded><![CDATA[<div>I am using SQL Server 2005. I have a data from SQL like this.<br />
<br />
ID        ID2      PartNo<br />
<br />
75        23921  DENT <br />
75        26145  PLGD <br />
75        26145  PRRP <br />
75        26145  SIST <br />
75        57290  PRMD<br />
75        57290  abc<br />
75        57290  def<br />
75        57290  ghi<br />
75        57290  jkl<br />
<br />
<br />
I need an output like this. (max Part4)<br />
<br />
ID        ID2    Part1      Part2  Part3  Part4<br />
<br />
75        23921   DENT<br />
75        26145   PLGD   PRRP   SIST<br />
75        57290   PRMD  abc       def       ghi<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>azamsalam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233907.html</guid>
		</item>
		<item>
			<title>News Story Amazon: New, Improved Cloud, Now With MySQL</title>
			<link>http://www.daniweb.com/news/story233896.html</link>
			<pubDate>Tue, 27 Oct 2009 15:08:11 GMT</pubDate>
			<description><![CDATA[At the risk of coming off like TV's "Mad Men (http://www.amctv.com/originals/madmen/)," Amazon Web Services really are New and Improved. The company today announced the addition of Amazon Relational Database Service (http://aws.amazon.com/rds/), giving users of Amazon's Elastic Compute Cloud (EC2)...]]></description>
			<content:encoded><![CDATA[<div>At the risk of coming off like TV's &quot;<a rel="nofollow" class="t" href="http://www.amctv.com/originals/madmen/" target="_blank">Mad Men</a>,&quot; Amazon Web Services really are New and Improved. The company today announced the addition of <a rel="nofollow" class="t" href="http://aws.amazon.com/rds/" target="_blank">Amazon Relational Database Service</a>, giving users of Amazon's Elastic Compute Cloud (EC2) access to a virtual instance of MySQL. That's the New part. Improvements include a family of high-memory instances and a price reduction of Linux-based EC2 compute time to 8.5 cents per hour from 10 cents. The 15 percent price drop takes effect Nov. 1.<br />
<br />
&quot;Many customers have told us that their applications require a relational database,&quot; said Adam Selipsky, vice president of <a rel="nofollow" class="t" href="http://aws.amazon.com/what-is-aws/" target="_blank">Amazon Web Services</a>, in a <a rel="nofollow" class="t" href="http://phx.corporate-ir.net/phoenix.zhtml?c=176060&amp;p=irol-newsArticle&amp;ID=1346525&amp;highlight=" target="_blank">statement</a>. &quot;That’s why we built <a rel="nofollow" class="t" href="http://aws.amazon.com/rds/" target="_blank">Amazon RDS</a>, which combines a familiar relational database with automated management and the instant scalability of the AWS cloud.&quot; Existing MySQL applications can be &quot;work seamlessly with Amazon RDS,&quot; according to claims, while the cloud automates common administrative tasks such as setup and provisioning, patch management and data backups, which are stored for a user-definable period. Database scaling--such as adding add more storage or changing to a larger or smaller DB Instance class-- can be executed with a single API call, the company said. Developers retain control of schema, indices and controls for performance tuning.<br />
<br />
For less complex database needs, Amazon also offers <a rel="nofollow" class="t" href="http://aws.amazon.com/simpledb/" target="_blank">SimpleDB</a>, with which applications can store and retrieve data using simple Web services requests. As with Amazon RDS, provisioning and maintenance are automatic, as are data indexing and backup. Amazon also provides &quot;geo-redundant replicas of the data,&quot; which keeps data available and helps improve performance. Scaling also is automated, the company said, as the cloud responds to changes in database traffic, and schema changes can be accomplished without changes to database code.<br />
<br />
Amazon charges no up-front fees for <a rel="nofollow" class="t" href="http://aws.amazon.com/" target="_blank">its Web services</a>; you pay only for the resources you use.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>EddieC</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233896.html</guid>
		</item>
		<item>
			<title><![CDATA[How to Create database in SQL Server using Javascript & HTML?]]></title>
			<link>http://www.daniweb.com/forums/thread233881.html</link>
			<pubDate>Tue, 27 Oct 2009 14:16:48 GMT</pubDate>
			<description><![CDATA[Hello, 
 
I want to create database on SQL Server using Javascript and HTML. User will input following data. Server Name, Database name, File Sizes. When I will click "Submit" button database should be created on Selected server with entered name. I am using Client side HTML and Javascript.  
we...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I want to create database on SQL Server using Javascript and HTML. User will input following data. Server Name, Database name, File Sizes. When I will click &quot;Submit&quot; button database should be created on Selected server with entered name. I am using Client side HTML and Javascript. <br />
we need to create database according to some standards thus we are preparing graphical user interface.<br />
Quick response will be appreciated.<br />
<br />
Thanks, Rahul</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Rahul002</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233881.html</guid>
		</item>
		<item>
			<title>way to set a mysql status column</title>
			<link>http://www.daniweb.com/forums/thread233844.html</link>
			<pubDate>Tue, 27 Oct 2009 12:08:34 GMT</pubDate>
			<description>Hi there, 
 
I have 2 columns in my mysql table, (1) Status (2) Type. 
 
For the status column I would like to have one row with a STATUS of 1 (live).  And all the rest to have a STATUS of 0 (hidden). 
 
Is there a way to change a row to live and have the other one revert back to 0 in the same SQL...</description>
			<content:encoded><![CDATA[<div>Hi there,<br />
<br />
I have 2 columns in my mysql table, (1) Status (2) Type.<br />
<br />
For the status column I would like to have one row with a STATUS of 1 (live).  And all the rest to have a STATUS of 0 (hidden).<br />
<br />
Is there a way to change a row to live and have the other one revert back to 0 in the same SQL statement?  I only want to have one row active at a time.<br />
<br />
Also, I have 2 options to specify for TYPE column, would I be best to use enum for this column and how would a specify the correct syntax?<br />
<br />
My mysql knowledge is only basic.  Any help would be appreciated.<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>shaneog</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233844.html</guid>
		</item>
		<item>
			<title>Getting sum of cost from one table where quantity on another table</title>
			<link>http://www.daniweb.com/forums/thread233667.html</link>
			<pubDate>Tue, 27 Oct 2009 03:03:02 GMT</pubDate>
			<description><![CDATA[hi guys, I have 2 tables, one called neworders which stores the part_id and num or parts and a 2nd table called parts which has all the part details including cost. 
tables are as follows 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>hi guys, I have 2 tables, one called neworders which stores the part_id and num or parts and a 2nd table called parts which has all the part details including cost.<br />
tables are as follows<br />
 <pre style="margin:20px; line-height:13px">neworder <br />
part_id(primary key)<br />
number_of_parts<br />
<br />
parts<br />
part_id(primary key)<br />
7-8 more columns, eg size, desc, sup id<br />
cost</pre><br />
what i need to do is get the sum of the costs based on the quantity of the parts ordered<br />
<br />
so if table is as follows<br />
<br />
 <pre style="margin:20px; line-height:13px">table new order<br />
part_id number_of_parts<br />
pt12&nbsp; &nbsp;  2<br />
pt255&nbsp;  4</pre><br />
I need to use the part_id of the neworder table to get the costs of the parts and then add them up with sum based on number of parts ordered.<br />
<br />
I have no idea how to do this, any help would be awesome</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>mr_scooby</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233667.html</guid>
		</item>
		<item>
			<title>Sql Query</title>
			<link>http://www.daniweb.com/forums/thread233609.html</link>
			<pubDate>Mon, 26 Oct 2009 21:23:01 GMT</pubDate>
			<description><![CDATA[Hello, 
Ihope to find some help in here, i have the following diagram  
 
[IMG]http://img143.imageshack.us/img143/6704/13503390.th.jpg[/IMG] (http://img143.imageshack.us/i/13503390.jpg/) 
 
and i want a query which return Emp_ID, Pro_ID  
 
note; 
i can get these values but by 2 queries as the...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
Ihope to find some help in here, i have the following diagram <br />
<br />
<a rel="nofollow" class="t" href="http://img143.imageshack.us/i/13503390.jpg/" target="_blank"><a href="http://img143.imageshack.us/img143/6704/13503390.th.jpg" target="_blank">http://img143.imageshack.us/img143/6704/13503390.th.jpg</a></a><br />
<br />
and i want a query which return Emp_ID, Pro_ID <br />
<br />
note;<br />
i can get these values but by 2 queries as the following;<br />
 <pre style="margin:20px; line-height:13px">select Pro_ID from Projects where Dep_ID in <br />
(select Dep_ID from Departments where name = 'test') <br />
<br />
select Emp_ID from Employees where Dep_ID in <br />
<br />
(select Dep_ID from Departments where name = 'test')</pre><br />
the goal of having the result through one query is that i want to insert the value into another table<br />
insert into testTable (query)<br />
<br />
Hope to see reply ASAP</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Moody1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233609.html</guid>
		</item>
		<item>
			<title>MS SQL</title>
			<link>http://www.daniweb.com/forums/thread233599.html</link>
			<pubDate>Mon, 26 Oct 2009 20:59:22 GMT</pubDate>
			<description>Can I get a template for Log in icon. I have purchased DB Name, MS SQL , Database connection. But I dont know how to connect my database file to server. 
BC PATTANAYAK</description>
			<content:encoded><![CDATA[<div>Can I get a template for Log in icon. I have purchased DB Name, MS SQL , Database connection. But I dont know how to connect my database file to server.<br />
BC PATTANAYAK</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>bcpattanayak</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233599.html</guid>
		</item>
		<item>
			<title>Loop to generate future dates?!</title>
			<link>http://www.daniweb.com/forums/thread233515.html</link>
			<pubDate>Mon, 26 Oct 2009 16:23:29 GMT</pubDate>
			<description><![CDATA[What is the best way to generate a set of dates based on today's date? Essentially, what I wanna do is: 
1. Get Current Date 
2. Populate a table with future dates 6 months apart and go up until I reach, let's say, 12/31/2020 
 
I have looked at some of the date functions offered by MS-SQL 2005,...]]></description>
			<content:encoded><![CDATA[<div>What is the best way to generate a set of dates based on today's date? Essentially, what I wanna do is:<br />
1. Get Current Date<br />
2. Populate a table with future dates 6 months apart and go up until I reach, let's say, 12/31/2020<br />
<br />
I have looked at some of the date functions offered by MS-SQL 2005, but not quite sure how to run a loop. (I use ColdFusion as the front-end)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>cheapterp</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233515.html</guid>
		</item>
		<item>
			<title>what is the difference between deny and revoke?</title>
			<link>http://www.daniweb.com/forums/thread233470.html</link>
			<pubDate>Mon, 26 Oct 2009 14:07:12 GMT</pubDate>
			<description>hi everybody ...could anyone tell what is the difference between deny and revoke of privileges from a user.</description>
			<content:encoded><![CDATA[<div>hi everybody ...could anyone tell what is the difference between deny and revoke of privileges from a user.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>baheddad</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233470.html</guid>
		</item>
		<item>
			<title>Lots of questions about mysql</title>
			<link>http://www.daniweb.com/forums/thread233439.html</link>
			<pubDate>Mon, 26 Oct 2009 11:37:23 GMT</pubDate>
			<description>1. What types of data does the DBMS support? 
2. Does it support NULLS? 
3. What about Primary and Foreign Keys? 
4.Can you specify an index that is unique and then have the system enforce that? 
5. Does the DBMS support views? 
 
6. What type of data dictionary does the DBMS provide - is it...</description>
			<content:encoded><![CDATA[<div>1. What types of data does the DBMS support?<br />
2. Does it support NULLS?<br />
3. What about Primary and Foreign Keys?<br />
4.Can you specify an index that is unique and then have the system enforce that?<br />
5. Does the DBMS support views?<br />
<br />
6. What type of data dictionary does the DBMS provide - is it independent or integrated, in its association to a DBMS?<br />
7. Is it a simple catalog or is it more sophisticated with information about the types of programs that can access it?<br />
8. is it integrated with the non-procedural language?<br />
<br />
9. Does the DBMS support concurrent update (more than one user updating the database)?<br />
10. What is the unit that can be locked (field, row, table, etc.)?<br />
11.Are locks exclusive or shared? (Shared locks allow other users to read the data: with an exclusive lock, no other user can access the data in any way).<br />
12.Does the DBMS resolve deadlocks or must the programs do this?<br />
<br />
13.Does the database support replication?<br />
14.If so, does the DBMS allow partial replicas (copies of only selected rows and fields from tables), and how does the DBMS handle updates from two or more replicas?<br />
15.Can the DBMS distribute a database? (Divide into segments split over more than one sever).<br />
16. Does the DBMS provide procedural support for distributed databases?<br />
<br />
17.What limitations exist with respect to the number of tables, fields and rows per tables?<br />
18. How many files can be open at the same time? (In some DBMS's, each table and index is considered to be a separate file. Thus, a single table with three indexes, all in use at the same time, would account for four files).<br />
19. What type of operating system and hardware is supported?<br />
20. What types of LAN's can you use? (In a LAN, concurrent update is critical as many users may be updating the database at the same time).<br />
<br />
20.How well does the DBMS perform, where performance is a measure of how rapidly the DBMS completes it's tasks? <br />
21.Does the organisation have internal benchmarking standards to be met?<br />
22. Does the DBMS provide a performance monitor to measure the different types of performance whilst the DBMS is running?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>MuffinKun</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233439.html</guid>
		</item>
		<item>
			<title>how can i find the table names</title>
			<link>http://www.daniweb.com/forums/thread233767.html</link>
			<pubDate>Mon, 26 Oct 2009 09:49:22 GMT</pubDate>
			<description>how can i find the table names from Sql server. what r the statement.</description>
			<content:encoded><![CDATA[<div>how can i find the table names from Sql server. what r the statement.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>else_harpal</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233767.html</guid>
		</item>
		<item>
			<title>project help:LAN search engines</title>
			<link>http://www.daniweb.com/forums/thread233292.html</link>
			<pubDate>Mon, 26 Oct 2009 02:17:42 GMT</pubDate>
			<description>Hello,I am the third year student,I have taken the mini project of LAN search engine.with JAVA as front end and oracle as a backend. 
but I am not getting exactly how the LAN search Engines work and how to get the database for the local LAN systems. 
 
Plz anyone help me, to get the exact ideas.</description>
			<content:encoded><![CDATA[<div>Hello,I am the third year student,I have taken the mini project of LAN search engine.with JAVA as front end and oracle as a backend.<br />
but I am not getting exactly how the LAN search Engines work and how to get the database for the local LAN systems.<br />
<br />
Plz anyone help me, to get the exact ideas.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>Hritika</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233292.html</guid>
		</item>
		<item>
			<title>mySQL permissions ... a few newbie questions</title>
			<link>http://www.daniweb.com/forums/thread233075.html</link>
			<pubDate>Sun, 25 Oct 2009 05:13:18 GMT</pubDate>
			<description><![CDATA[I haven't used the mySQL permissions mechanism to any great degree & could use a little help while still at the design stage. 
 
Is it possible to grant certain users access only to certain RECORDS within a table (based on the value of a field in those records). 
 
If not, I guess I have to use...]]></description>
			<content:encoded><![CDATA[<div>I haven't used the mySQL permissions mechanism to any great degree &amp; could use a little help while still at the design stage.<br />
<br />
Is it possible to grant certain users access only to certain RECORDS within a table (based on the value of a field in those records).<br />
<br />
If not, I guess I have to use separate tables or views for each user.<br />
<br />
Some initial guidance or links to reference material would be greatly appreciated.  TIA<br />
<br />
Edit: I am reading the manuals BTW - <a rel="nofollow" class="t" href="http://dev.mysql.com/doc/#manual" target="_blank">http://dev.mysql.com/doc/#manual</a></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>haggis-man</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233075.html</guid>
		</item>
		<item>
			<title>Special chars in Insert query...</title>
			<link>http://www.daniweb.com/forums/thread233042.html</link>
			<pubDate>Sun, 25 Oct 2009 02:38:08 GMT</pubDate>
			<description><![CDATA[Hello guys, how can to make correct query if in the typed values have a special chars (e.g. ' ") ? 
 
If the typed values have a one special char I know how to make the correct query, but if it have more then one special chars then I don't know how to make the correct query... can someone help me ?...]]></description>
			<content:encoded><![CDATA[<div>Hello guys, how can to make correct query if in the typed values have a special chars (e.g. ' &quot;) ?<br />
<br />
If the typed values have a one special char I know how to make the correct query, but if it have more then one special chars then I don't know how to make the correct query... can someone help me ?<br />
<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Krstevski</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread233042.html</guid>
		</item>
		<item>
			<title>Importing xml into sql server 2008</title>
			<link>http://www.daniweb.com/forums/thread232967.html</link>
			<pubDate>Sat, 24 Oct 2009 17:32:59 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I need a little help importing an XML file into sqlserver 2008.  I followed this example 
 
http://www.sql-server-performance.com/articles/dba/Loading_XML_data_into_SQL_Server_2008_p1.aspx 
 
(make sure you goto the rest of the pages in the article!) , generated the schema etc., but I can't...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I need a little help importing an XML file into sqlserver 2008.  I followed this example<br />
<br />
<a rel="nofollow" class="t" href="http://www.sql-server-performance.com/articles/dba/Loading_XML_data_into_SQL_Server_2008_p1.aspx" target="_blank">http://www.sql-server-performance.co...r_2008_p1.aspx</a><br />
<br />
(make sure you goto the rest of the pages in the article!) , generated the schema etc., but I can't get the import <br />
<br />
to do what I need. I was able to add the DataConversion on my own but I can't seem to figure out how to get both ID <br />
<br />
fields in the middle table.<br />
I made a simplified version.  For this example I have 3 tables.  Books, BookAuthors, Authors.<br />
<br />
Books Table (bookID, bookTitle, bookNumPages)<br />
BookAuthors Table (bookID, authorID)<br />
Authors (authorID, authorName)<br />
<br />
After the Import the tables should look like this<br />
Books<br />
79, Some Good Book, 300<br />
112, Another Book, 350<br />
BookAuthors<br />
79, 200<br />
79, 205<br />
79, 215<br />
112, 200<br />
Authors<br />
200, First Author<br />
205, Second Author<br />
215, Third Author<br />
<br />
The Problem I'm having is getting the BookID and AuthorID into the BookAuthors Table.  I'm just wondering if there <br />
<br />
is an easy way to set this up to Import or if I'm going to have to code it line by line.<br />
<br />
 <pre style="margin:20px; line-height:13px">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br />
&lt;result&gt;<br />
&nbsp; &nbsp; &lt;books&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;book&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bookID&gt;79&lt;/bookID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bookTitle&gt;Some Good Book&lt;/bookTitle&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bookNumPages&gt;300&lt;/bookNumPages&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authors&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;200&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;205&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;215&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/authors&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/book&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;book&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bookID&gt;112&lt;/bookID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bookTitle&gt;Another Book&lt;/bookTitle&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;bookNumPages&gt;350&lt;/bookNumPages&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authors&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;200&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/authors&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/book&gt;<br />
&nbsp; &nbsp; &lt;/books&gt;<br />
&nbsp; &nbsp; &lt;authors&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;200&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorName&gt;First Author&lt;/authorName&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;205&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorName&gt;Second Author&lt;/authorName&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;author&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorID&gt;215&lt;/authorID&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;authorName&gt;Third Author&lt;/authorName&gt;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &lt;/author&gt;<br />
&nbsp; &nbsp; &lt;/authors&gt;<br />
&lt;/result&gt;</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>dvprez</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232967.html</guid>
		</item>
		<item>
			<title>Query optimization</title>
			<link>http://www.daniweb.com/forums/thread232856.html</link>
			<pubDate>Sat, 24 Oct 2009 10:04:45 GMT</pubDate>
			<description><![CDATA[Hi all. 
I am writing a utility to manage virtual users on a mailserver w/ mysql backed. Unfortunately I am having performance issues when querying for the user's last access date/time. 
 
DB has this structure 
 
table *users* 
  <div class="codeblock"> <div class="spaced"> <div...]]></description>
			<content:encoded><![CDATA[<div>Hi all.<br />
I am writing a utility to manage virtual users on a mailserver w/ mysql backed. Unfortunately I am having performance issues when querying for the user's last access date/time.<br />
<br />
DB has this structure<br />
<br />
table <span style="font-weight:bold">users</span><br />
 <pre style="margin:20px; line-height:13px">+------------------+-------------+------+-----+---------+-------+<br />
| Field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Type&nbsp; &nbsp; &nbsp; &nbsp; | Null | Key | Default | Extra |<br />
+------------------+-------------+------+-----+---------+-------+<br />
| email&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | varchar(80) | NO&nbsp;  | PRI | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;  |<br />
| force_change_pwd | int(1)&nbsp; &nbsp; &nbsp; | NO&nbsp;  |&nbsp; &nbsp;  | 0&nbsp; &nbsp; &nbsp;  |&nbsp; &nbsp; &nbsp;  |<br />
| password&nbsp; &nbsp; &nbsp; &nbsp;  | md5(20)&nbsp; &nbsp;  | NO&nbsp;  |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;  |<br />
| creation_date&nbsp; &nbsp; | datetime&nbsp; &nbsp; | YES&nbsp; |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp;  |<br />
+------------------+-------------+------+-----+---------+-------+</pre><br />
table <span style="font-weight:bold">user_activity</span><br />
<br />
 <pre style="margin:20px; line-height:13px">+----------------+--------------+------+-----+---------+----------------+<br />
| Field&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Type&nbsp; &nbsp; &nbsp; &nbsp;  | Null | Key | Default | Extra&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------+--------------+------+-----+---------+----------------+<br />
| id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | int(11)&nbsp; &nbsp; &nbsp; | NO&nbsp;  | PRI | NULL&nbsp; &nbsp; | auto_increment |<br />
| event&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | varchar(30)&nbsp; | NO&nbsp;  | MUL | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| username&nbsp; &nbsp; &nbsp;  | varchar(128) | NO&nbsp;  |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| domain&nbsp; &nbsp; &nbsp; &nbsp;  | varchar(128) | NO&nbsp;  | MUL | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| remote_address | varchar(255) | NO&nbsp;  |&nbsp; &nbsp;  | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  | datetime&nbsp; &nbsp;  | NO&nbsp;  | MUL | NULL&nbsp; &nbsp; |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
| comments&nbsp; &nbsp; &nbsp;  | varchar(255) | YES&nbsp; |&nbsp; &nbsp;  |&nbsp; &nbsp; &nbsp; &nbsp;  |&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; |<br />
+----------------+--------------+------+-----+---------+----------------+</pre><br />
<br />
In my PHP page, I have the following code<br />
<br />
 <pre style="margin:20px; line-height:13px">$mbox_users = 'SELECT email, creation_date FROM users ORDER BY email ASC';<br />
$result = mysql_query($mbox_users) or die (&quot;There was a problem with the SQL query: &quot; . mysql_error());<br />
while($row = mysql_fetch_assoc($result))<br />
{<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; $email=$row['email'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; $date=$row['creation_date'];<br />
&nbsp; &nbsp; &nbsp; &nbsp; if (is_null($date)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $date = &quot;N/A&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; $mbox_access=&quot;SELECT date FROM user_activity&nbsp; WHERE username = '&quot;.$row['email'].&quot;' ORDER BY date DESC LIMIT 1&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; $result_access = mysql_query($mbox_access) or die (&quot;There was a problem with the SQL query: &quot; . mysql_error());<br />
&nbsp; &nbsp; &nbsp; &nbsp; $last = mysql_fetch_assoc($result_access);<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo '&lt;li&gt;'.$email.' (&lt;b&gt;Created: &lt;/b&gt;'.$date.' - &lt;b&gt;Last Access: &lt;/b&gt;'.$last['date'].')&lt;/li&gt;';</pre><br />
<br />
Unfortunately with +20k users and over 100k records in the <span style="font-weight:bold">user_activity</span> table, the queries are awfully slow.<br />
Am I missing some obvious method of making the query faster?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>trashed</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232856.html</guid>
		</item>
		<item>
			<title>Inserting data to mysql database using php created form</title>
			<link>http://www.daniweb.com/forums/thread232496.html</link>
			<pubDate>Fri, 23 Oct 2009 04:14:07 GMT</pubDate>
			<description>Dear all, 
 
I am trying to submit my data on a php created form to mysql database where it is separate by 2 tables (device) and (location). 
 
As some of the devices shared the same location, 2 tables are created as below. 
For location table, i had created 2 fields: ID as (primary key) and area....</description>
			<content:encoded><![CDATA[<div>Dear all,<br />
<br />
I am trying to submit my data on a php created form to mysql database where it is separate by 2 tables (device) and (location).<br />
<br />
As some of the devices shared the same location, 2 tables are created as below.<br />
For location table, i had created 2 fields: ID as (primary key) and area.<br />
For device, i created 3 fields: ID (primary key), device_num and device_loc.<br />
<br />
Using php, i created a form where user will enter the device number and the location. <br />
<br />
The problem is i can insert the device number to my device table in mysql database and i have no idea how to link up the location table to my device table.  Appreciated if some help of advise is given to me. <br />
<br />
Below are the simple code of the insertion of my device table.<br />
<br />
 <pre style="margin:20px; line-height:13px">$val_d = $_POST['Device_num'];&nbsp; &nbsp; //value submit from user <br />
$val_l = $_POST['location_area'];&nbsp; //value submit from user <br />
<br />
$dev_insert = &quot;INSERT INTO device (device_id, device_num)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VALUES (NULL, '$val_d')&quot;;<br />
$results = mysql_query($dev_insert)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; or die (mysql_error());</pre></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>futhonguy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232496.html</guid>
		</item>
		<item>
			<title>sql +sql reporting service</title>
			<link>http://www.daniweb.com/forums/thread232376.html</link>
			<pubDate>Thu, 22 Oct 2009 17:35:12 GMT</pubDate>
			<description><![CDATA[Hi  
 
I developed report using sql server reporting service.I used parameter to assign value for sql query.I  want to use "LIKE" keyword in using parameter,How i do that?i wrote coding  below what u wrote before.I used @con as parameter. 
 
Select FriutID from Friut where friutName like'@con'%. ...]]></description>
			<content:encoded><![CDATA[<div>Hi <br />
<br />
I developed report using sql server reporting service.I used parameter to assign value for sql query.I  want to use &quot;LIKE&quot; keyword in using parameter,How i do that?i wrote coding  below what u wrote before.I used @con as parameter.<br />
<br />
 <pre style="margin:20px; line-height:13px">Select FriutID from Friut where friutName like'@con'%.</pre> <br />
Once I write above coding it gave me syntax error message.<br />
<br />
Thank<br />
Tank50</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Tank50</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232376.html</guid>
		</item>
		<item>
			<title>best wait to transpose all elements of a column into ColumnFields</title>
			<link>http://www.daniweb.com/forums/thread232337.html</link>
			<pubDate>Thu, 22 Oct 2009 15:44:10 GMT</pubDate>
			<description>Hello, 
 
I would like to know if there is an easy way to transform the following table 
 
			      CarId   | PropertyName    |  PropertyValue 
				   1      |   Size          |   XL   
				   1      |   Name          |   Porsche   
				   1      |   Color         |   Red   
				   2      |   Size ...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I would like to know if there is an easy way to transform the following table<br />
<br />
			      CarId   | PropertyName    |  PropertyValue<br />
				   1      |   Size          |   XL  <br />
				   1      |   Name          |   Porsche  <br />
				   1      |   Color         |   Red  <br />
				   2      |   Size          |   XS  <br />
				   2      |   Name          |   Smart  <br />
				   3      |   Name          |   Audi<br />
<br />
<br />
<br />
into <br />
<br />
			      CarId   |   Size  |     Name   |   Color<br />
				   1      |   XL    |   Porsche  |    Red<br />
				   2      |   XS    |   Smart    |				 <br />
				   3      |         |   Audi     |<br />
<br />
with MSSQL 2005 (i am using Studio Express)<br />
<br />
This a kind of crossTabling.<br />
<br />
until now here is what i am doing:<br />
<br />
I create a table why just 1 empty column (CarId)<br />
<br />
For each CarId, <br />
	I put the cardId in CarId Column<br />
	For each couple (PropertyName,PropertyValue)<br />
		i test whether the column 'PropertyName' exists. If no, i create it<br />
		then i put the 'PropertyValue' in the box (x='CardId',y='PropertyName')<br />
		<br />
		<br />
Thank you<br />
		<br />
		<br />
Julien</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Julamotte</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232337.html</guid>
		</item>
		<item>
			<title>SQL Server 2005 error</title>
			<link>http://www.daniweb.com/forums/thread232275.html</link>
			<pubDate>Thu, 22 Oct 2009 11:30:28 GMT</pubDate>
			<description><![CDATA[I am a new SQL user and I have created my code but when I execute it I get this error : 
 
Msg 2714, Level 16, State 6, Line 1 
There is already an object named 'Job_Title' in the database. 
 
I do not understand why I keep getting this same error.   
Here is my code: 
 
CREATE TABLE Job_Title 
(]]></description>
			<content:encoded><![CDATA[<div>I am a new SQL user and I have created my code but when I execute it I get this error :<br />
<br />
<span style="color:Red">Msg 2714, Level 16, State 6, Line 1<br />
There is already an object named 'Job_Title' in the database.</span><br />
<br />
I do not understand why I keep getting this same error.  <br />
Here is my code:<br />
<br />
 <pre style="margin:20px; line-height:13px">CREATE TABLE Job_Title<br />
(<br />
Job_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY(Job_ID),<br />
EEO1_Class&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(20)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Job_Title&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(40) NOT NULL,<br />
Job_Descrip&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(100)NOT NULL,<br />
Status&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(10)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL<br />
)<br />
<br />
CREATE TABLE Employee<br />
(<br />
Emp_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL<br />
&nbsp; &nbsp; &nbsp; &nbsp; PRIMARY KEY(Emp_ID),<br />
Last_Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(50) NOT NULL,<br />
First_Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(50)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Address&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(50)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
City&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(25)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
State&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(20)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Phone_AC&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char(3)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Phone_Num&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char(7)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Ssn&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; char(9)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Hire_Date&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datetime&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Salary&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; numeric(6,2)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Gender&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; varchar(6)&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Birthday&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; datetime&nbsp; &nbsp; &nbsp; &nbsp; NOT NULL,<br />
Job_ID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; int&nbsp; &nbsp; &nbsp; &nbsp; FOREIGN KEY REFERENCES Job_Title (Job_ID)<br />
)</pre><br />
<br />
And a few examples of my INSERT statements:<br />
<br />
 <pre style="margin:20px; line-height:13px">INSERT INTO Employee (Emp_ID,Last_Name,First_Name,Address,City,State,Phone_AC,<br />
&nbsp; &nbsp; &nbsp; &nbsp; Phone_Num,Ssn,Hire_Date,Salary,Gender,Birthday,Job_ID)<br />
VALUES (62683,'Edelman','Glenn','175 Bishop Lane','La Jolla','California',619,555-0199,112333445,<br />
&nbsp; &nbsp; &nbsp; &nbsp; 10/07/2003,11.25,'male',11/02/1981,004)<br />
<br />
<br />
INSERT INTO Job_Title (Job_ID,EEO1_Class,Job_Title,Job_Descrip,Status)<br />
VALUES (001,'Office/Clerical','Accounting Clerk','Computes, classifies, records, and verifies numerical<br />
&nbsp; &nbsp; &nbsp; &nbsp; data for use in maintaining accounting records','NonExempt')</pre><br />
<br />
Thanks for your help!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>s28walters</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232275.html</guid>
		</item>
		<item>
			<title>Connection to remote server</title>
			<link>http://www.daniweb.com/forums/thread232266.html</link>
			<pubDate>Thu, 22 Oct 2009 10:43:28 GMT</pubDate>
			<description>I have multiple external databases that i want to connect to, from a stored procedure. What server the database is located on is dynamic (a record in a table). All of the external databases are LinkedServers, but also here i need to be able to define what server dynamicly. 
 
It works when i use...</description>
			<content:encoded><![CDATA[<div>I have multiple external databases that i want to connect to, from a stored procedure. What server the database is located on is dynamic (a record in a table). All of the external databases are LinkedServers, but also here i need to be able to define what server dynamicly.<br />
<br />
It works when i use EXEC to connect to the remote servers, example:<br />
 <pre style="margin:20px; line-height:13px">DECLARE @SQLinkedTable AS VARCHAR(50)<br />
DECLARE @SQL NVARCHAR(4000)<br />
DECLARE @Quantity AS INT<br />
<br />
SET @SQLinkedTable='LINKEDSERVER1.DB1.dbo'<br />
SELECT @SQL = 'SELECT @Quantity=COUNT(*) FROM '+@SQLinkedTable+'.[CampaignSettings] WHERE SQLID=1'<br />
EXEC sp_executesql @SQL, N'@Quantity INT OUTPUT', @Quantity OUTPUT</pre><br />
In this code it returns a count to me from the external database, but i whould like to to more than that, for example UPDATES from the current database, and i think making a cursor to loop all the records is a bit messy.<br />
<br />
These don't work: <br />
 <pre style="margin:20px; line-height:13px">DECLARE @SQLinkedTable AS VARCHAR(50)<br />
<br />
SET @SQLinkedTable='LINKEDSERVER1.DB1.dbo'<br />
SELECT * FROM @SQLinkedTable.[CampaignSettings])<br />
<br />
DECLARE @ExternalDB AS VARCHAR(200)<br />
SET @ExternalDB = 'Server=111.111.111.111;Database=DB1;UID=USR;Pwd=PASS;'<br />
SELECT * FROM OPENROWSET ('SQLNCLI',@ExternalDB, 'SELECT * FROM [CampaignSettings]')</pre><br />
I know that everyone says don't do dynamic table linking, but in this case i have no option.<br />
<br />
Any other Ideas?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>NextCom</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232266.html</guid>
		</item>
		<item>
			<title>Any experience with MySQL Dump Timer ?</title>
			<link>http://www.daniweb.com/forums/thread232202.html</link>
			<pubDate>Thu, 22 Oct 2009 07:22:09 GMT</pubDate>
			<description>Anyone has experince with MySQL Dump Timer tool ? 
I just download it from here :  
http://www.softwarevenue.com/download/mysql-dump-timer/ 
 
Is it good ? 
I have not install it yet, still looking for more information about this tool 
This is the sort description from the site : 
MySQL Backup /...</description>
			<content:encoded><![CDATA[<div>Anyone has experince with MySQL Dump Timer tool ?<br />
I just download it from here : <br />
<a rel="nofollow" class="t" href="http://www.softwarevenue.com/download/mysql-dump-timer/" target="_blank">http://www.softwarevenue.com/download/mysql-dump-timer/</a><br />
<br />
Is it good ?<br />
I have not install it yet, still looking for more information about this tool<br />
This is the sort description from the site :<br />
<span style="font-style:italic">MySQL Backup / MySQL Dump and MySQL Restore scheduler – local/ remote in the Web</span></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>sylstain</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232202.html</guid>
		</item>
		<item>
			<title>My data not appear</title>
			<link>http://www.daniweb.com/forums/thread232151.html</link>
			<pubDate>Thu, 22 Oct 2009 03:50:00 GMT</pubDate>
			<description><![CDATA[<div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a> </div> <div>(<a href="#"...]]></description>
			<content:encoded><![CDATA[<div> <pre style="margin:20px; line-height:13px">&quot;SELECT tbl1.staff_ic, tbl1.staff_name, tbl2.dec_status,tbl4.location,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tbl3.post,tbl3.grade&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FROM staff_detail tbl1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN staff_declare tbl2<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tbl1.staff_ic = tbl2.staff_ic<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN staff_post tbl3<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tbl1.staff_post = tbl3.num<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INNER JOIN staff_department tbl4<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ON tbl1.staff_dep = tbl4.no<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;;</pre>isn`t my coding is right?? why when i execute my command just certain data are appear and the rest not appear</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>aerliana</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232151.html</guid>
		</item>
		<item>
			<title>SQL Injection -measures for prevention</title>
			<link>http://www.daniweb.com/forums/thread232097.html</link>
			<pubDate>Wed, 21 Oct 2009 22:55:02 GMT</pubDate>
			<description><![CDATA[Hi, I'm making litle CMS with PHP+Mysql. Can you tellme measures for prevention  for SQL Injections ?]]></description>
			<content:encoded><![CDATA[<div>Hi, I'm making litle CMS with PHP+Mysql. Can you tellme measures for prevention  for SQL Injections ?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ultras1</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232097.html</guid>
		</item>
		<item>
			<title>Quote system (Having issue with concept of having products and services)</title>
			<link>http://www.daniweb.com/forums/thread232088.html</link>
			<pubDate>Wed, 21 Oct 2009 21:36:38 GMT</pubDate>
			<description><![CDATA[I'm mapping out an entity relationship diagram to try learn more about database design. I currently have approximately 17 tables that map out a quotation management system that quotes customers prices for products and/or services. I've been working on it for a number of days now but I am unable to...]]></description>
			<content:encoded><![CDATA[<div>I'm mapping out an entity relationship diagram to try learn more about database design. I currently have approximately 17 tables that map out a quotation management system that quotes customers prices for products and/or services. I've been working on it for a number of days now but I am unable to find resources/help relating to the following<br />
<br />
The entities/tables within the scenario I'm having trouble with are as follows:<br />
<ul><li>Customer</li>
<li>Quote</li>
<li>QuoteItemListing</li>
<li>ProductItems</li>
<li>ServiceItems</li>
<li>Products</li>
<li>Services</li>
</ul><br />
<span style="font-weight:bold">Relationships</span><br />
Customer (requests) Quote<br />
Quote (has) QuoteItemListing<br />
QuoteItemListing (may have) ProductItems<br />
QuoteItemListing (may have) ServiceItems<br />
ProductItems (are) Products<br />
ServiceItems (are) Services<br />
<br />
Essentially, I wish to be able to reference the IDs of the Products and Services a customer wishes to get a quote on in one table (QuoteItemListing). Could anyone please point me in the right direction? Thanks a lot.<br />
<br />
My tables at present:<br />
<br />
<span style="font-weight:bold">Customer</span><br />
ID<br />
name<br />
address<br />
phone<br />
<br />
<span style="font-weight:bold">Quote</span><br />
ID <br />
customerFK<br />
<br />
<span style="font-weight:bold">QuoteItemListing</span><br />
ID<br />
quoteFK<br />
<br />
<span style="font-weight:bold">ProductItems</span><br />
ID<br />
productFK<br />
quantityRequired<br />
quoteOrderFK<br />
<br />
<span style="font-weight:bold">ServiceItems</span><br />
ID<br />
serviceFK<br />
quoteOrderFK<br />
<br />
<span style="font-weight:bold">Product</span><br />
ID<br />
name<br />
price<br />
<br />
<span style="font-weight:bold">Service</span><br />
ID<br />
name<br />
hourlyRate<br />
hoursRequired</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>daveomcgee</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232088.html</guid>
		</item>
		<item>
			<title>help - ordering</title>
			<link>http://www.daniweb.com/forums/thread232016.html</link>
			<pubDate>Wed, 21 Oct 2009 15:50:03 GMT</pubDate>
			<description><![CDATA[Hello! I need some help please.. 
 
i searched a lot, and tried everything... can someone help me please.. 
 
here's the deal: 
 
i have this select: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hello! I need some help please..<br />
<br />
i searched a lot, and tried everything... can someone help me please..<br />
<br />
here's the deal:<br />
<br />
i have this select:<br />
<br />
 <pre style="margin:20px; line-height:13px">SELECT * <br />
FROM localizacao, cliente, dispositivo&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
WHERE disp_id = clien_disp_id AND disp_id = local_disp_id <br />
ORDER BY local_id desc</pre><br />
it's output:<br />
<a rel="nofollow" class="t" href="http://i.imagehost.org/0746/tabela.jpg" target="_blank">http://i.imagehost.org/0746/tabela.jpg</a><br />
<br />
but what i really want is:<br />
<br />
i want to select my client's, but where local_id is the last id i receive.. but i don't wanna show repetitive client's, i just want to show the last local_id for each client....<br />
<span style="font-weight:bold">i want like to show only this ones: <a rel="nofollow" class="t" href="http://i.imagehost.org/0883/tabela2.jpg" target="_blank">http://i.imagehost.org/0883/tabela2.jpg</a> in the red circle</span><br />
<br />
you know what i mean? <br />
it's like two order by's but not showing repetitive client's... i tried distinct... but maybe im making it wrong..<br />
<br />
help :s<br />
<br />
thanks a lot</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>gpss</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread232016.html</guid>
		</item>
		<item>
			<title>Selecting a certain number of results from a specified row</title>
			<link>http://www.daniweb.com/forums/thread231923.html</link>
			<pubDate>Wed, 21 Oct 2009 10:06:07 GMT</pubDate>
			<description><![CDATA[As the title says, I'd like to select a certain number of rows from a table starting from a specified row. 
 
So for example, I have a table with 250 rows and the rows are numbered incrementally using a column called 'ref'. I now want to select rows 51-100. How would I go about doing that?]]></description>
			<content:encoded><![CDATA[<div>As the title says, I'd like to select a certain number of rows from a table starting from a specified row.<br />
<br />
So for example, I have a table with 250 rows and the rows are numbered incrementally using a column called 'ref'. I now want to select rows 51-100. How would I go about doing that?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Venom Rush</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231923.html</guid>
		</item>
		<item>
			<title>challenging query - Insert On duplicate field?  not on duplicate key</title>
			<link>http://www.daniweb.com/forums/thread231865.html</link>
			<pubDate>Wed, 21 Oct 2009 06:38:57 GMT</pubDate>
			<description>I want to insert multiple records or update those records if 2 specific column values do not exist in a record.  But the 2 values are NOT UNIQUE, so I can not use ON DUPLICATE KEY.  I am trying to not use IF...Then statements.  It seems to be bad programming practice. 
 
Here is the pseudo code of...</description>
			<content:encoded><![CDATA[<div>I want to insert multiple records or update those records if 2 specific column values do not exist in a record.  But the 2 values are NOT UNIQUE, so I can not use ON DUPLICATE KEY.  I am trying to not use IF...Then statements.  It seems to be bad programming practice.<br />
<br />
Here is the pseudo code of what I want to accomplish.<br />
<br />
 <pre style="margin:20px; line-height:13px">INSERT INTO interest_list (user_id, interest_id, details)<br />
&nbsp; VALUES<br />
&nbsp; (1, 1,'somestring1'),<br />
&nbsp; (1, 2, 'somestring2'), <br />
&nbsp;...etc<br />
<span style="color:Red">IF the record exists where (user_id==1 and interest_id==1) or (user_id==1 and interest_id==2)&nbsp; ... etc THEN (dont insert but rather update)</span><br />
UPDATE interest_list<br />
&nbsp; &nbsp; SET details = CASE interest_id<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHEN 1 THEN 'somestring1'<br />
&nbsp; &nbsp; &nbsp; &nbsp; WHEN 2 THEN 'somestring2'<br />
...etc<br />
&nbsp; &nbsp; END<br />
WHERE interest_id IN (1,2...etc) AND user_id=1;</pre><br />
Its fairly complicated to explain, hopefully someone gets my question.  I am trying to accomplish this in 1 query.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ucud</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231865.html</guid>
		</item>
		<item>
			<title>What all i can include in my project??</title>
			<link>http://www.daniweb.com/forums/thread231779.html</link>
			<pubDate>Tue, 20 Oct 2009 15:01:03 GMT</pubDate>
			<description><![CDATA[hey i'm starting with a dbms project on commonwealth games . 
i want to use sql . 
can anyone please suggest me with what all i can include in my project??]]></description>
			<content:encoded><![CDATA[<div>hey i'm starting with a dbms project on commonwealth games .<br />
i want to use sql .<br />
can anyone please suggest me with what all i can include in my project??</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>richard bach</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231779.html</guid>
		</item>
		<item>
			<title>Best way to backup a database from one server to another server in SQL Server 2005</title>
			<link>http://www.daniweb.com/forums/thread231669.html</link>
			<pubDate>Tue, 20 Oct 2009 14:02:00 GMT</pubDate>
			<description>I need to know how and what steps to automate to backup a database on my production SQL server and restore that database in my test SQL server. The database exists in both servers currently. I want to set this up so it will run every day at a certain time. Does anyone know what I need to do for...</description>
			<content:encoded><![CDATA[<div>I need to know how and what steps to automate to backup a database on my production SQL server and restore that database in my test SQL server. The database exists in both servers currently. I want to set this up so it will run every day at a certain time. Does anyone know what I need to do for this.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>mldardy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231669.html</guid>
		</item>
		<item>
			<title>Database HELP....Logical and Conceptual Design</title>
			<link>http://www.daniweb.com/forums/thread231668.html</link>
			<pubDate>Tue, 20 Oct 2009 14:00:53 GMT</pubDate>
			<description><![CDATA[Hi, could someone please help me, i'm in great need of some advice. I have a sorta simple scenario from which i gotta build a database from, can someone please shed some light on the matter, no matter how small your input is. thanks 
 
The database must allow for clients to: 
- make holiday...]]></description>
			<content:encoded><![CDATA[<div>Hi, could someone please help me, i'm in great need of some advice. I have a sorta simple scenario from which i gotta build a database from, can someone please shed some light on the matter, no matter how small your input is. thanks<br />
<br />
The database must allow for clients to:<br />
- make holiday bookings, each booking may be for a number of tents, and can be<br />
complex; clients organizing family holidays may want different numbers of tents on<br />
different days as family groups come and go;<br />
- reserve (and be billed for) activities, e.g. the hire of canoes; data would include the date<br />
the canoe trip took place and the number of canoes used. Generally activities are<br />
arranged once the holidaymaker is on-site.<br />
<br />
needs to record the following data:<br />
About the client:<br />
• Name.<br />
• Address.<br />
• Telephone,<br />
• Credit card details.<br />
About the site:<br />
• For each tent its name and capacity.<br />
• For the restaurant (or other facilities) if present, its name and capacity.<br />
• For equipment, the item type (e.g. canoe or high chair) and how many of the item are<br />
held.<br />
About bookings:<br />
• It is necessary to record that a booking is made.<br />
• The cost of the booking at the time the booking is made.<br />
About billing:<br />
• The cost of items (e.g. a 2-person tent) throughout the year must be recorded.<br />
Generally this will be divided into high, mid and low season rates.<br />
• As time goes by these prices will be updated.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>mikhail96</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231668.html</guid>
		</item>
		<item>
			<title>How to Connect Access with Web Page</title>
			<link>http://www.daniweb.com/forums/thread231624.html</link>
			<pubDate>Tue, 20 Oct 2009 10:41:47 GMT</pubDate>
			<description>I have a website i want to know how to connect my website to the Interent directly.</description>
			<content:encoded><![CDATA[<div>I have a website i want to know how to connect my website to the Interent directly.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum128.html">MS Access and FileMaker Pro</category>
			<dc:creator>umairraja52</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231624.html</guid>
		</item>
		<item>
			<title>How to insert date in string format into MYSQL table as DATE data type</title>
			<link>http://www.daniweb.com/forums/thread231445.html</link>
			<pubDate>Mon, 19 Oct 2009 17:29:25 GMT</pubDate>
			<description>Hello people, 
 
Well The problem that I am facing is: 
I have a date in string format like 30 Jun 2009, how can I insert it into MYSQL table as DATE data type?  
 
I created the table and declare data type for Date column as DATE, when I insert 30 Jun 2009 as a value into the table, it becomes...</description>
			<content:encoded><![CDATA[<div>Hello people,<br />
<br />
Well The problem that I am facing is:<br />
I have a date in string format like 30 Jun 2009, how can I insert it into MYSQL table as DATE data type? <br />
<br />
I created the table and declare data type for Date column as DATE, when I insert 30 Jun 2009 as a value into the table, it becomes 00:00:00. What should I do to avoid this error.  Please suggest. Thanks<br />
<br />
Ajay</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>ajay_p5</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231445.html</guid>
		</item>
		<item>
			<title><![CDATA[Select only items that don't exist in another table]]></title>
			<link>http://www.daniweb.com/forums/thread231439.html</link>
			<pubDate>Mon, 19 Oct 2009 16:57:00 GMT</pubDate>
			<description><![CDATA[I want to select from a table only when a field repeats more than once.  For this I have: 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with...]]></description>
			<content:encoded><![CDATA[<div>I want to select from a table only when a field repeats more than once.  For this I have:<br />
<br />
 <pre style="margin:20px; line-height:13px">Select title, Count(*) As Cnt From poss_titles where Cnt &gt; 1 Group By Title Order By Cnt desc</pre><br />
But it says invalid column name cnt.  How should I refer to this dynamic field?<br />
Also, I only really want titles which dont exist in another table.  I believe a left join is required for this but I'm not too sure how to do it.<br />
Can anyone offer me some pointers?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>benkyma</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231439.html</guid>
		</item>
		<item>
			<title>Newbie Help with SQL Filter/Search</title>
			<link>http://www.daniweb.com/forums/thread231422.html</link>
			<pubDate>Mon, 19 Oct 2009 15:21:29 GMT</pubDate>
			<description><![CDATA[Hi all,  
 
I'm a newbie in sql, please can someone help me out in constructing a query. What I want to achieve is to have filter/search menu with a list of the different options/optionsvalues that applies to a particular category of products and a count of the products that possess each attribute....]]></description>
			<content:encoded><![CDATA[<div>Hi all, <br />
<br />
I'm a newbie in sql, please can someone help me out in constructing a query. What I want to achieve is to have filter/search menu with a list of the different options/optionsvalues that applies to a particular category of products and a count of the products that possess each attribute.<br />
Say under COLOR we have Black (2), Blue(17), Green(21) and under SIZE we have 10m(11), 20m(15). My tables areas follows:<br />
<br />
categories =&gt; catid, parentid<br />
products =&gt; productid, catid<br />
options =&gt; optionsid, options_name (e.g Colour, Size)<br />
optionsvalues =&gt; optionsvaluesid, optionsvalues_name (e.g Black, Blue, Green, 10m, 20m, 30m)<br />
options2optionsvalues =&gt;options2optionsvaluesid, optionsid, optionsvaluesid<br />
products_attributes =&gt; attributeid, productid, catid, optionsid, optionsvaluesid<br />
<br />
I really need your help.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>Vikk</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231422.html</guid>
		</item>
		<item>
			<title>Connection Issues with SSH</title>
			<link>http://www.daniweb.com/forums/thread231273.html</link>
			<pubDate>Mon, 19 Oct 2009 01:20:19 GMT</pubDate>
			<description><![CDATA[MySQL database server is running on ubuntu. I have installed an GUI for everybody in office to access the database called Navicat. It uses ssh to access the database. It was working on almost everybody's machine week back. Now its not working on few machines and I am not sure about the reason for...]]></description>
			<content:encoded><![CDATA[<div>MySQL database server is running on ubuntu. I have installed an GUI for everybody in office to access the database called Navicat. It uses ssh to access the database. It was working on almost everybody's machine week back. Now its not working on few machines and I am not sure about the reason for this. <br />
-I checked the connections details <br />
-The ipconfig /all shows the same dns server and gateways on computers working and not working.<br />
-I disabled all the firewalls and aniviruses on both the server and the client machine but still it is not working. I was working on that machine a week ago.<br />
I was not able to figure out the reason. Please let me know if you have any suggestions.<br />
<br />
The second problem is that I need to give remote access. I was wanting to open up the router port for this purpose which is not opening. I am not sure if this is the right way to do it from a security standpoint. Please let know if you have any views on this as well.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>zackkv</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231273.html</guid>
		</item>
		<item>
			<title>outputting too many</title>
			<link>http://www.daniweb.com/forums/thread231255.html</link>
			<pubDate>Sun, 18 Oct 2009 22:06:01 GMT</pubDate>
			<description>I am just starting to learn sql and have to questions from my homework assignment. 
The first is this: 
Write a query which will project the average rental price and number of such videos for videos of Classic movies --- BUT! You must write this without explicitly using the category code for...</description>
			<content:encoded><![CDATA[<div>I am just starting to learn sql and have to questions from my homework assignment.<br />
The first is this:<br />
Write a query which will project the average rental price and number of such videos for videos of Classic movies --- BUT! You must write this without explicitly using the category code for Classic movies; you must use the name 'Classic' in your query instead. Rename the columns to be &quot;Avg Cost - Classic&quot; and &quot;# Videos - Classic&quot;, respectively, using precisely these spaces and case.<br />
<br />
The code I wrote is:<br />
 <pre style="margin:20px; line-height:13px">select avg(vid_rental_price) &quot;Avg Cost - Classic&quot;, count(*) &quot;#&nbsp; &nbsp; &nbsp; &nbsp;  <br />
Videos Classic&quot;<br />
from movie_category, video<br />
where movie_category.category_code =<br />
&nbsp; &nbsp; &nbsp; &nbsp; (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; select category_code<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; from movie_category<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; where category_name = 'Classic'<br />
&nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; &nbsp; and vid_rental_price &lt;<br />
&nbsp; &nbsp; &nbsp; (<br />
&nbsp; &nbsp; &nbsp; &nbsp; select avg(vid_rental_price)<br />
&nbsp; &nbsp; &nbsp; &nbsp; from video<br />
&nbsp; &nbsp; &nbsp; );</pre><br />
But count is outputting a larger number then it is supposed to.  I think it is counting all of the rentals, not just the ones labeled classic.  But I am not sure how to fix this.<br />
<br />
The second question is:<br />
Using a join, (and NOT using ANY nesting or sub-selects), project the last names, first names, and date the video was due for clients who have ever rented the video with ID '130012'.<br />
<br />
and my code is:<br />
 <pre style="margin:20px; line-height:13px">prompt 2-5<br />
select distinct client_lname, client_fname, date_due, vid_id<br />
from client, rental<br />
where rental.vid_id = '130012';</pre>It is outputting more rows then it should, and outputs that all vid_id's are 130012.  I think this has to do with the join, but am not sure how to do this without a join.<br />
<br />
Thanks!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum129.html">Oracle</category>
			<dc:creator>christiangirl</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231255.html</guid>
		</item>
		<item>
			<title>mysql to sqlite</title>
			<link>http://www.daniweb.com/forums/thread231241.html</link>
			<pubDate>Sun, 18 Oct 2009 20:12:51 GMT</pubDate>
			<description><![CDATA[Could anyone lend some help? 
 
Trying to figure out how to do this in SQLite3 
 
(this is mySQL) 
 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help...]]></description>
			<content:encoded><![CDATA[<div>Could anyone lend some help?<br />
<br />
Trying to figure out how to do this in SQLite3<br />
<br />
(this is mySQL)<br />
<br />
 <pre style="margin:20px; line-height:13px">CREATE TABLE car_contacts (<br />
&nbsp; id INTEGER NOT NULL AUTO_INCREMENT,<br />
&nbsp; carriers_id CHAR NOT NULL,<br />
&nbsp; name CHAR NULL,<br />
&nbsp; phone CHAR NULL,<br />
&nbsp; phone_ext INTEGER NULL,<br />
&nbsp; fax CHAR NULL,<br />
&nbsp; email CHAR NULL,<br />
&nbsp; PRIMARY KEY(id, carriers_id),<br />
&nbsp; INDEX car_contacts_FKIndex1(carriers_id),<br />
&nbsp; FOREIGN KEY(carriers_id)<br />
&nbsp; &nbsp; REFERENCES carriers(id)<br />
&nbsp; &nbsp; &nbsp; ON DELETE NO ACTION<br />
&nbsp; &nbsp; &nbsp; ON UPDATE NO ACTION<br />
);</pre>any help would be greatly apreciated!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>lukerobi</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231241.html</guid>
		</item>
		<item>
			<title><![CDATA["Claim a slot" database design]]></title>
			<link>http://www.daniweb.com/forums/thread231224.html</link>
			<pubDate>Sun, 18 Oct 2009 18:29:02 GMT</pubDate>
			<description><![CDATA[I'm developing a web page for a friend that allows participants of a sports event to "claim" a slot in a 24 hour tennis marathon.  The marathon has room for 24 x 4 participants. 
 
My idea was to have a table with the columns "hour" [0-23], "time" and "name", and pre-fill that table with 4 rows for...]]></description>
			<content:encoded><![CDATA[<div>I'm developing a web page for a friend that allows participants of a sports event to &quot;claim&quot; a slot in a 24 hour tennis marathon.  The marathon has room for 24 x 4 participants.<br />
<br />
My idea was to have a table with the columns &quot;hour&quot; [0-23], &quot;time&quot; and &quot;name&quot;, and pre-fill that table with 4 rows for each hour that have empty time and names columns.<br />
<br />
Then, when someone fills in the form stating his name and the hour he wants to play, I'd update the table using something like<br />
<br />
 <pre style="margin:20px; line-height:13px">UPDATE slots SET time = NOW(), name = &quot;John Doe&quot;<br />
WHERE hour=14 AND name=&quot;&quot;<br />
BUT AT MOST 1 ROW</pre><br />
and then I'd check PHP's mysql_affected_rows() to see if the slot was claimed successfully. Because if 5 people are  trying to enroll for the same hour simultaneously, one of the attempts will have to fail.<br />
<br />
I can't find a way to do this. So, my design is probably incorrect? Any suggestions how to tackle this? Thanks<br />
<br />
Joris</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>jorisb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231224.html</guid>
		</item>
		<item>
			<title>Need help with primary keys in a many-to-many schema</title>
			<link>http://www.daniweb.com/forums/thread231035.html</link>
			<pubDate>Sat, 17 Oct 2009 20:48:14 GMT</pubDate>
			<description><![CDATA[Hello, 
 
I'll preface by saying this is a school project.  I just need to be pointed in the right direction. 
 
I'm trying to develop a database of books.  In and of itself, that's simple enough, but I'm also trying to implement a tagging system following this solution...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I'll preface by saying this is a school project.  I just need to be pointed in the right direction.<br />
<br />
I'm trying to develop a database of books.  In and of itself, that's simple enough, but I'm also trying to implement a tagging system following <a rel="nofollow" class="t" href="http://www.pui.ch/phred/archives/2005/04/tags-database-schemas.html#toxi" target="_blank">this solution</a>.<br />
<br />
Where I'm getting tripped up is with the fact that their solution uses one column as primary key per table.  In order to prevent duplicate books from being added to my database, I'm thinking it would make sense for my primary key in the Books table to consist of both the Author name as well as the Title (since the same author can write more than one book, and different authors can write similarly-titled books, but no one author is going to write two books with the same title).  The other two tables (Tags and TagMap) will only use a single-column primary key.<br />
<br />
Would the linked solution work if the &quot;Bookmark&quot; table used a two-column primary key?<br />
<br />
If not, do you have any better ideas for designing a table for books that would use a single-column primary key yet also prevent entry of duplicates?  ISBN is not an option since many of the books in the table are independently published and are not registered.<br />
<br />
Thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum126.html">MySQL</category>
			<dc:creator>statutoryape</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread231035.html</guid>
		</item>
		<item>
			<title><![CDATA[real client's project..please help optimizing design!!]]></title>
			<link>http://www.daniweb.com/forums/thread230917.html</link>
			<pubDate>Sat, 17 Oct 2009 11:56:43 GMT</pubDate>
			<description><![CDATA[Right, I poster earlier with a practice table I was working on. I appreciated the reply and have been working on that.. but yesterday I got a real client's project. 
 
I have been given the task of optimizing the database design.  
The database keeps track of the transactions the company makes. A...]]></description>
			<content:encoded><![CDATA[<div>Right, I poster earlier with a practice table I was working on. I appreciated the reply and have been working on that.. but yesterday I got a real client's project.<br />
<br />
I have been given the task of optimizing the database design. <br />
The database keeps track of the transactions the company makes. A transaction is made and records are stored in several different tables.<br />
<br />
<br />
These are the tables:<br />
<br />
Ledger<br />
Group <br />
User <br />
Opening Balance<br />
Transaction<br />
Transaction Type<br />
<br />
<br />
<br />
 The client would like <br />
<br />
1) the data to be stored in ONE location and not 2 different places<br />
<br />
2) to save disk space<br />
<br />
3) prevent duplicate entries being <br />
<br />
<br />
Any ideaS? I wont post the current design of the database unless necessary as I would like to try and do it all by myself but some pointers would be appreciated.<br />
<br />
Initially I was thinking of denormalization. Eradicating the multiple tables and placing all data in one table. But this might not be the best strategy. How would you do it? What practices would you use?<br />
<br />
ANY help would be appreciated. <br />
<br />
Thanks!!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum142.html">Database Design</category>
			<dc:creator>badmanmc</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230917.html</guid>
		</item>
		<item>
			<title>SELECT statement</title>
			<link>http://www.daniweb.com/forums/thread230835.html</link>
			<pubDate>Fri, 16 Oct 2009 23:40:20 GMT</pubDate>
			<description><![CDATA[I have a table for example: tb1 
with data: 
  <div class="codeblock"> <div class="spaced"> <div style="float:right; margin-right:10px"> <a href="/forums/misc.php?do=explaincode&amp;TB_iframe=true&amp;height=400&amp;width=680" class="thickbox" title="Help with Code Tags" target="_blank">Help with Code Tags</a>...]]></description>
			<content:encoded><![CDATA[<div>I have a table for example: tb1<br />
with data:<br />
 <pre style="margin:20px; line-height:13px">cse-12m<br />
cse-343k<br />
cse-mka<br />
cse-ptu<br />
cse-jpy</pre><br />
How can I write a SELECT statement to retrieve data in one of these formats:<br />
1) cse-three digits number<br />
2) cse-p%<br />
<br />
and exclude other format data, any idea?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>michael123</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread230835.html</guid>
		</item>
	</channel>
</rss>
