i have a column in my table of type varchar (50)
i want to sort in my sql querry like this
View Complete Post
somebody please tell me how to write Sql querry to sort a column of type varchar (50) that contains number
Hi guys. I have two little problem.
I have database with one table and it has 4 rows.
1. I want to show a zero in front of all number. Actually i added but it doesn't show.
2. If i don't put any value in column is it possible to have minus for example instead of 0?
I post it like that because i can't see how to post pics directly.
P.S. The columns with numbers have checked "allow nulls".
I draw in paint so it's not so good but i think it's understandable.
10x in advance.
The following error occurred within a SharePoint 2010 document library:
As I tried to test out the new SharePoint 2010 environment I changed the metadata from a few documents within a document library. I noticed that the data from the currency und number field was incorrect from a few documents. The numbers
looked like that the decimal separator were ignored. For an example: 123.456,78 was saved as 12.345.678.
At first I thought it could be a language incompabilty but if that would be the case: Why would there be other documents which show the correct number?
I created another document library to recreate this error. And there I noticed the real reason: Every time I changed these fields from a document which was saved in the office 2007 format the error occurred. The metadata from the documents
in the office 2003 format were correct.
Has anyone a similar problem or got an idea how to solve this problem?
Frontend: Windows Server 2008 SP2 ent
I want to store IP number in a column in db but which column type should I use? Of course I can use string but isn't this a waste of storage space? Can I not store IP nr in another type in db that saves space?
I have a GridView with a column that contains rows numbers. somethign like below :#------------------1 |2 |3 |. |. |. |11 |12 |13 |. |. |. |-------------------
I've added it to the GridView with the following code :
<asp:TemplateField HeaderText="#" SortExpression="#"> <ItemTemplate> <%# Container.DataItemIndex + 1 %> </ItemTemplate></asp:TemplateField>
Now I wanna sort GridView with this column, I've done it by reading this thread. But when I sort the GridView by # column, it sorts the GridView like below :
#------------------1 |11 |12 |. |. |. |21 |22 |23 |. |. |. |-------------------
How can I fix it
is there a way to do the above, for example...I have a text column, Column A containing "172671-08-7892", I need 7892 to be extracted to another column of the type number, from there I need to divide by 2. If the remainder is 0, Column C will
be updated as Female, if the remainde is 1, Column C will be updated as Male
I have a gridview and I want to autopopulate the serial number columns. For eg, the gridview has 10 rows. The user deleted the first row. I want the gridview serial number to automatically shift down by one. Ie., 10-->9, 9-->8 and so on.
Can this be done? Any help is much appreciated!
I'm using varchar(Max) to store a text file content. It's not taking the newline character. I tried \n and char(13) etc.. whatever solution posted in the net.
ex : update test set f='This is line 1.' + CHAR(13) + CHAR(10) + 'This is line 2.'
after updating it doesn't have any newline or linebreak. Can anyone help me in this how to have linebreaks in the varchar(max) field.
Thanks a lot.
Okay, so I have a little problem developing a SQL Select Statement on a column that is formatted pretty badly. Firstly, the Database has already been created and filled with Data in a Test Environment, I'm not sure if the format is the same or has been updated in Production but since I'm only able to work with the Test Environment right now I'm stuck with using what I have. The Column in one Table shows a Snapshot of a clients account which is set to VarChar(50) but the actual data in the column is formatted like a money format (with a $ and decimal point so for example "$5,000.00" would be an entry in one Row).
What I'm trying to do is a create a WebService that will be used in a iPhone Application and one of the Methods needs to just give a quick display of the total value of all Clients with each specific company but I can't perform a SUM function on a VarChar column and I've tried to CAST and CONVERT the column into money, int, decimal and just about every format I can think of but I keep getting an error stating that I convert the data type varchar to which ever one I'm trying. I think it has something to do with the $ already listed in the Column, so I wanted to know what I could do to either remove the $ sign (like a Trim option) or if there is a better way of doing this that I can't think of.