U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ SQL » sql using sqlexp
sql using sqlexp [message #52498] Fri, 11 October 2019 10:28 Go to previous message
mtdew3q is currently offline  mtdew3q
Messages: 181
Registered: July 2010
Location: Upstate, NY (near Canada)
Experienced Member

Hi all-

I am trying in vain to get something to work right in sqlexp that is so easy in the sqlite console.

 sqlite> select event from DATES left outer join SCHEDULE on SCHEDULE.id = DATES.fk_schedule 
  


I left out the where clause on the console. I can do this in regular sqlite with calling execute with parameters but want to do it the sqlexp way.

If you can see why sqlexp keeps giving me an assert error, please let me know!

thnx for any help,
roboloki

 
eventGrid.Clear();
Sql sql;
sql * Select(fk_schedule(id,event))
.From(DATES).LeftJoinRef(SCHEDULE)
.On(fk_schedule.Of(DATES) == id.Of(SCHEDULE))
.Where(dt==Date(2019,9,28));
while (sql.Fetch()){
	eventGrid.Add(); }  


TABLE_(SCHEDULE)
INT_ (id) PRIMARY_KEY AUTO_INCREMENT
STRING_ (loc,55)
INT_ (fk_task)
STRING_ (event,100)
END_TABLE

TABLE_(DATES)
INT (id) PRIMARY_KEY AUTO_INCREMENT
INT_ (fk_schedule) REFERENCES (SCHEDULE)
DATE_ (dt)
TIME_ (tm)
DATE_ (dt2)
TIME_ (tm2)
DATE_ (rdate)
TIME_ (rtime)
END_TABLE
  


[Updated on: Fri, 11 October 2019 10:41]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Previous Topic: PostgreSQL: JSONB Supporting by Upp
Next Topic: Missing SessionClose() in Sqlite3Session::Close()
Goto Forum:
  


Current Time: Tue Apr 28 05:18:32 GMT+2 2026

Total time taken to generate the page: 0.00496 seconds