Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select a logical field?

Status
Not open for further replies.

Paco75

Programmer
Oct 11, 2001
239
US
Hi,

Im trying to do a select of a logical field but nothings works... let's say field1 is my logical field.

I tried these selects...
Code:
SELEC * 
FROM MYTABLE
WHERE FIELD1
INTO QMYCURSOR

SELEC * 
FROM MYTABLE
WHERE FIELD1 = 1
INTO QMYCURSOR

SELEC * 
FROM MYTABLE
WHERE FIELD1 = .T.
INTO QMYCURSOR

SELEC * 
FROM MYTABLE
WHERE FIELD1 = TRUE
INTO QMYCURSOR

But none is working... what should be the syntax to select a boolean field when = true
 
Nevermind the SQL string was badly constructed...

This way is working as i first expected
Code:
SELEC *
FROM MYTABLE
WHERE FIELD1
INTO QMYCURSOR
 
Even that last one should throw an error.

You want

INTO CURSOR qmycursor
 
Yeah mistyoed in message... in my code it was indeed INTO CURSOR qMyCursor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top