By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,556 Members | 1,663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,556 IT Pros & Developers. It's quick & easy.

SELECT Statement

P: n/a
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 ?
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"patang" <pa****@discussions.microsoft.com> schrieb:
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 ?


Your question is not related to the VB.NET programming language. Notice
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/>

Nov 21 '05 #2

P: n/a
On Wed, 30 Mar 2005 00:35:02 -0800, patang <pa****@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)
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.