Hi,
I have two similar but not exactly the same tables binding to gridviews in .net
i currently use two selects to get the data i need,
can I create a view or stored proc to combine the data and display on one gridview? (preferably sorted by xdate)
my sql is
Query1
SELECT id, gsm, pin, lat, long, xtime, Org, network, type, accuracy FROM lbspings WHERE (gsm = '') Or (gsm = '') Or (gsm = '') Or (gsm = '447814486282') Or (gsm = '') ORDER BY xtime DESC;
Query2
SELECT id, deviceid AS gsm, pin, Lat, Long, xtime, Placename AS Org, network, pingtype AS type, accuracy FROM gpspings WHERE (deviceid = '') Or (deviceid = '') Or (deviceid = '') Or (deviceid = '') Or (deviceid = '') ORDER BY xtime DESC;
I'm relatively new to mssql server and have wasted days on this...
Regards,
Laldie