Actually, I figured it out. It wasn't the update in the code that was the problem, but a trigger that I added to the table recently. Thanks for the help though.
This is my first time creating a DAL for a website, and I am running into a sort of hairy error. I am attempting to perform an update of a smalldatetime field in my table, but when I do so, I get an error that reads:
Conversion failed when converting character string to smalldatetime data type...
Ok, here is the skinny. I have a textbox on a webform (asp.net 2.0) that has it's text property set on load to data from a sqldatareader (I read the data into a string variable, then sent the text property equal to the string variable). This is working well, except for one problem, I want to be...
Basically, it just needs to dump the data into the spreadsheet. I don't need any formatting or anything like that, no special styles, or anything at all...
Ok, so here is the deal. I have a dataset that I want to export to excel using XML/XSLT. I have a fairly general idea about how all of this should work, and have found many resources on the 'net, but none seem to really get me going on how this whole thing should work.
So here is what I...
Ok, so here is the deal. I have a dataset that I want to export to excel using XML/XSLT. I have a fairly general idea about how all of this should work, and have found many resources on the 'net, but none seem to really get me going on how this whole thing should work.
So here is what I...
Catadmin, you were correct with your reply, I noticed it just before I read your reply, to use the Set statement before the Case, although, I didn't need to add the select at the beginning of the case. I am getting the same kind of weird output where it is only returning 7 characters, so I will...
Thank you Alex, I tried that, and it seemed to help, it trimmed the error message down some, but I still get this:
Msg 156, Level 15, State 1, Procedure fn_FixSSN, Line 6
Incorrect syntax near the keyword 'CASE'.
Msg 102, Level 15, State 1, Procedure fn_FixSSN, Line 15
Incorrect syntax near...
I am having an issue getting a case statement to work withing a custom function that I am writing to add dashes to a SSN within my application. I have written the function as such:
USE HRDev
GO
CREATE FUNCTION dbo.fn_FixSSN (@SSN as char(11))
RETURNS char(11)
AS
BEGIN
CASE LEN(@SSN)
WHEN...
I have a client on my network that is trying to send an email out to a customer and she is getting a rather odd error message/bounce back whenever she sends the message (note: I changed the @ in the email address under final recipient). No other client on the network gets this error when sending...
Ok, I figured it out...when I converted the user inputed dates, I forgot to put the "/"'s in..hehe! Here is the completed code if anyone is interested...
[code]
Option Explicit
Dim adAS400Conn As ADODB.Connection
Sub GetData()
'On Error GoTo handleerrors
Dim adFZFUELRs As ADODB.Recordset
Dim...
Ok, really starting to get frustrated now...here is my sql output...
SELECT FZUNIT as UNIT#, FZSTAT as ST, FZDV# as DIV, '20'||substr(digits(fzdate),5,2)||'/'||substr(digits(fzdate),1,2)||'/'||substr(digits(fzdate),3,2) as FROM_DATE, FZCK# as INVOICE#, FZAGNT as TRUCK, FZVNDR as STOP, FZCITY...
I will try that myself, but should note that I have had trouble with using a case statement in my sql before. For some reason, only the first when statement would be read by the server. At the time however I was trying to use a len statement, and actually, now that I think about it, I can see...
PHV...I will try your example on monday when I return to work, and see what my output is...I will convert the user input to a similar string before putting into the sql, and will post the outcome...
Ok, sorry for the skepticism, but I see your point, and finally understand. The only thing I am worried about is that the original dates on the 400 do not have 4 digit years, but 2 digit years. Also, let me see if I understand correctly...in order for this to work, my user would have to enter a...
sorry about that, it is getting late in the day for me i suppose...
SELECT FZUNIT as UNIT#, FZSTAT as ST, FZDV# as DIV, substr(digits(fzdate),1,2)||'/'||substr(digits(fzdate),3,2)||'/'||substr(digits(fzdate),5,2) as DATE, FZCK# as INVOICE#, FZAGNT as TRUCK, FZVNDR as STOP, FZCITY as CITY...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.