₦airaland Forum

Welcome, Guest: Register • Login • With Google • Trending • Recent • New

Stats: 3,344,411 members, 8,511,709 topics. Date: Monday, 02 November 2026 at 08:43 AM

Toggle theme

I Need SQL Help - Programming - Nairaland

Nairaland Forum › Science/Technology › Programming › I Need SQL Help (1308 Views)

1 Reply (Go Down)

I Need SQL Help by FrankLampard(op): 12:40pm On Sep 21, 2016
Initially, I didn't want to post this here, because I know people will call me lazy, but don't worry I will do the coding myself.

My problem here is that I want to generate sales report by just supplying two dates, the startdate and the enddate.

I have my table column like this.

id - name - date
1 - Ada - 2016-10-10-12:30
2 - Bisi - 2016-10-11-22:30
3 - Aisha - 2016-10-12:20:30

I want to use two dates to pick the data in the table.

Which of the SQL syntax should I be looking at here to achieve this simple task for me.
Re: I Need SQL Help by Nobody: 12:48pm On Sep 21, 2016
I assume 'date' is using 'datestamp' as field type, if so, then the code you are looking for is:
select * from big_head where 'search_date' is between start_date and end_date;

Abeg, hungry dey wire me, i dey go FP to find snake. BTW snake has been scarce on the FP these days.
Re: I Need SQL Help by FrankLampard(op): 12:54pm On Sep 21, 2016
dhtml18:
I assume 'date' is using 'datestamp' as field type, if so, then the code you are looking for is:
select * from big_head where 'search_date' is between start_date and end_date;

Abeg, hungry dey wire me, i dey go FP to find snake. BTW snake has been scarce on the FP these days.
Thanks my Oga.

To be precise, this is what I'm looking at right?

SELECT * FROM mytabe WHERE date BETWEEN $stardate AND $enddate
Thanks bro.
Re: I Need SQL Help by Nobody: 1:14pm On Sep 21, 2016
You are welcome,

meanwhile, I still dey find snake to chop. . .
Re: I Need SQL Help by Craigston: 6:54pm On Sep 21, 2016
dhtml18:
You are welcome,

meanwhile, I still dey find snake to chop. . .
Here. I have nice ones for you. You can eat them alone or in combination with other food items. U fit take dis type sip garri, cook egusi soup, eat beans. In fact, just try it out and thank me later.

@FrankLampard

You can download the document for your SQL flavour for easy reference whenever you need it. I hope you don't mind joining dhtml18 at the table. He's not a greedy fellow and he has a nice snake meal ready.

Re: I Need SQL Help by Nobody: 7:47pm On Sep 21, 2016
Ahhhhhh!!!! mysql->configure->dining_table->begin_feasting('thanks!');
1 Reply

Urgent Help Needed On How To Save Fingerprint To Sql Using U Are U 4500 And Java • SQL Server • Help!!! Login Failed For User in SQL Server • 2 • 3 • 4

Programmers Required • Developer In Imo State Needed • First Bank Launches Chat Banking On Whatsapp