View counter


How can i count a view in MS ACCESS database, by that i mean when i create a custom view, every row to have Incremental Counter

For example if i have table like

ID:Autonumber, Text:text
1, foo
2, boo
3, goo
4, doo
5, hoo

And use SQL: SELECT (!!\tRuntimeID!!\t), ID, Text FROM TableName Where ID > 2
To get something like this:

RunTimeID, ID, Text
1, 3, goo
2, 4, doo
3, 5, hoo


how can i make that RunTimeID column\t
Posted On: Thursday 25th of October 2012 11:19:53 PM Total Views:  110
View Complete with Replies

RELATED TOPICS OF MYSQL PROGRAMMING LANGUAGE




Getting a variable into a MySQL view

One of my challenges is that I do not know the propper words to search for what I want to know. I know what I want to do but not how to do it or what search terms to find the help. I want to select information from multiples tables using a view to retrieve all the information for a given Invoice ID. The Invoice info is in 1 table, a list of invoiceItems is in a second table, any possible invoice credits in a third table & finally any possible payments in a fourth table. I can write the query & display all the information for any given InvoiceID (which is the foreign Key I use to identify what goes with what), but what I don't know how to do is to be able to pass in an InvoiceID as a variable when I am going to execute the view. I keep a text-file & change the Invoice number and run the query as I need to. But it would be nice to be able to just pass in an argument (I hope that explains wht I mean) ... Is this possible using a view in MySQL OR can you point me in the direction of where in the manual I need to read to figure out how to do this Like I said, diction & phraseology is a challenge because I am self-taught & sometimes I know what I want but don't know what it is called.
VIEWS ON THIS POST

85

Posted on:

Friday 12th October 2012
View Replies!

Simplifying a query--any way to do this without using a view?

Here's something that's been driving me mad, so I'm hoping someone will be able to point me in the right direction (or tell me it's impossible). I have 2 tables "feeds" which has 2 columns, feedID and feedName "subscriptions" which also has 2 columns, userID and feedID So, I'm trying to build a query that joins these two tables and retrieves all of the feeds that a specified user wasn't subscribed to. Here's a bit of code I wrote that works, but is it possible to accomplish the same thing without using a view My SQL sense tells me there has to be, but I'm just not seeing it. Any help at all is appreciated. Code: CREATE VIEW usersubscriptions AS SELECT * FROM users WHERE userid = 1 SELECT feeds.feedID, feeds.name FROM feeds LEFT JOIN usersubscriptions ON feeds.feedid = usersubscriptions.feedid WHERE userid IS NULL
VIEWS ON THIS POST

119

Posted on:

Friday 12th October 2012
View Replies!

How to view database backup records

I have two backups for my database. I want to view the data in each backup. How can I do this I use EMS SQLmanager for viewing the db that is online. BTW, following is the reason that I want to view the data. The db is backed up once every three hours using a cron job. Before Monday, each b/u file was about 14MB. Then beginning with one b/u on Monday, each b/u file was about 7MB. I want to view the number of records in each b/u to determine where the difference is. TIA! Leafgreen
VIEWS ON THIS POST

126

Posted on:

Friday 12th October 2012
View Replies!

Please tell me good reasons to create updateable view

Could anyone please tell me good reasons to create updateable view why don't we update directly to the underlying tables instead of view
VIEWS ON THIS POST

202

Posted on:

Friday 12th October 2012
View Replies!

How to view Slow Query Log ?

I searched here, google and MySQL docs but did not find an answer. I'm using MySQL-Front from a Windows platform to administer a remote database. The remote server doesn't have phpMyAdmin or anything like that. MySQL-Front reports 133 Slow Queries and an average of 15 queries per second. But I dont' know how get more information than that. Can someone please advise me
VIEWS ON THIS POST

103

Posted on:

Friday 12th October 2012
View Replies!

using Northwind database to Create a view (was "Can You lead on the Right Track...")

I am using Northwind database to Create a view showing every order that was shipped to Spain. Name the destination column 'DestinationSpain'. Include code that checks if the view already exists. If it does, it should be dropped and re-created. Here is my script: use Northwind GO /* STEP 2, #1 */ /* does it exist, if so drop it */ if exist (select * from dbo.sysobjects where id = object_id(N'[dbo].[OrdersToSpain]') and OBJECTPROPERTY(id, N'IsView') = 1) drop view [dbo].[OrdersToSpain] GO /* Create the View */ create view "OrdersToSpain" AS SELECT Orders.OrderID AS Order_ID, Orders.CustomerID AS Customer_ID, Orders.OrderDate AS Ordered_Date. Orders.ShippedDate AS Shipped_Date, Orders.ShipCountry AS DestinationSpain FROM Customers INNER JOIN Orders ON Customers.CustomerID = Orders.CustomerID WHERE Orders.ShipCounty LIKE '%SPAIN%' GO Here are the errors I am getting: Server: Msg 156, Level 15, State 1, Line 5 Incorrect syntax near the keyword 'select'. Server: Msg 170, Level 15, State 1, Line 6 Line 6: Incorrect syntax near ')'. Server: Msg 170, Level 15, State 1, Procedure OrdersToSpain, Line 7 Line 7: Incorrect syntax near '.'.
VIEWS ON THIS POST

87

Posted on:

Friday 12th October 2012
View Replies!

Which is faster for a search - a table or a view?

I have a VIEW in mysql that is created from 4 different unrelated tables with a UNION there is over 25000 records in the view. It was created solely for the purpose of doing a search. There are 4 columns and 2 are the main ones for the searching. It is rather slow, so I was thinking of converting the view to a table as the view will never change - it is in an old database that serves the searches of archived records only. Will converting the VIEW to a TABLE speed up the search If so, how do I do the conversion Thank you for your time.
VIEWS ON THIS POST

126

Posted on:

Sunday 21st October 2012
View Replies!

Lpad in views

I'm having a little silly difficulty here. Code SQL: SELECT LPAD(`Tickets`.`Row`,2,'00') AS `Row` FROM (`Tickets`) If I run this as a query I get the expected results (01,02,03,04,05,06....) However the same thing as a view: Code SQL: CREATE VIEW `blarg` AS SELECT LPAD(`Tickets`.`Row`,2,'00') AS `Row` FROM (`Tickets`) I get this result 0x3238 all the way down my table. I'm assuming I need to convert this number in order for it to work, any ideas
VIEWS ON THIS POST

88

Posted on:

Sunday 21st October 2012
View Replies!

Mysql:Table is not exist though i am viewing table name?

, In my application, all tables are fine. but now i wanna to add one more tables. So i run the script is as follows: CREATE TABLE `tbl_lecture_question` ( `LQ_id` bigint(20) NOT NULL auto_increment, `lecture_id` bigint(20) NOT NULL, `Question` varchar(500) NOT NULL, `regDate` datetime NOT NULL, PRIMARY KEY (`LQ_id`) ) The table created successfully. Now when i want to insert records in here it shows INSERT INTO tbl_lecture_Question( lecture_id, Question, regDate ) VALUES ( '24', 'Which is our national Bird', NOW( ) ) MySQL said: #1146 - Table 'jittzone_manasda.tbl_lecture_Question' doesn't exist What is the problem Why data is not inserting
VIEWS ON THIS POST

87

Posted on:

Sunday 21st October 2012
View Replies!

Why won't this view update?

