SELECT STATEMENT

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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 ?
 
First, you are taking only the two right caracters, not four.

Second, try replacing the + concatenation operator with & instead if you are
connecting to an Access database.

Finally, I'm not really sure of understanding the true meaning of your
question.

S. L.
 
My guess: change the double quotes to single quotes. Double quotes are used
for a quoted identifier.

--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
 
Back
Top