Results 1 to 9 of 9

Thread: Any one in here know Sql?

  1. #1
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts

    Any one in here know Sql?

    Cause I'm stuck.

    Bloody Sql.

  2. #2
    Sexual Force johnny02004976's Avatar
    Join Date
    Jan 2006
    Location
    Cardiff
    Posts
    2,694
    Thanks
    0
    Thanked
    0 times in 0 posts
    what you tryin to do mate??
    Contrary to the odd name and translucent-grey color, Pocari Sweat does not taste like sweat
    Hardware:

    Main PC
    - See 'My System'
    Server - Athlon XP 1700+, 1GB, 500GB HD
    Laptop - Compaq AMD Turion 64 X2, 60GB HD, 1GB
    Media Centre Shuttle - P4 3.0 Skt 775 Shuttle, 1GB, 120GB HD
    NAS - 400GB
    Home Entertainment - Xbox 360 with 37" HD LCD TV, Acoustic Energy Aegis EVO A speakers (5,1), Yamaha RXV359 AV reciever
    Media Centre II - X2 4000+, 1GB, 400Gb Vista Ultimate


  3. #3
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts
    It's sounds stupid, I'm trying to make a report based showing records inbetween two inputted dates. And it's working it out as Integer instead of dates

    SELECT *
    FROM tblproblem INNER JOIN tblequipment ON tblproblem.[Tech Number]=tblequipment.[Tech Number]
    WHERE Month([Date reported]) Between forms!frmtest!month1.value And forms!frmtest!month2.value And Year([Date reported]) Between forms!frmtest!year1.value And forms!frmtest!year2.value;

    :S

    Any clue?

  4. #4
    Anthropomorphic Personification shaithis's Avatar
    Join Date
    Apr 2004
    Location
    The Last Aerie
    Posts
    10,857
    Thanks
    645
    Thanked
    872 times in 736 posts
    • shaithis's system
      • Motherboard:
      • Asus P8Z77 WS
      • CPU:
      • i7 3770k @ 4.5GHz
      • Memory:
      • 32GB HyperX 1866
      • Storage:
      • Lots!
      • Graphics card(s):
      • Sapphire Fury X
      • PSU:
      • Corsair HX850
      • Case:
      • Corsair 600T (White)
      • Operating System:
      • Windows 10 x64
      • Monitor(s):
      • 2 x Dell 3007
      • Internet:
      • Zen 80Mb Fibre
    The Month() and Year() date functions return integer values.
    Main PC: Asus Rampage IV Extreme / 3960X@4.5GHz / Antec H1200 Pro / 32GB DDR3-1866 Quad Channel / Sapphire Fury X / Areca 1680 / 850W EVGA SuperNOVA Gold 2 / Corsair 600T / 2x Dell 3007 / 4 x 250GB SSD + 2 x 80GB SSD / 4 x 1TB HDD (RAID 10) / Windows 10 Pro, Yosemite & Ubuntu
    HTPC: AsRock Z77 Pro 4 / 3770K@4.2GHz / 24GB / GTX 1080 / SST-LC20 / Antec TP-550 / Hisense 65k5510 4K TV / HTC Vive / 2 x 240GB SSD + 12TB HDD Space / Race Seat / Logitech G29 / Win 10 Pro
    HTPC2: Asus AM1I-A / 5150 / 4GB / Corsair Force 3 240GB / Silverstone SST-ML05B + ST30SF / Samsung UE60H6200 TV / Windows 10 Pro
    Spare/Loaner: Gigabyte EX58-UD5 / i950 / 12GB / HD7870 / Corsair 300R / Silverpower 700W modular
    NAS 1: HP N40L / 12GB ECC RAM / 2 x 3TB Arrays || NAS 2: Dell PowerEdge T110 II / 24GB ECC RAM / 2 x 3TB Hybrid arrays || Network:Buffalo WZR-1166DHP w/DD-WRT + HP ProCurve 1800-24G
    Laptop: Dell Precision 5510 Printer: HP CP1515n || Phone: Huawei P30 || Other: Samsung Galaxy Tab 4 Pro 10.1 CM14 / Playstation 4 + G29 + 2TB Hybrid drive

  5. #5
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts
    If that was a solution I didn't catch it. Sorry. Grrr. Once I've nailed this, my Database is finished. FINISHED I TELL YOU. Then it's back to work on the staff intranet. *Sigh*

  6. #6
    Anthropomorphic Personification shaithis's Avatar
    Join Date
    Apr 2004
    Location
    The Last Aerie
    Posts
    10,857
    Thanks
    645
    Thanked
    872 times in 736 posts
    • shaithis's system
      • Motherboard:
      • Asus P8Z77 WS
      • CPU:
      • i7 3770k @ 4.5GHz
      • Memory:
      • 32GB HyperX 1866
      • Storage:
      • Lots!
      • Graphics card(s):
      • Sapphire Fury X
      • PSU:
      • Corsair HX850
      • Case:
      • Corsair 600T (White)
      • Operating System:
      • Windows 10 x64
      • Monitor(s):
      • 2 x Dell 3007
      • Internet:
      • Zen 80Mb Fibre
    And it's working it out as Integer instead of dates
    I can only presume you are refering to your Between criteria when you say this, hense I told you the functions you are using convert your date integer.....

    Why not pass the dates as a datetime from the front-end and use that as your criteria? Rather then converting the date to sepearate integers?

    SELECT *
    FROM tblproblem INNER JOIN tblequipment ON tblproblem.[Tech Number]=tblequipment.[Tech Number]
    WHERE [Date reported] Between forms!frmtest!Date1.value And forms!frmtest!Date2.value;
    Main PC: Asus Rampage IV Extreme / 3960X@4.5GHz / Antec H1200 Pro / 32GB DDR3-1866 Quad Channel / Sapphire Fury X / Areca 1680 / 850W EVGA SuperNOVA Gold 2 / Corsair 600T / 2x Dell 3007 / 4 x 250GB SSD + 2 x 80GB SSD / 4 x 1TB HDD (RAID 10) / Windows 10 Pro, Yosemite & Ubuntu
    HTPC: AsRock Z77 Pro 4 / 3770K@4.2GHz / 24GB / GTX 1080 / SST-LC20 / Antec TP-550 / Hisense 65k5510 4K TV / HTC Vive / 2 x 240GB SSD + 12TB HDD Space / Race Seat / Logitech G29 / Win 10 Pro
    HTPC2: Asus AM1I-A / 5150 / 4GB / Corsair Force 3 240GB / Silverstone SST-ML05B + ST30SF / Samsung UE60H6200 TV / Windows 10 Pro
    Spare/Loaner: Gigabyte EX58-UD5 / i950 / 12GB / HD7870 / Corsair 300R / Silverpower 700W modular
    NAS 1: HP N40L / 12GB ECC RAM / 2 x 3TB Arrays || NAS 2: Dell PowerEdge T110 II / 24GB ECC RAM / 2 x 3TB Hybrid arrays || Network:Buffalo WZR-1166DHP w/DD-WRT + HP ProCurve 1800-24G
    Laptop: Dell Precision 5510 Printer: HP CP1515n || Phone: Huawei P30 || Other: Samsung Galaxy Tab 4 Pro 10.1 CM14 / Playstation 4 + G29 + 2TB Hybrid drive

  7. #7
    A Straw? And Fruit? Bazzlad's Avatar
    Join Date
    Jul 2003
    Location
    The Big Rhesus House Stourbridge
    Posts
    3,072
    Thanks
    90
    Thanked
    78 times in 44 posts
    A much better plan is to let the user write in a date in dd/mm/yy and do what you said. The things you can't see when you're intensely concentrating!

  8. #8
    daft ideas inc. scottyman's Avatar
    Join Date
    Jul 2003
    Location
    Charming and Exotic Bracknell
    Posts
    1,576
    Thanks
    2
    Thanked
    3 times in 3 posts
    meh - i've got some sql which will not use an index, no matter what you try.
    using a range scan works, but I've got to get (for example) 1000 records on from the first record - but using limit in mysql won't use the index for this particular query - will do for others, but not this one!

  9. #9
    Chillie in here j.o.s.h.1408's Avatar
    Join Date
    Dec 2005
    Location
    a place called home
    Posts
    8,543
    Thanks
    757
    Thanked
    256 times in 193 posts
    • j.o.s.h.1408's system
      • Motherboard:
      • ASUS P6T Delux
      • CPU:
      • Intel core i7 920 @ 3ghz
      • Memory:
      • 3GB DDR RAM
      • Storage:
      • 1TB Samsung F1, 500GB Seagate baracuda + 320gb Seagate PATA +150GB WD PATA
      • Graphics card(s):
      • EVGA 480GTX SC edition
      • PSU:
      • Seasonic M12 600W Module PSU FTW
      • Case:
      • Lian Li PC-A7010B (the rolls royce of pc cases)
      • Operating System:
      • vista ultimate edition and windows xp
      • Monitor(s):
      • 22inch 2005FPW dell monitor
      • Internet:
      • 24mb BE There Broadband
    i know sql

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Member Database SQL / PHP
    By realm in forum Software
    Replies: 4
    Last Post: 03-01-2006, 06:48 PM
  2. SQL Server 2000
    By Fatboy in forum Software
    Replies: 37
    Last Post: 17-08-2005, 07:05 PM
  3. SQL Server 2000 SP3 Problems
    By Vini in forum Software
    Replies: 3
    Last Post: 17-08-2005, 10:52 AM
  4. SQL Server Connection string?
    By Stoo in forum Software
    Replies: 7
    Last Post: 04-05-2005, 05:48 PM
  5. My SQL, circular, inefficient ... or neither?
    By Anders in forum Software
    Replies: 14
    Last Post: 17-11-2004, 10:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •