The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

UFicle: Excel gurus ( by oEdLaN2009-10-26 02:58:12
  More like QUERY savvy UFies. (n/t) by oEdLaN2009-10-26 02:58:53
    i'm not good at excel by Klymer2009-10-26 03:03:33
      That's OK, cause this is MS-Access Data~Not Excel. by inittab 2009-10-26 12:24:40
Reading through the Query Text you gave...

##-- Most of the lines below are just configuration+setup_options.
XLODBC 1 DBQ=W:\FTG21.MDB;DefaultDir=W:\;
Driver={Microsoft Access Driver(*.mdb)};
DriverId=25;FIL=MSAccess;
MaxBufferSize=2048;
MaxScanRows=8;
PageTimeout=5;
SafeTransactions=0;
Threads=3;
UserCommitSync=Yes;


##-- This is the real "Query" (as you supplied)


SELECT Ordfakthuvud.Kundpostadress,
&NBSP Ordfakthuvud.Kundnummer,
      Ordfakthuvud.Kundnamn,
      Ordfakthuvud.Fakturadatum,
      Ordfaktrad.Produktnr
FROM `W:\FTG21`.Ordfakthuvud Ordfakthuvud,
      W:\FTG21`.Ordfaktrad Ordfaktrad
WHERE Ordfaktrad.Nummer = Ordfakthuvud.Nummer
    AND ((Ordfakthuvud.Fakturadatum>{ts '2000-12-31 00:00:00'})
    AND (Ordfaktrad.Produktnr=?))
ORDER BY Ordfakthuvud.Kundpostadress

##-- Don't recognize:

ANGE PRODUKTNR 12 KundpostadressKundnummerKundnamnFakturadatumProduktnr


Our products are grouped, and I would like to get
ALL products from a certain group.
If an article is named 13-HK777, it belongs to group 13.
Now, when using the query I must specify the exact article name, I can't just write '13-', but I'd like to be able to.

You Might try the following:

SELECT Ordfakthuvud.Kundpostadress,
&NBSP Ordfakthuvud.Kundnummer,
      Ordfakthuvud.Kundnamn,
      Ordfakthuvud.Fakturadatum,
      Ordfaktrad.Produktnr
FROM `W:\FTG21`.Ordfakthuvud Ordfakthuvud,
      W:\FTG21`.Ordfaktrad Ordfaktrad
WHERE Ordfaktrad.Nummer = Ordfakthuvud.Nummer
    AND ((Ordfakthuvud.Fakturadatum>{ts '2000-12-31 00:00:00'})
    AND (Ordfaktrad.Produktnr LIKE '13-%'))
ORDER BY Ordfakthuvud.Kundpostadress



Anyone knows how to get this info?
If so, when I write '13-', it's not supposed to include 'R13-' (spare parts for group 13)
[ Reply ]

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)