|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SELECT StatementI am displaying the records from a table in a grid. The simpel SELECT
statement works fine. However, I have to use this select statement select right("00000" + Column1,2), column2, column3 FROM mytable This does not work. I mean it is not showing the 0000's in the first column. The above statement is fine if I run it in SQL Server but how do I put the above statement as a SELECT statement of oledbadapter ? "patang" <pat***@discussions.microsoft.com> schrieb: Your question is not related to the VB.NET programming language. Notice >I am displaying the records from a table in a grid. The simpel SELECT > statement works fine. However, I have to use this select statement > > select right("00000" + Column1,2), column2, column3 FROM mytable > > This does not work. I mean it is not showing the 0000's in the first > column. > The above statement is fine if I run it in SQL Server but how do I put the > above statement as a SELECT statement of oledbadapter ? that there is a separate group for .NET+database questions available: <URL:news://news.microsoft.com/microsoft.public.dotnet.framework.adonet> -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> On Wed, 30 Mar 2005 00:35:02 -0800, patang <pat***@discussions.microsoft.com> wrote:
¤ I am displaying the records from a table in a grid. The simpel SELECT ¤ statement works fine. However, I have to use this select statement ¤ ¤ select right("00000" + Column1,2), column2, column3 FROM mytable ¤ ¤ This does not work. I mean it is not showing the 0000's in the first column. ¤ The above statement is fine if I run it in SQL Server but how do I put the ¤ above statement as a SELECT statement of oledbadapter ? Not sure what you're expecting but the Right function returns the number of characters specified starting from the right side (end) of the string. In your example it returns the two right-most characters. Paul ~~~~ Microsoft MVP (Visual Basic)
Screen Mate Creation
Why have a DBNull? OutOfMemory exception loading ZIP or JPEG compressed TIFs from file SQL Question typeof Process.Start("Winword.exe") problem Outlook.Application is not defined. PIA installed and setup correctly. How do you put a hyperlinked text on a blank form Windowless application, pls help. Using Word 2000 in an application |
|||||||||||||||||||||||