I want to know how to achieve the following: I want to convert a varchar to a date format but so far I'm not very successfull... My date (varchar) looks something like this: 02-02-2012 11:48 AM And I want to convert it to the following this: dd-mm-yyyy To be able to use the BETWEEN clause in the end. I have the following script but it is not correct so any help regarding this will help me a lot! SELECT Con_Consult_Date FROM Consultation WHERE CONVERT(varchar(30), Con_Consult_Date, 105) BETWEEN '01-01-2013' AND '31-12-2013' GO

Member Avatar
Member Avatar
+0 forum 1

What's the difference between char and varchar in phpmyadmin ? I am trying to decide whether to use char or varchar for name for example.

Member Avatar
Member Avatar
+0 forum 5

Hello people, I declared a field in my table : [B]my_field VARCHAR(20)[/B], but I don't want it to contain any number: can you tell me how I can do that using a trigger or using a constraint ? Thank you in advance for any help

Member Avatar
Member Avatar
+0 forum 5

hiii, i am executing the following stored procedure but having errors... create procedure check_returns @salesman varchar(10),@RCV10 int,@RCV09 int,@RCV15 int,@GPRS15 int,@RCV20 int,@RCV25FTT int,@RCV25 int,@RCV31 int,@RCV30 int,@RCV35 int,@RCV50 int,@RCV55 int,@SIM int,@VTOPSIM int,@VTOPBAL int,@THREEGSIM int, @ENTRYDATE datetime AS BEGIN if exists(select * from CardsIssued where salesman=@salesman and RCV10>@RCV10 AND RCV09>@RCV09 AND RCV15>@RCV15 AND GPRS15>@GPRS15 AND RCV20>@RCV20 AND RCV25FTT>@RCV25FTT AND RCV25>@RCV25 AND RCV31>@RCV31 AND RCV30>@RCV30 AND RCV35>@RCV35 AND RCV50>@RCV50 AND RCV55>@RCV55 AND SIM>@SIM AND VtopSim>@VTOPSIM AND VtopBal>@VTOPBAL AND ThreeGSim>@THREEGSIM and EntryDate=@ENTRYDATE ) BEGIN insert Cards_Sold values(@salesman,@RCV10,@RCV09,@RCV15,@GPRS15,@RCV20,@RCV25FTT,@RCV25,@RCV31,@RCV30,@RCV35,@RCV50,@RCV55,@SIM,@VTOPSIM,@VTOPBAL,@THREEGSIM,@EntryDate) END ELSE PRINT'CARDS RETURNED CANNOT BE GREATER THAN CARDS ISSUED' END the error coming is.... Msg 8114, Level …

Member Avatar
Member Avatar
+0 forum 3

Hi all. I'd like to ask for a way to store a MySQL table content of type VARCHAR to a CHAR variable in C. The MySQL table has three columns: ID (int), Name (varchar(22)), Salary (int). My C program should ask the user to input an ID number, and depending on the input value, the program should look up in the table whose Name it belongs to, then store that name on a variable of type CHAR. I tried doing it but an error that says "Incompatible variable types" is returned when I compile the program. The function of my …

Member Avatar
Member Avatar
+0 forum 1

The End.