Sunday, May 19, 2013

[SQL Server 2008 issues] Conversion varchar value overflowed an int column in sql server

[SQL Server 2008 issues] Conversion varchar value overflowed an int column in sql server


Conversion varchar value overflowed an int column in sql server

Posted: 18 May 2013 03:43 PM PDT

Hi All,I get the error above when trying to update a table.UPDATE Table1 SET Field1='XYZ', WHere Field2='8880348233'Field2 is Varchar(25)I know why it happens (convert to int when compared) but I cannot find any workaround.. no CAST or Convert work.This is working (even though it is a comparison also!)Select *from Table1where Field2='8880348233'Looks like it doesn't work only for Update.Any suggestions would be highly appreciated!

Help with next date in SQL query

Posted: 17 May 2013 10:04 PM PDT

What I need is to be able to find out when a customer next called in from the date I have select with the next date & time on any Purchase, does don't need to be same. It's like using MIN & MAX but that does not work on this query as it select the same date & time for both.SELECT ID, Name, CallDateTime, Num, RCFROM HistoryWHERE (CallDateTime > CONVERT(DATETIME, '2013-05-01 00:00:00', 102)) AND (Outcome = 'Called')As you can see in the query above that all the data is in one overall table called History, this records all the purchases.So I want to know that if a customer after the 1/05/2013 called in with the outcome of called what was he next purchases date, some customer might not have come so that can stay blank. So the query is like this nowID Name CallDateTime Num RC3936803 Name1 01/05/2013 11:16:27 84 Called5211387 Name2 01/05/2013 12:14:21 604 Called5185689 Name3 01/05/2013 12:15:28 298 Called4811923 Name4 01/05/2013 12:29:36 170 Calledbut i also want it to show the below,ID Name CallDateTime Num RC Next CallDateTime Total Number Of Days3936803 Name1 01/05/2013 11:16 84 Called 04/05/2013 11:16 35211387 Name2 01/05/2013 12:14 604 Called 04/05/2013 12:14 35185689 Name3 01/05/2013 12:15 298 Called 04/05/2013 12:15 34811923 Name4 01/05/2013 12:29 170 Called 04/05/2013 12:29 3This is the query I have at the moment BUT not show how to add two more columns to it they are next called in date & time after the first called in. I want it to show the next time & date does not matter what the RC code is next visit.So I want mine output to show the below, adding the next called time & date and how many days it take from the first date to the next date,

Settings of Windows Server for SQL

Posted: 18 May 2013 05:35 AM PDT

Hello, Do you have any tips for settings of WS? Roles, memory, etc.. ? it can be different betwen performance? any link or references for interesting reading?thank you for response

No comments:

Post a Comment

Search This Blog