, and thanks in advance for any help. I created a view that I'd like to be able to update the underlying table with, and I'm not sure what this issue is. (I realize this is bad database design, it's necessary for what I'm trying to do) The underlying table: CREATE TABLE `expireds` ( `ID` int(11) NOT NULL auto_increment, `First_Owner_First_Name` varchar(20) default '0', `First_Owner_Last_Name` varchar(20) default '0', `Second_Owner_First_Name` varchar(20) default '0', `Second_Owner_Last_Name` varchar(20) default '0', `MLS#` varchar(10) default '0', `Status` varchar(10) default '0', `OMD` date default NULL, `FollowUpDate` date default NULL, `date_last_checked` date default NULL, `Site_Address` varchar(30) NOT NULL default '0', `Site_Unit` varchar(10) default '0', `Site_City` varchar(20) default '0', `Site_State` varchar(2) default '0', `Site_Zip` varchar(6) default '0', `Mail_Address` varchar(30) default '0', `Mail_Unit` varchar(10) default '0', `Mail_City` varchar(20) default '0', `Mail_State` varchar(2) default '0', `Mail_Zip` varchar(6) default '0', `Parcel_Number` varchar(20) default '0', `Comments` varchar(9999) default '0', `Met` tinyint(1) default '0', `MetDate` date default NULL, `Phone1` varchar(15) default '0', `Phone2` varchar(15) default '0', `Phone3` varchar(15) default '0', `Phone4` varchar(15) default '0', `Phone5` varchar(15) default '0', `Phone6` varchar(15) default '0', `Phone7` varchar(15) default '0', `Phone8` varchar(15) default '0', `Phone9` varchar(15) default '0', `Phone10` varchar(15) default '0', `Phone11` varchar(15) default '0', `Phone12` varchar(15) default '0', `Phone13` varchar(15) default '0', `Phone14` varchar(15) default '0', `Phone15` varchar(15) default '0', `DNC` tinyint(1) default NULL, PRIMARY KEY (`ID`), UNIQUE KEY `Site_Address` (`Site_Address`), UNIQUE KEY `Site_Address_2` (`Site_Address`), UNIQUE KEY `Site_Address_3` (`Site_Address`), UNIQUE KEY `Site_Address_4` (`Site_Address`), UNIQUE KEY `Site_Address_5` (`Site_Address`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; And the view: CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `expireds_view` AS select `expireds`.`First_Owner_First_Name` AS `First_Owner_First_Name`, `expireds`.`First_Owner_Last_Name` AS `First_Owner_Last_Name`, `expireds`.`Second_Owner_First_Name` AS `Second_Owner_First_Name`, `expireds`.`Second_Owner_Last_Name` AS `Second_Owner_Last_Name`, `expireds`.`MLS#` AS `MLS#`, `expireds`.`Status` AS `Status`, `expireds`.`OMD` AS `OMD`, `expireds`.`FollowUpDate` AS `FollowUpDate`, `expireds`.`Site_Address` AS `Site_Address`, `expireds`.`Site_City` AS `Site_City`, `expireds`.`Site_State` AS `Site_State`, `expireds`.`Site_Zip` AS `Site_Zip`, `expireds`.`Comments` AS `Comments`, `expireds`.`Met` AS `Met`, `expireds`.`Phone1` AS `Phone1`, `expireds`.`Phone2` AS `Phone2`, `expireds`.`Phone3` AS `Phone3`, `expireds`.`Phone4` AS `Phone4`, `expireds`.`Phone5` AS `Phone5`, `expireds`.`Phone6` AS `Phone6`, `expireds`.`Phone7` AS `Phone7`, `expireds`.`Phone8` AS `Phone8`, `expireds`.`Phone9` AS `Phone9`, `expireds`.`Phone10` AS `Phone10`, `expireds`.`Phone11` AS `Phone11`, `expireds`.`Phone12` AS `Phone12`, `expireds`.`Phone13` AS `Phone13`, `expireds`.`Phone14` AS `Phone14`, `expireds`.`Phone15` AS `Phone15` from `expireds` where ((_latin1'Met' = 0) or (_latin1'FollowUpDate' = curdate())); I tried changing out all the NULL fields to default to 0's (read that view can't contain fields w/o default values), same result. Went over the requirements for creating an updatable view in the documentation, and I don't see an issue. What am I missing
VIEWS ON THIS POST

91

Posted on:

Wednesday 24th October 2012
View Replies!

How to view data based on range

hi . I would like to ask on how to view data based on specific range. I have many data in dbase. example: Year Sales 2000 8976 2001 2345 2002 3324 2003 2223 2004 2234 2005 1123 2006 5563 ........ ..... ..... .... 2011 3345 ...... .... ... but, what should i do if i just want to display data only last 5years even i access the system during any years in future. can someone help me plizz..
VIEWS ON THIS POST

200

Posted on:

Wednesday 24th October 2012
View Replies!

Query For Functionality: Users who viewed this page also viewed this page

, I'm trying to figure out the best way to do a "Users who viewed this page, also viewed this page" based off data from a mysql DB. I should be able to make this work with just the PageID and UserID which are both columns in the same table. So far I was thinking I could query all the users who viewed PageID 15. Lets say that returns UserID's 1,2,4,6. I Could then run a separate query and do the totals in PHP. So if user 1 viewed page 3,4,5 and user 2 viewed 3,7,8. Then so far the results should report back that page 3 is the most relevant page so far to return. Obviously VERY inefficient. But I hope this helps to explain what I'm trying to do. If anyone could get me started on what command or type of join to use for this then I could probably do the rest. Maybe I'm over complicating thing.
VIEWS ON THIS POST

206

Posted on:

Wednesday 24th October 2012
View Replies!

Complicated query: Please help review my indices.

I've been working on this query for quite some time now. I've gotten the response time to 60ms. Suddenly, my query has jumped to between 2-8 seconds. Before I raise a red flag with infrastructure, I'd like help reviewing my indexes. This table contains pages for my site, and is set up as a parent-child relationships, within sections. The site will be redesigned in the next few months, but for now, this has to work. This query selects the navigation (the related pages) for the currently viewed page: Code: SELECT p.pageID, p.pageIDparent, p2.filePath, p2.fileName, p2.navTitle, p2.navOrder, p2.menuItemID, p2.dirID, p2.isSecure, concat( p2.filePath, p2.fileName ) AS location FROM pages p LEFT JOIN pages p2 ON ( p.uuid = p2.uuid ) WHERE 1 AND p2.isDeleted =0 AND p.pageStatusID =1 AND p2.pageStatusID =2 AND p2.displayInNav =1 AND (p.pageIDparent =0 OR p2.filePath LIKE '/productsservices/') AND p2.menuItemID =4 AND p2.pageTypeID !=999ORDER BY p.pageIDparent, p2.navOrder The table looks like this: Code: CREATE TABLE pages ( pageID int(11) unsigned NOT NULL auto_increment, pageIDpreview int(11) unsigned NOT NULL default '0', pageIDparent varchar(35) NOT NULL default '', uuid varchar(35) NOT NULL default '', title varchar(128) NOT NULL default '', subTitle varchar(255) default NULL, content text, includeFile varchar(255) default NULL, pageGraphic varchar(128) default NULL, filePath varchar(255) NOT NULL default '', fileName varchar(128) NOT NULL default '', displayInNav tinyint(1) NOT NULL default '1', navOrder tinyint(3) unsigned NOT NULL default '1', navTitle varchar(128) NOT NULL default '', showEmail tinyint(1) unsigned NOT NULL default '1', showPrint tinyint(1) unsigned NOT NULL default '1', showPDFFooter tinyint(1) NOT NULL default '0', createdByUserID int(11) unsigned NOT NULL default '0', modifiedByUserID int(11) unsigned default NULL, deletedByUserID int(11) unsigned default NULL, createdDateTime datetime NOT NULL default '0000-00-00 00:00:00', modifiedDateTime datetime NOT NULL default '0000-00-00 00:00:00', deletedDateTime datetime default NULL, isSecure tinyint(1) unsigned NOT NULL default '0', isDeleted tinyint(1) unsigned NOT NULL default '0', needLogin tinyint(1) unsigned NOT NULL default '0', dirID smallint(5) unsigned NOT NULL default '0', pageGraphicLayoutID tinyint(3) unsigned NOT NULL default '0', pageStatusID tinyint(3) unsigned NOT NULL default '0', pageTypeID tinyint(3) unsigned NOT NULL default '0', pageDisclaimerID smallint(4) unsigned NOT NULL default '0', menuItemID smallint(10) unsigned NOT NULL default '0', pubID varchar(4) NOT NULL default '0', PRIMARY KEY (pageID), KEY createdByUserID (createdByUserID), KEY modifiedByUserID (modifiedByUserID), KEY dirID (dirID), KEY pageGraphicLayoutID (pageGraphicLayoutID), KEY pageDisclaimerID (pageDisclaimerID), KEY uniqueFileName (filePath,fileName,pageStatusID), KEY navOrder (navOrder), KEY parent (pageIDparent), KEY pageStatusID (pageStatusID,isDeleted), KEY pageIDpreview (pageIDpreview), KEY dirID_2 (dirID,pageStatusID,isDeleted), KEY pageIDparent (pageIDparent,navOrder), KEY pageStatusID2 (pageStatusID), KEY pubID (pubID), FULLTEXT KEY filePath (filePath,fileName) ) TYPE=MyISAM PACK_KEYS=1 AUTO_INCREMENT=3018 ; LIke I said before, the query is running too slow for some reason. Please help me correct my indices.
VIEWS ON THIS POST

84

Posted on:

Wednesday 24th October 2012
View Replies!

enter user phone number and view record (was "MySQL query errors")

Originally this query is from a store locator script. User would enter a zipcode and miles radius to search database for, and return all locations in selected radius. Originally there were two tables in the database (dealers and zipcode). The dealers table contained addresses of dealers, including zipcodes. The zipcode table contained the U.S. Postal zip codes longitudes and latitudes. I am trying to accomplish is for users to enter their phone number only, and view their record. I have created one table with all information, that I want this query to search and list results from. Database Name: orders Table Name: orders Search Field Name: orders_phone Results View Fields orders_name orders_last orders_model orders_modelqty orders_leather orders_production orders_tracking Below is the original query: PHP Code: OpenMethod@4-AEAF9C81 \t\tfunctionOpen() \t\t{ \t\t\t\t$this->CCSEventResult=CCGetEvent($this->CCSEvents,"BeforeBuildSelect"); \t\t\t\t$this->CountSQL="SELECTCOUNT(*)FROMdealers,zipcode,zipcodeASzipcodesearch". \t\t\t\t"WHERE(zipcodesearch.ZIPCode='".$this->SQLValue($this->wp->GetDBValue("3"),ccsText)."')". \t\t\t\t"AND(dealers.Dealer_Zip=zipcode.ZIPCode)AND((3963*acos(truncate(sin(zipcodesearch.latitude/57.2958)*sin(zipcode.latitude/57.2958)+cos(zipcodesearch.latitude/57.2958)*cos(zipcode.latitude/57.2958)*cos(zipcode.longitude/57.2958-zipcodesearch.longitude/57.2958),8)))
VIEWS ON THIS POST

137

Posted on:

Wednesday 24th October 2012
View Replies!

Mysql view using workbench in Linux

! I'm new with mysql in a linux environment.So i need to create a view in linux using mysql workbench.Once i create a view using workbench,is says there is a DDL syntax error. Code MySQL: DROP VIEW IF EXISTS `transport`.`ol_account`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `transport`.`ol_account` AS (select `account_n1`.`JobN0` AS `intJEntryNo`,`account_n1`.`JobDate` AS `dtDate`,`account_n1`.`mainAccID` AS `mainAccID`,`account_n1`.`subAccID` AS `subAccID`,`account_n1`.`description` AS `description`,`account_n1`.`crAmo` AS `debit`,`account_n1`.`crDeb` AS `credit` from `account_n1`); This is the code i used.But in Windows format using navicat it works superbly.is it wrong Can anyone please help me to come out from this mess.
VIEWS ON THIS POST

168

Posted on:

Thursday 25th October 2012
View Replies!

Creating a calendar view

I've got a task at work to create a calendar view in mysql. The frontend used is filemaker which doesn't support query results. The only workround is to create a view and use as table. What I need is a full calendar view for each date found in appt table for each clinic. Meaning if there is an appoinment in appt table for a given date, I need to produce a full calendar view with all timeslots from timeslots table and then selecting appt rows as columns corresponding each timeslot or null. I'm attached pdf of end result. Don't know where to start. I did some googling and found this thread which is similar to what I need but its for only date specified in the where clause. There are preety good senior members on this site. Hoping someone will be able to help me. Thank you all, http://forums.mysql.com/read.php108...327#msg-395327 Select ap.id, ts.time_slot, ap.clinic, ap.appt_date, If(ap.doctor='SX', ap.client, null) as Doc_1, If(ap.doctor='AOH', ap.client, null) as Doc_2, If(ap.doctor='MAN', ap.client, null) as Doc_3, If(ap.doctor='DBC', ap.client, null) as Doc_4 from timeslots ts left outer join appt ap on ts.time_slot = ap.time_slot and ts.clinic = ap.clinic Group By ts.time_slot, ts.clinic Order By ts.id CREATE DATABASE `temp` CHARACTER SET 'latin1' COLLATE 'latin1_swedish_ci'; USE `temp`; DROP TABLE IF EXISTS `appt`; CREATE TABLE `appt` ( `id` int(20) NOT NULL AUTO_INCREMENT, `clinic` char(1) CHARACTER SET utf8 DEFAULT NULL, `doctor` varchar(20) CHARACTER SET utf8 DEFAULT NULL, `appt_date` date DEFAULT NULL, `time_slot` varchar(20) DEFAULT NULL, `client` varchar(255) CHARACTER SET utf8 DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1; DROP TABLE IF EXISTS `timeslots`; CREATE TABLE `timeslots` ( `id` int(20) NOT NULL AUTO_INCREMENT, `clinic` char(1) DEFAULT NULL, `time_slot` varchar(20) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1 ROW_FORMAT=COMPACT; INSERT INTO `appt` (`id`, `clinic`, `doctor`, `appt_date`, `time_slot`, `client`) VALUES (1,'a','SX','2010-11-24','8:00 am','Bobbie Smith\rTest'), (2,'a','AOH','2010-11-24','8:30 am','Molly Matthews\rGot gammy leg'), (3,'a','MAN','2010-11-24','9:00 am','client 1'), (4,'a','MAN','2010-11-24','9:30 am','client 2'), (5,'a','MAN','2010-11-24','10:00 am','client 3'), (6,'a','MAN','2010-11-24','11:00 am','client 4'), (7,'a','MAN','2010-11-24','11:30 am','client 5'), (8,'a','MAN','2010-11-24','12:00 pm','client 6'), (9,'a','MAN','2010-11-24','12:30 pm','client 7'), (10,'a','MAN','2010-11-24','1:00 pm','client 8'), (11,'a','MAN','2010-11-24','1:30 pm','client 9'), (12,'a','MAN','2010-11-24','02:00 pm','client 10'), (13,'a','MAN','2010-11-24','02:30 pm','client 11'), (14,'a','DBC','2010-11-24','8:30 am','Digby Smith\rjhgthjju'), (15,'a','MAN','2010-11-24','10:30 am','Jake Smith\rStandard Consultation'), (16,'b','SX','2010-11-24','8:00 am','Bobbie Smith\rTest'), (17,'b','AOH','2010-11-24','8:30 am','Molly Matthews\rGot gammy leg'), (18,'b','MAN','2010-11-24','9:00 am','client 1'), (19,'b','MAN','2010-11-24','9:30 am','client 2'), (20,'b','MAN','2010-11-24','10:00 am','client 3'), (21,'b','MAN','2010-11-24','11:00 am','client 4'), (22,'b','MAN','2010-11-24','11:30 am','client 5'), (23,'b','MAN','2010-11-24','12:00 pm','client 6'), (24,'b','MAN','2010-11-24','12:30 pm','client 7'), (25,'b','MAN','2010-11-24','1:00 pm','client 8'), (26,'b','MAN','2010-11-24','1:30 pm','client 9'), (27,'b','MAN','2010-11-24','02:00 pm','client 10'), (28,'b','MAN','2010-11-24','02:30 pm','client 11'), (29,'b','DBC','2010-11-24','8:30 am','Digby Smith\rjhgthjju'), (30,'b','MAN','2010-11-24','10:30 am','Jake Smith\rStandard Consultation'), (31,'a','SX','2010-11-25','8:00 am','Bobbie Smith\rTest'), (32,'a','AOH','2010-11-25','8:30 am','Molly Matthews\rGot gammy leg'), (33,'a','MAN','2010-11-25','9:00 am','client 1'), (34,'a','MAN','2010-11-25','9:30 am','client 2'), (35,'a','MAN','2010-11-25','10:00 am','client 3'), (36,'a','MAN','2010-11-25','11:00 am','client 4'), (37,'a','MAN','2010-11-25','11:30 am','client 5'), (38,'a','MAN','2010-11-25','12:00 pm','client 6'), (39,'a','MAN','2010-11-25','12:30 pm','client 7'), (40,'a','MAN','2010-11-25','1:00 pm','client 8'), (41,'a','MAN','2010-11-25','1:30 pm','client 9'), (42,'a','MAN','2010-11-25','02:00 pm','client 10'), (43,'a','MAN','2010-11-25','02:30 pm','client 11'), (44,'a','DBC','2010-11-25','8:30 am','Digby Smith\rjhgthjju'), (45,'a','MAN','2010-11-25','10:30 am','Jake Smith\rStandard Consultation'), (46,'b','SX','2010-11-25','8:00 am','Bobbie Smith\rTest'), (47,'b','AOH','2010-11-25','8:30 am','Molly Matthews\rGot gammy leg'), (48,'b','MAN','2010-11-25','9:00 am','client 1'), (49,'b','MAN','2010-11-25','9:30 am','client 2'), (50,'b','MAN','2010-11-25','10:00 am','client 3'), (51,'b','MAN','2010-11-25','11:00 am','client 4'), (52,'b','MAN','2010-11-25','11:30 am','client 5'), (53,'b','MAN','2010-11-25','12:00 pm','client 6'), (54,'b','MAN','2010-11-25','12:30 pm','client 7'), (55,'b','MAN','2010-11-25','1:00 pm','client 8'), (56,'b','MAN','2010-11-25','1:30 pm','client 9'), (57,'b','MAN','2010-11-25','02:00 pm','client 10'), (58,'b','MAN','2010-11-25','02:30 pm','client 11'), (59,'b','DBC','2010-11-25','8:30 am','Digby Smith\rjhgthjju'), (60,'b','MAN','2010-11-25','10:30 am','Jake Smith\rStandard Consultation'); COMMIT; INSERT INTO `timeslots` (`id`, `clinic`, `time_slot`) VALUES (1,'a','09:00 am'), (2,'a','09:30 am'), (3,'a','10:00 am'), (4,'a','10:30 am'), (5,'a','11:00 am'), (6,'a','11:30 am'), (7,'a','12:00 pm'), (8,'a','12:30 pm'), (9,'a','01:00 pm'), (10,'a','01:30 pm'), (11,'a','02:00 pm'), (12,'a','02:30 pm'), (13,'a','03:00 pm'), (14,'a','03:30 pm'), (15,'a','04:00 pm'), (16,'a','04:30 pm'), (17,'a','05:00 pm'), (18,'b','09:00 am'), (19,'b','09:30 am'), (20,'b','10:00 am'), (21,'b','10:30 am'), (22,'b','11:00 am'), (23,'b','11:30 am'), (24,'b','12:00 pm'), (25,'b','12:30 pm'), (26,'b','01:00 pm'), (27,'b','01:30 pm'), (28,'b','02:00 pm'), (29,'b','02:30 pm'), (30,'b','03:00 pm'), (31,'b','03:30 pm'), (32,'b','04:00 pm'), (33,'b','04:30 pm'), (34,'b','05:00 pm'); COMMIT;
VIEWS ON THIS POST

70

Posted on:

Thursday 25th October 2012
View Replies!

Access MS SQL views and download

, I am developing a real estate Website and I'm paying for access to a Microsoft SQL database. They have only given me access to Views and not the tables directly. I need to basically pull this data off of the remote server and store it locally (like once a night / week). Can anyone suggest the best way of doing this I've found some tools but they only seem to allow me to synch up data if I have access to the tables directly. I'm trying to avoid writing my own script to do this.
VIEWS ON THIS POST

117

Posted on:

Thursday 25th October 2012
View Replies!

create view...a simple question

hi there I have this table CREATE TABLE `sample`.`user_production` ( `user_id` INT NOT NULL , `1hour` INT NOT NULL , `2hour` INT NOT NULL , `3hour` INT NOT NULL , `4hour` INT NOT NULL , `day` DATE NOT NULL, INDEX ( `user_id` ) ) so...every user work and makes a number of products in each hour. I need to create a view which keeps(sum) the production per hour of all the users grouped by day.
VIEWS ON THIS POST

246

Posted on:

Thursday 25th October 2012
View Replies!

mysql view is not activated on my host because ...

I have chat with my client and asking him to activate "view" in mysql. the client then ask the web host's customer service, and they told him that "As we do provide or create mysql user and add previllages. We can not activate such function for you" may i know why "view" is disabled on shared web hosting
VIEWS ON THIS POST

275

Posted on:

Thursday 25th October 2012
View Replies!

SQL interview question

forum, I was asked this sql question at an interview: Question: Describe a SQL statement that pulls column 1 and column 2 from table 1 and column 3 and column 4 from table 2, supplying one ID. Would I have used an INNER JOIN with this question. What threw me off was the "supplying on ID" or does it mean to throw in a where statement Ummm... any suggestions please Edster
VIEWS ON THIS POST

80

Posted on:

Thursday 25th October 2012
View Replies!