<?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 - MS SQL</title>
		<link>http://www.daniweb.com/forums</link>
		<description><![CDATA[Our MySQL forum is the place for Q&A-style discussions related to Microsoft SQL Server. Note we have an ASP.NET forum to use in tandem to MS SQL.]]></description>
		<language>en-US</language>
		<lastBuildDate>Thu, 15 May 2008 18:12:09 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.daniweb.com/forums/myimages/misc/rss.jpg</url>
			<title>DaniWeb IT Discussion Community - MS SQL</title>
			<link>http://www.daniweb.com/forums</link>
		</image>
		<item>
			<title><![CDATA[using joining 'line' tables]]></title>
			<link>http://www.daniweb.com/forums/thread124182.html</link>
			<pubDate>Wed, 14 May 2008 11:20:51 GMT</pubDate>
			<description><![CDATA[Hi guys,

I am a student on placement and I have created a database for a company. This database contains customer details, enquiries, orders and product details. I used joining 'line' tables to solve the many-to-many relationship between some tables but now i am having trouble using them. I have...]]></description>
			<content:encoded><![CDATA[<div>Hi guys,<br />
<br />
I am a student on placement and I have created a database for a company. This database contains customer details, enquiries, orders and product details. I used joining 'line' tables to solve the many-to-many relationship between some tables but now i am having trouble using them. I have an enquiry table and an enquiry line table, now i am trying to create a web application with a form for the user to add a new enquiry to the database so it can be searched, updated or deleted. I have tried a few things but i am getting more and more confused about how to do this as information needs to be added, updated etc from both tables.<br />
<br />
I m using ASP/Dreamweaver/SQL Server. (I realise now it would have been better to use Visual Studio but the projetc is too far along now to change)<br />
<br />
If anyone had any ideas they would be greatly apprieciated!!!<br />
<br />
Thanks<br />
GLT<br />
<br />
(I am also posting this in the ASP forum)</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>GLT</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124182.html</guid>
		</item>
		<item>
			<title>String Search in Mobile Applications</title>
			<link>http://www.daniweb.com/forums/thread124020.html</link>
			<pubDate>Tue, 13 May 2008 13:11:28 GMT</pubDate>
			<description>Hi. Can anyone give me an idea on how I can create a search box just like a search box in the contacts window in a Nokia phone?</description>
			<content:encoded><![CDATA[<div>Hi. Can anyone give me an idea on how I can create a search box just like a search box in the contacts window in a Nokia phone?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>harcaype</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124020.html</guid>
		</item>
		<item>
			<title>How to find and install IIS? URGENT. Pls. help.</title>
			<link>http://www.daniweb.com/forums/thread124013.html</link>
			<pubDate>Tue, 13 May 2008 12:50:37 GMT</pubDate>
			<description><![CDATA[Hi. Can anyone tell me how to find and install IIS? I need it for developing my mobile application with SQL Server Mobile and create a database. Or if you have any suggestions... Do you know any other way on connecting from mobile applications to databases (other than MS SQL) that won't need IIS??...]]></description>
			<content:encoded><![CDATA[<div>Hi. Can anyone tell me how to find and install IIS? I need it for developing my mobile application with SQL Server Mobile and create a database. Or if you have any suggestions... Do you know any other way on connecting from mobile applications to databases (other than MS SQL) that won't need IIS?? I'm really having a hard time looking for this component and I have yet to find it.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>harcaype</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread124013.html</guid>
		</item>
		<item>
			<title>SQL 2000 database table replication</title>
			<link>http://www.daniweb.com/forums/thread123971.html</link>
			<pubDate>Tue, 13 May 2008 09:11:51 GMT</pubDate>
			<description>Hi all, 

I hope someone can assist me with this.

I have two databases and i need to replicate (on a regular basis) a couple of tables in one into the other. Any suggestions of the best method of doing this?

with thanks

Scott</description>
			<content:encoded><![CDATA[<div>Hi all, <br />
<br />
I hope someone can assist me with this.<br />
<br />
I have two databases and i need to replicate (on a regular basis) a couple of tables in one into the other. Any suggestions of the best method of doing this?<br />
<br />
with thanks<br />
<br />
Scott</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>nortcoll</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123971.html</guid>
		</item>
		<item>
			<title>SELECT only the latest date yet within the defined period</title>
			<link>http://www.daniweb.com/forums/thread123823.html</link>
			<pubDate>Mon, 12 May 2008 10:48:35 GMT</pubDate>
			<description>Hi all experts,

Currently i have a problem coding in sql query and hope someone expert can answer me.

I have a table with the following values (simplified)

Name   in_date              out_date
able     12/03/2008        14/03/2008
bravo   10/02/2008        17/03/2008
able     18/03/2008       ...</description>
			<content:encoded><![CDATA[<div>Hi all experts,<br />
<br />
Currently i have a problem coding in sql query and hope someone expert can answer me.<br />
<br />
I have a table with the following values (simplified)<br />
<br />
Name   in_date              out_date<br />
able     12/03/2008        14/03/2008<br />
bravo   10/02/2008        17/03/2008<br />
able     18/03/2008        null<br />
<br />
<br />
Ok so my result if i want to obtain results for a period from 01/03/2008 to 31/03/2008<br />
<br />
able     18/03/2008<br />
bravo   10/02/2008   17/03/2008<br />
<br />
SO how do we code for this? thanx</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>stonyheng</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123823.html</guid>
		</item>
		<item>
			<title>problem with sql server agent</title>
			<link>http://www.daniweb.com/forums/thread123539.html</link>
			<pubDate>Sat, 10 May 2008 15:02:52 GMT</pubDate>
			<description><![CDATA[I want to make a procedure that runs at every day at certain time. I read that I have to do Scheduling, but to do it I should have sql server agent. I am using sql server express edition with sql management studio express endition. But there is no sql server agent, I don't know if its there and I...]]></description>
			<content:encoded><![CDATA[<div>I want to make a procedure that runs at every day at certain time. I read that I have to do Scheduling, but to do it I should have sql server agent. I am using sql server express edition with sql management studio express endition. But there is no sql server agent, I don't know if its there and I should  enable it, or I should use another version of sql server or another version of sql managment studio. And is there a way to do it without using the sql server agent.<br />
thanks</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Jihad</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123539.html</guid>
		</item>
		<item>
			<title>Problem using JOIN with six tables</title>
			<link>http://www.daniweb.com/forums/thread123446.html</link>
			<pubDate>Fri, 09 May 2008 21:17:00 GMT</pubDate>
			<description><![CDATA[Hello all,

I'm having some problems with joins in SQL. I hope someone here can help me out a little bit. I'm using MS SQL 2000 Server.

I have the following tables & data:

 <div class="codeblock"> <div class="spaced"> <div class="light" style="float:right"> <a...]]></description>
			<content:encoded><![CDATA[<div>Hello all,<br />
<br />
I'm having some problems with joins in SQL. I hope someone here can help me out a little bit. I'm using MS SQL 2000 Server.<br />
<br />
I have the following tables &amp; data:<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left"><b>Table: tUsers</b><br />
<br />
id&nbsp; &nbsp; &nbsp; &nbsp; location&nbsp; &nbsp; &nbsp; &nbsp; contact_id<br />
-----------------------------------------<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; 4<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 5<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 8<br />
<br />
<br />
<b>Table: tContacts</b><br />
<br />
id&nbsp; &nbsp; &nbsp; &nbsp; name<br />
-------------------------------<br />
1&nbsp; &nbsp; &nbsp; &nbsp; contact1<br />
2&nbsp; &nbsp; &nbsp; &nbsp; contact2<br />
3&nbsp; &nbsp; &nbsp; &nbsp; contact3<br />
4&nbsp; &nbsp; &nbsp; &nbsp; contact4<br />
5&nbsp; &nbsp; &nbsp; &nbsp; contact5<br />
6&nbsp; &nbsp; &nbsp; &nbsp; contact6<br />
7&nbsp; &nbsp; &nbsp; &nbsp; contact7<br />
8&nbsp; &nbsp; &nbsp; &nbsp; contact8<br />
9&nbsp; &nbsp; &nbsp; &nbsp; contact9<br />
10&nbsp; &nbsp; &nbsp; &nbsp; contact10<br />
<br />
<br />
<b>Table: tDocumentsA</b><br />
<br />
id&nbsp; &nbsp; &nbsp; &nbsp; user_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doc<br />
-------------------------------------------------------<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA1<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA2<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA3<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA4<br />
5&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA5<br />
6&nbsp; &nbsp; &nbsp; &nbsp; 8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA6<br />
7&nbsp; &nbsp; &nbsp; &nbsp; 8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA7<br />
8&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentA8<br />
<br />
<br />
<b>Table: tDocumentsB</b><br />
<br />
id&nbsp; &nbsp; &nbsp; &nbsp; user_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doc<br />
-----------------------------------------------------<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB1<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB2<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB3<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB4<br />
5&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB5<br />
6&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB6<br />
7&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB7<br />
8&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentB8<br />
<br />
<br />
<b>Table: tDocumentsC</b><br />
<br />
id&nbsp; &nbsp; &nbsp; &nbsp; user_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doc<br />
------------------------------------------------------<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC1<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 8&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC2<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC3<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC4<br />
5&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC5<br />
6&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC6<br />
7&nbsp; &nbsp; &nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC7<br />
8&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentC8<br />
<br />
<br />
<b>Table: tDocumentsD</b><br />
<br />
id&nbsp; &nbsp; &nbsp; &nbsp; user_id&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; doc<br />
------------------------------------------------------<br />
1&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD1<br />
2&nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD2<br />
3&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD3<br />
4&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD4<br />
5&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD5<br />
6&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD6<br />
7&nbsp; &nbsp; &nbsp; &nbsp; 3&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD7<br />
8&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; documentD8</code> </div>
<br />
What I want to achieve is the following (in one query):<br />
<ul><li>Get the id's of the contacts that are users (not all contacts are users) and belong to location 1</li></ul><ul><li>Display a list of all the contact-users, along with the number of documents &quot;A&quot;, documents &quot;B&quot;, documents &quot;C&quot;, and documents &quot;D&quot; that each contact has created.</li></ul><br />
So basically, the output I'm trying to get <u>should</u> look something like this:<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">name&nbsp; &nbsp; &nbsp; &nbsp; Doc_A&nbsp; &nbsp; &nbsp; &nbsp; Doc_B&nbsp; &nbsp; &nbsp; &nbsp; Doc_C&nbsp; &nbsp; &nbsp; &nbsp; Doc_D<br />
------------------------------------------------------------<br />
contact2&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 5&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 4<br />
contact5&nbsp; &nbsp; &nbsp; &nbsp; 4&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; 2<br />
contact8&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 1&nbsp; &nbsp; &nbsp; &nbsp; 0</code> </div>
<br />
I'm using the following query, but for some reason, it seems to be multiplying some values, so I'm not getting the right numbers:<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">SELECT tContacts.name, COUNT(tDocumentsA.id) AS 'Doc_A', COUNT(tDocumentsB.id) AS 'Doc_B', COUNT(tDocumentsC.id) AS 'Doc_C', COUNT(tDocumentsD.id) AS 'Doc_D'<br />
FROM tUsers LEFT OUTER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; tContacts ON tContacts.id = tUsers.contact_id LEFT OUTER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; tDocumentsA ON tDocumentsA.user_id = tUsers.contact_id LEFT OUTER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; tDocumentsB ON tDocumentsB.user_id = tUsers.contact_id LEFT OUTER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; tDocumentsC ON tDocumentsC.user_id = tUsers.contact_id LEFT OUTER JOIN<br />
&nbsp; &nbsp; &nbsp; &nbsp; tDocumentsD ON tDocumentsD.user_id = tUsers.contact_id<br />
WHERE (tUsers.location = '1')<br />
GROUP BY tContacts.name</code> </div>
<br />
The query above gives me the following (unwanted) result:<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">name&nbsp; &nbsp; &nbsp; &nbsp; Doc_A&nbsp; &nbsp; &nbsp; &nbsp; Doc_B&nbsp; &nbsp; &nbsp; &nbsp; Doc_C&nbsp; &nbsp; &nbsp; &nbsp; Doc_D<br />
-----------------------------------------------------------<br />
contact2&nbsp; &nbsp; &nbsp; &nbsp; 20&nbsp; &nbsp; &nbsp; &nbsp; 20&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 20<br />
contact5&nbsp; &nbsp; &nbsp; &nbsp; 16&nbsp; &nbsp; &nbsp; &nbsp; 16&nbsp; &nbsp; &nbsp; &nbsp; 16&nbsp; &nbsp; &nbsp; &nbsp; 16<br />
contact8&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; 0&nbsp; &nbsp; &nbsp; &nbsp; 2&nbsp; &nbsp; &nbsp; &nbsp; 0</code> </div>
<br />
I'm not very used to working with Joins, so I haven't been able to figure out what's wrong with my query.<br />
<br />
I will greatly appreciate your help. Thank you.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>recursiveNugget</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123446.html</guid>
		</item>
		<item>
			<title>Decimal VS money</title>
			<link>http://www.daniweb.com/forums/thread123404.html</link>
			<pubDate>Fri, 09 May 2008 16:29:40 GMT</pubDate>
			<description><![CDATA[This isn't a problem as I have already solved the problem, just trying to figure out why it happened.

Ok I have a field that is type money.  I wrote a stored procedure that updates this field, however, I made the datatype for the parameter to get passed in a decimal instead.  It was working fine...]]></description>
			<content:encoded><![CDATA[<div>This isn't a problem as I have already solved the problem, just trying to figure out why it happened.<br />
<br />
Ok I have a field that is type money.  I wrote a stored procedure that updates this field, however, I made the datatype for the parameter to get passed in a decimal instead.  It was working fine for a while in the development environment. Then we restored the dev from a backup of production.  I created the stored procedure the same as it was before, but now it is rounding off the field to the nearest whole number? I'm guessing it is a setting somewhere, but I can't imagine what.<br />
<br />
Any ideas?<br />
<br />
Like I said, this isn't an emergency, because I've already fixed it by changing the parameter in the stored proc to a money</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>campkev</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123404.html</guid>
		</item>
		<item>
			<title>Need help SQL Assignment</title>
			<link>http://www.daniweb.com/forums/thread123256.html</link>
			<pubDate>Thu, 08 May 2008 21:54:35 GMT</pubDate>
			<description>Just started SQL Class and I am struggling with an assignment.
Would someone be kind to give me some help please?

your task is to make a stored procedure that will only billcustomers making monthly payments higher than $500.A Customer can have multiple Plans (services for which they pay amonthly...</description>
			<content:encoded><![CDATA[<div>Just started SQL Class and I am struggling with an assignment.<br />
Would someone be kind to give me some help please?<br />
<br />
your task is to make a stored procedure that will only billcustomers making monthly payments higher than $500.A Customer can have multiple Plans (services for which they pay amonthly fee). <br />
<br />
You have to execute a billing procedure for each single active planunder an eligible customer account. Eligible customer account is anaccount that makes estimated monthly payment higher than $500.<br />
<br />
You are given 2 tables, &quot;Customers&quot; and &quot;Plans&quot;. Table &quot;Customers&quot; has columns: CustomerID, EmailAddressTable &quot;Plans&quot; has columns: PlanID, CustomerID, MonthlyPrice, isClosed,NextBillDate <br />
<br />
Also, you are given two stored procedures named &quot;Bill_Plan&quot; and&quot;Send_Email&quot;. All stored procedures returns 0 upon success and negativenumber upon failure.The &quot;Bill_Plan&quot; actually bills a customer for a plan. The storedprocedure takes one input parameter and have one output parameter.<br />
<br />
Bill_Plan<br />
@nPlanID = @PlanID,<br />
@dtNewBillDate = @NextBillDate output<br />
<br />
You have to use the output parameter @NextBillDate to updatePlans.NextBillDate with its new value.<br />
<br />
Upon successful billing you have to send en email to the customer'semail address. The &quot;Send_Email&quot; stored procedure takes two inputparameters.<br />
Send_Email<br />
@sEmailAddress = @EmailAddress,<br />
@sSubject = 'Your Invoice is Ready' <br />
You have to rollback any single billing transaction upon any kind offailure and continue billing the remaining plans. (Important!!!)<br />
<br />
<br />
Thank signed I don't want to flunk!</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>mxwebb</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123256.html</guid>
		</item>
		<item>
			<title>WildCard search in SQL Server 2005?</title>
			<link>http://www.daniweb.com/forums/thread123146.html</link>
			<pubDate>Thu, 08 May 2008 08:31:00 GMT</pubDate>
			<description><![CDATA[I have a table which have person's name as Prefix, firstname, lastname, address as three
different columns.
I want to get all records when fire a query like

SELECT * from Persons where name= 'abcd'

I want such query which can search in all three columns, it means abcd can be in
Prefix, firstname...]]></description>
			<content:encoded><![CDATA[<div>I have a table which have person's name as Prefix, firstname, lastname, address as three<br />
different columns.<br />
I want to get all records when fire a query like<br />
<br />
SELECT * from Persons where name= 'abcd'<br />
<br />
I want such query which can search in all three columns, it means abcd can be in<br />
Prefix, firstname or lastname column.<br />
<br />
Actually I have a page in which there  are some text boxes which accepts some inputs and<br />
based on that inputs displays matching records in GridView.<br />
<br />
Suppose someone entered 'Ind', so my query should find records in all three columns of name.<br />
<br />
And if someone entered record in first text box say name and nothing is entered in address text box, then<br />
the records matching with that name with all addresses should get displayed.<br />
<br />
<br />
How can I do that?<br />
<br />
Thanks in advance,</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>bhavna_816</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123146.html</guid>
		</item>
		<item>
			<title>select date/time issue</title>
			<link>http://www.daniweb.com/forums/thread123012.html</link>
			<pubDate>Wed, 07 May 2008 17:51:19 GMT</pubDate>
			<description>Hey guys,

I am trying to design a query that will return all the records based on a single date but because of the date/time data type in MS SQL 2005 it defaults to the date and the time 00:00:00 which will return no records for me.

Is it possible to ignore the time part in the select...</description>
			<content:encoded><![CDATA[<div>Hey guys,<br />
<br />
I am trying to design a query that will return all the records based on a single date but because of the date/time data type in MS SQL 2005 it defaults to the date and the time 00:00:00 which will return no records for me.<br />
<br />
Is it possible to ignore the time part in the select statement?<br />
<br />
Thanks.</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>Jon182</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread123012.html</guid>
		</item>
		<item>
			<title>Simple Question PLease URGENT</title>
			<link>http://www.daniweb.com/forums/thread122760.html</link>
			<pubDate>Tue, 06 May 2008 14:02:37 GMT</pubDate>
			<description><![CDATA[Hello All,

I'm having a little problem in witting an SQL statement.
I'm sure there is a simple solution for it but its just not clicking with me!.

Anywayz,

I'm trying to write a statement that in the FROM clause, there is a formula, and i would like to assign conditions to this formula in the...]]></description>
			<content:encoded><![CDATA[<div>Hello All,<br />
<br />
I'm having a little problem in witting an SQL statement.<br />
I'm sure there is a simple solution for it but its just not clicking with me!.<br />
<br />
Anywayz,<br />
<br />
I'm trying to write a statement that in the FROM clause, there is a formula, and i would like to assign conditions to this formula in the WHERE Clause<br />
Ex:<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">SELECT DateValue(FLD_AS_STRING) FROM Table1 WHERE ???</code> </div>
<br />
I want the statement to convert the FLD_AS_STRING field (which is in string format) to Date format, and in the same time i want to only view fields that it's FLD_AS_STRING is greater than today's date (after it is converted to Date)?<br />
<br />
How can i do that in this statement?<br />
<br />
<br />
Thanks in advance,<br />
<br />
<br />
Best Regards<br />
Firas S Assaad</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>firas489</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread122760.html</guid>
		</item>
		<item>
			<title>Maximum stored procedure, function, trigger, or view nesting level exceeded(limit 32)</title>
			<link>http://www.daniweb.com/forums/thread122719.html</link>
			<pubDate>Tue, 06 May 2008 09:39:18 GMT</pubDate>
			<description>I m retreiving some data by using cursor inside which  i m calling one recursive user defind function to retrive all child data which is linked to parent. While executing i m getting error stating :
*Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)*


How can i...</description>
			<content:encoded><![CDATA[<div>I m retreiving some data by using cursor inside which  i m calling one recursive user defind function to retrive all child data which is linked to parent. While executing i m getting error stating :<br />
<b>Maximum stored procedure, function, trigger, or view nesting level exceeded (limit 32)</b><br />
<br />
<br />
How can i increase this limit. <br />
<br />
Can any body help me?</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>punitdam</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread122719.html</guid>
		</item>
		<item>
			<title>Simple query</title>
			<link>http://www.daniweb.com/forums/thread122593.html</link>
			<pubDate>Mon, 05 May 2008 19:34:03 GMT</pubDate>
			<description>Hi,
  im going back through some SQL questions for my exams next week and I cant find a soloution for this, anyone help out?

Do a report using SQL that lists the names of categories from which items were bought. For each category the report should show the total value of the purchases (excluding...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
  im going back through some SQL questions for my exams next week and I cant find a soloution for this, anyone help out?<br />
<br />
Do a report using SQL that lists the names of categories from which items were bought. For each category the report should show the total value of the purchases (excluding VAT) and the total value of the VAT paid.. Exclude those categories where the total value of the purchases (excluding VAT) is less than €100.<br />
<br />
Country(c_id, c_name, c_vat_rate, exchange_rate)<br />
Seller(seller_id, seller_name, c_id)<br />
Category(cat_id, cat_name)<br />
Purchase(p_id, p_date, seller_id)<br />
Purchase_item(p_id, item_name, cat_id, item_price, item_qty)<br />
Fig. 1 Logical Schema</div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>dave.respawn</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread122593.html</guid>
		</item>
		<item>
			<title>Sql Sort Query....</title>
			<link>http://www.daniweb.com/forums/thread122428.html</link>
			<pubDate>Sun, 04 May 2008 22:25:32 GMT</pubDate>
			<description>Ok, I have a e-commerce store that uses stored procedures to sort products. I have figured out  how to sort my name and price but am having trouble sorting by rating bc the rating table doesnt have all the productids (only ones that have a rating) and also the rating table is in a different table...</description>
			<content:encoded><![CDATA[<div>Ok, I have a e-commerce store that uses stored procedures to sort products. I have figured out  how to sort my name and price but am having trouble sorting by rating bc the rating table doesnt have all the productids (only ones that have a rating) and also the rating table is in a different table than the products table so when I use the code below it only shows products that have a rating. Heres an example <a rel="nofollow" class="t" href="http://www.tunerplaza.com/c-304-carburetion.aspx?" target="_blank">http://www.tunerplaza.com/c-304-carburetion.aspx?</a><br />
<br />
<br />
Heres the sql code For the rating....<br />
<br />
<div style="margin:10px 20px 20px 20px"> <code style="margin:0px" dir="ltr" style="text-align:left">ELSE IF @sortEntityName = 5 BEGIN --Sort By Rating<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; INSERT #RowNumber (rating) <br />
&nbsp; &nbsp; &nbsp; &nbsp; SELECT RT.Productid <br />
&nbsp; &nbsp; &nbsp; &nbsp; FROM Rating RT <br />
&nbsp; &nbsp; &nbsp; &nbsp; GROUP BY RT.ProductID<br />
&nbsp; &nbsp; &nbsp; &nbsp; ORDER BY MIN(RT.Rating)<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; INSERT #displayorder select rating, displayorder from #RowNumber<br />
END</code> </div></div> ]]></content:encoded>
			<category domain="http://www.daniweb.com/forums/forum127.html">MS SQL</category>
			<dc:creator>tytyguy</dc:creator>
			<guid isPermaLink="true">http://www.daniweb.com/forums/thread122428.html</guid>
		</item>
	</channel>
</rss>
