Hi,I'm having a few problems with my forms saving things like £ signs.I'm trying to store all my data in plain text with-in a MS SQL 2000 database, but for some reason certain characters are being automatically removed. I don't really want to use the HTML code for these characters so was wondering if anyone know how I could stop these characters automatically being removed.Many thanks in advance.Below is the code I'm using to insert the text to the database:------------Dim MyConnection9 As New SQLConnection(ConfigurationSettings.AppSettings("ConnectionString")) Dim MySQL9 as string MySQL9 = "INSERT INTO NEWS_ARTICLES " & _ "(NewsTitle, NewsText, NewsDate, NewsShow) " & _ "VALUEs (@title, @text, @date, @show)" Dim Cmd9 as New SqlCommand(MySQL9, MyConnection9) Dim strtitle, strtext, strimage, strdate, strshow strtitle = txttitle.Text strtext = txtText.Text strdate = DateTime.Now strshow = ddlShow.SelectedItem.Value cmd9.Parameters.Add(New SqlParameter("@title", strtitle)) cmd9.Parameters.Add(New SqlParameter("@text", strtext)) cmd9.Parameters.Add(New SqlParameter("@date", strdate)) cmd9.Parameters.Add(New SqlParameter("@show", strshow)) MyConnection9.Open() cmd9.ExecuteNonQuery MyConnection9.Close()------------Regards,Rich
When creating a new disk partition for SQL Server on a SAN (RAID 5) do you use Diskpart with the Align= parm to keep from doing two physical I/O operations for each logical I/O?
I have run into what appears to be a strange bug (or I am expecting too much) in SQL Reporting Services.
I have a field with a dollar amount. If the dollar amount = 0, then the users want "NA" to display. I have this set-up correctly.
I have now found that if the dollar amount is displayed, they want the text box right aligned, and if the "NA" is displayed, then they want the text box to be center aligned.
I put the following expression in the "TextAlign" property setting...
Code Block =IIF(Field.value = 0, Center, Right)
Now the IIF function is available in my expression window, and so is "Center" and "Right". But when I try to run the report, I get the error that "Center" is not declared.
So maybe this just is not possible in SQL Reporting Services, but I wanted to check before I told the users "no can do".
BTW, I tried "Left", "Right", and "General" in place of "Center" and got the same error.
I have an Expression with two different Texts. I would life for the Left part to be Left Aligned and the Right Part be Right Aligned.
Region 5 Region 2 7
However I can only use spaces and it shows up like this
Region     5 Region2     7
It counts the number of spaces between the first text and second. I want it to be normalized so I figured left and right align. I have tried placeholders but the placeholders only accept 1 align. When i change the second placeholder alignment it also changes the first alignment.
I have a query where I have to use the convert function to return the unitprice as a decimal with 2 digits to the right of the decimal and a $ to the left of the number like 10 should be $10.0o. How do i insert the $. this is my code so far:
SELECT CONVERT(varchar, UnitPrice, 1) AS varchartotal FROM dbo.[Order Details]
I was wondering what is the best way to have a amount paid total from amounts entered to a specific id or column? I am using SQL 2005. I need to be able to tally the total amount paid and put that value in another column called amount paid. Any help would be great. Thanks,
I'm using the SSRS report designer within VS2005 and I have a .rdl report that I have placed a background form as an image background. I then have text placed on top of the form, the problem is that everything is aligned within the report designer layout view but when I go to view the report in report preview the text no longer remains vertically aligned within the background form.
This is very frustrating, and almost makes it impossible to marry up a form with report data. Any help would be appreciated.
Generally, what would be a good start to model and make predictions based on the following.
Even Dollar Transactions €“ Including transactions that end in $0 or $50 with a Total Transaction Amount between $400 and $5000.
I have a table called Transaction with a BillingAmount column.
I've gone through the SQL Server 2005 Data Mining Tutorial (which uses a discrete prediction BikeBuyer yes or no) and read a lot of Data Mining with SQL Server 2005. Neither of these give good, complete, methodical examples of selecting inputs and targets and making predictions; especially for continuous columns.
I think I'm generally struggling with the concepts of selecting (continuous?) predictable attributes and calculating predictions based on the results. Are there any examples of a scenario similar to the above that I can reference? or just some advise.
How do I count the number of positive dollar values in a query? I have various negative and positive dollar values and want to count how many positive I have then I will know how many are negative. I cannot put >0 or >0.00 in the where because it still returns everything cuz the programmer set the datatype to be money
I have amount field in my table as decimal. I need a query to display the amount with dollar or euro symbol based on country selection. The country also in same table.
For example If country is US then Amount $1200, If country is UK then Amount €1200.
GridView_1 Category Name SubCategory Name Amount Construction Construction 2,877.00 Design Design 0.00 Soft Cost Inspection 0.00
GridView_2 Category Name SubCategory Name Amount Construction Construction 2,800.00 Construction Contingency 300.00 Design Design 500.00 Soft Cost Inspection 980.00 Soft Cost Survey 145.00 Soft Cost Testing 720.00 Soft Cost Management 1000.00 Soft Cost Other Costs 10,000.00
QUESTION: How could I UNION the two result sets together and where the Category Name and SubCategory Name are equal for GridView1 and GridView2, show the difference in the Amount column.
This is the result I am looking for.
Category Name SubCategory Name DIFFERANCE Construction Construction 77.00 = (GridView1 - GridView2) Construction Contingency 300.00 Design Design 500.00 Soft Cost Inspection 980.00 Soft Cost Survey 145.00 Soft Cost Testing 720.00 Soft Cost Management 1000.00 Soft Cost Other Costs 10,000.00
I am trying to do it on the back end. Though, if you have a clever way to produce a resulting gridview in C# with the results I need, I am all game! This is what I have so far: (TSQL code)
I have a table of orders. I was asked to count the orders that fall into specific dollar buckets. Normally I would use a CASE statement for this, but in this case, there are over 100 different buckets!
For example, I need to count the orders in $5 increments up to $400. The CASE statement would look like this:
Code: CASE WHEN sum(revenue) BETWEEN 0.01 AND 5.00 THEN [0.01 to 5.00] WHEN sum(revenue) BETWEEN 5.01 AND 10.00 THEN [5.01 to 10.00] ... WHEN sum(revenue) BETWEEN 395.01 AND 400.00 THEN [395.01 to 400.00]
Is there an easier way to do this, maybe with a loop?
I am trying to add a field (bank_chk_amt] from a table in to my query to bring in a dollar amount....I originally had this below
SELECT dbo.CBPAYMENT.REFERENCE_NO, 'CCMCCHBREF' AS Literal, RTrim([description]) + ', ' + [bank_chk_amt] + ', ' + convert(char(10),[check_date],101) + ', ' + 'Refund check sent to ' + [payee_name] AS [Free Text] FROM dbo.CBPAYMENT;
but I would get "Error converting data type varchar to numeric".So my co-worker modified it and added (str([bank_chk_amt]) to my query which worked, but I noticed it dropped of the cents. So instead of 80.35 it would show 80 And I noticed it rounded 100.50 to 101...How can I bring in the full dollar amount and without adding?