Search Results

Search found 1372 results on 55 pages for 'userid'.

Page 21/55 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • ASP.NET MVC unit test controller with HttpContext

    - by user299592
    I am trying to write a unit test for my one controller to verify if a view was returned properly, but this controller has a basecontroller that accesses the HttpContext.Current.Session. Everytime I create a new instance of my controller is calls the basecontroller constructor and the test fails with a null pointer exception on the HttpContext.Current.Session. Here is the code: public class BaseController : Controller { protected BaseController() { ViewData["UserID"] = HttpContext.Current.Session["UserID"]; } } public class IndexController : BaseController { public ActionResult Index() { return View("Index.aspx"); } } [TestMethod] public void Retrieve_IndexTest() { // Arrange const string expectedViewName = "Index"; IndexController controller = new IndexController(); // Act var result = controller.Index() as ViewResult; // Assert Assert.IsNotNull(result, "Should have returned a ViewResult"); Assert.AreEqual(expectedViewName, result.ViewName, "View name should have been {0}", expectedViewName); } Any ideas on how to mock the Session that is accessed in the base controller so the test in the descendant controller will run?

    Read the article

  • mysql query the latest date

    - by user295189
    I am running this query SEL ECT sh.*, u.initials AS initals FROM database1.table1 AS sh JOIN database2.user AS u ON u.userID = sh.userid WHERE id = 123456 AND dts = ( SELECT MAX(dts) from database1.table1 ) ORDER BY sort_by, category In the table1 I have records like this dts status category sort_by 2010-04-29 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:54 Married Marital Status 2 2010-04-28 12:21:15 Smoker Tobbaco 3 2010-04-27 12:20:27 Civil Engineers Occupation 1 2010-04-27 12:20:54 Married Marital Status 2 2010-04-27 12:21:15 Smoker Tobbaco 3 2010-04-26 12:20:27 Civil Engineers Occupation 1 2010-04-26 12:20:54 Married Marital Status 2 2010-04-26 12:21:15 Smoker Tobbaco 3 so if you look at my data, I am choosing the latest entry by category and sort_id. however in some case such as on 29th (2010-04-29 12:20:27) I have only one record. So in this case I want to show occupation for latest and then the rest of them (latest). But currently it displays only one row. Thanks

    Read the article

  • In database table design, how does "Virtual Goods" affect table design -- should we create an instan

    - by Jian Lin
    When we design a database table for a DVD rental company, we actually have a movie, which is an abstract idea, and a physical DVD, so for each rental, we have a many-to-many table with fields such as: TransactionID UserID DvdID RentedDate RentalDuration AmountPaid but what about with virtual goods? For example, if we let a user rent a movie online for 3 days, we don't actually have a DVD, so we may have a table: TransactionID UserID MovieID RentedDate RentalDuration AmountPaid should we create a record for each instance of "virtual good"? For example, what if this virtual good (the movie) can be authorized to be watched on 3 devices (with 3 device IDs), then should we then create a virtual good record in the VirtualGoods table, each with a VirtualGoodID and then another table that has VirtualGoodID DeviceID to match up the movie with the DeviceIDs? We can also just use the TransactionID as the VirtualGoodID. Are there circumstances where we may want to create a record to record this "virtual good" in a VirtualGoods table?

    Read the article

  • SQL: Need to SUM on results that meet a HAVING statement

    - by Wasauce
    I have a table where we record per user values like money_spent, money_spent_on_candy and the date. So the columns in this table (let's call it MoneyTable) would be: UserId Money_Spent Money_Spent_On_Candy Date My goal is to SUM the total amount of money_spent -- but only for those users where they have spent more than 10% of their total money spent for the date range on candy. What would that query be? I know how to select the Users that have this -- and then I can output the data and sum that by hand but I would like to do this in one single query. Here would be the query to pull the sum of Spend per user for only the users that have spent 10% of their money on candy. SELECT UserId, SUM(Money_Spent), SUM(Money_Spent_On_Candy) / SUM(Money_Spent) AS PercentCandySpend FROM MoneyTable WHERE DATE >= '2010-01-01' HAVING PercentCandySpend > 0.1;

    Read the article

  • SQL-Calculate percentages from database table values

    - by Howard
    Hi, Im trying to calculate the percentages of selected fields from tables. Within the fields that data is numeric but I want to show the percentage value. Please help. private void btnpics_Click(object sender, EventArgs e) { try { myCon.Open(); string queryString = "SELECT FoodType.Description,FoodType.Calories, FoodType.Carbohydrate, FoodType.Fat, FoodType.Protein FROM [FoodType], [Meal] WHERE (Meal.UserID =" + userid.Text + ") AND (Meal.MealDate =" + date.Text + ");"; MessageBox.Show(queryString); loadDataGrid(queryString); } catch (Exception ex) { MessageBox.Show(ex.Message); } }

    Read the article

  • Load XML to DataFrame in R

    - by Rohit Kandhal
    I am new to R programming and trying to load a simple XML in RStudio. I tried using XMLToDataFrame but got this error XML content does not seem to be XML: 'temp.xml' XML Schema <root> <row Id="1" UserId="1" Name="Rohit" Date="2009-06-29T10:28:58.013" /> <row Id="2" UserId="3" Name="Rohit" Date="2009-06-29T10:28:58.030" /> </root> Please provide me some direction on which function I should use here.

    Read the article

  • How do I specify table data only for the current user's ID (VWD asp.net 3.5) ?

    - by Greg McNulty
    I'm using the Details View control of VWD asp.net 2008 I have a users database table and one of the columns contain the "unique" user's profile ID, created by VWD from the automatic profiles table. From my table, I would like to select only the data pertaining to the logged in user. How do I get the current unique user profileID and then have that used for the query? What I have so far: In the configure data source option of the control I select the columns I would like to display, select the check box for "Return Only Unique IDs" and the WHERE option. In this new window I select the Column to the profile userID ... "=" and then assumed I should select Source: "Profile". Now what should the parameter properties or value be to select only the logged userID specific data of the table? Any help is appreciated. Thank You!

    Read the article

  • With sqlalchemy how to dynamically bind to database engine on a per-request basis

    - by Peter Hansen
    I have a Pylons-based web application which connects via Sqlalchemy (v0.5) to a Postgres database. For security, rather than follow the typical pattern of simple web apps (as seen in just about all tutorials), I'm not using a generic Postgres user (e.g. "webapp") but am requiring that users enter their own Postgres userid and password, and am using that to establish the connection. That means we get the full benefit of Postgres security. Complicating things still further, there are two separate databases to connect to. Although they're currently in the same Postgres cluster, they need to be able to move to separate hosts at a later date. We're using sqlalchemy's declarative package, though I can't see that this has any bearing on the matter. Most examples of sqlalchemy show trivial approaches such as setting up the Metadata once, at application startup, with a generic database userid and password, which is used through the web application. This is usually done with Metadata.bind = create_engine(), sometimes even at module-level in the database model files. My question is, how can we defer establishing the connections until the user has logged in, and then (of course) re-use those connections, or re-establish them using the same credentials, for each subsequent request. We have this working -- we think -- but I'm not only not certain of the safety of it, I also think it looks incredibly heavy-weight for the situation. Inside the __call__ method of the BaseController we retrieve the userid and password from the web session, call sqlalchemy create_engine() once for each database, then call a routine which calls Session.bind_mapper() repeatedly, once for each table that may be referenced on each of those connections, even though any given request usually references only one or two tables. It looks something like this: # in lib/base.py on the BaseController class def __call__(self, environ, start_response): # note: web session contains {'username': XXX, 'password': YYY} url1 = 'postgres://%(username)s:%(password)s@server1/finance' % session url2 = 'postgres://%(username)s:%(password)s@server2/staff' % session finance = create_engine(url1) staff = create_engine(url2) db_configure(staff, finance) # see below ... etc # in another file Session = scoped_session(sessionmaker()) def db_configure(staff, finance): s = Session() from db.finance import Employee, Customer, Invoice for c in [ Employee, Customer, Invoice, ]: s.bind_mapper(c, finance) from db.staff import Project, Hour for c in [ Project, Hour, ]: s.bind_mapper(c, staff) s.close() # prevents leaking connections between sessions? So the create_engine() calls occur on every request... I can see that being needed, and the Connection Pool probably caches them and does things sensibly. But calling Session.bind_mapper() once for each table, on every request? Seems like there has to be a better way. Obviously, since a desire for strong security underlies all this, we don't want any chance that a connection established for a high-security user will inadvertently be used in a later request by a low-security user.

    Read the article

  • encryption decryption function in php

    - by parthav
    import gnupg, urllib retk = urllib.urlopen("http://keyserver.pramberger.at/pks/" "lookup?op=get&search=userid for the key is required") pub_key = retk.read() #print pub_key gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True) print "Import the Key :", gpg.import_keys(pub_key).summary() print "Encrypt the Message:" msg = "Hellllllllllo" uid = "userid that has the key on public key server" enc = gpg.encrypt(msg, uid,always_trust=True) print "*The enc content***************************== ", enc this function written in python gives me encrypted message.The encryption is done using the public key which i am getting from public key server(pramberger.at). Now how can i implement the same functionality (getting the key from any public key server and using that key encrypt the message) in php

    Read the article

  • Filter a LINQ query

    - by Jack Marchetti
    Here's my query. var query = from g in dc.Group join gm in dc.GroupMembers on g.ID equals gm.GroupID where gm.UserID == UserID select new { id = g.ID, name = g.Name, pools = (from pool in g.Pool // more stuff to populate pools So I have to perform some filtering, but when I attempt to filter var filter = query.Where(f => f.pools.[no access to list of columns] I can't access any of the items within "pools". Does anyone know how I'm able to access that? What I'd like to do is this: var filterbyGame = query.Where(f = > f.pools.GameName == "TestGame"); Let me know if that's even possible with thew ay I have this setup. Thanks guys.

    Read the article

  • How to redirect to a controller action from a JsonResult method in asp.net mvc?

    - by Pandiya Chendur
    I am fetching records for a user based on his UserId as a JsonResult... public JsonResult GetClients(int currentPage, int pageSize) { if (Session["UserId"] != "") { var clients = clirep.FindAllClients().AsQueryable(); var count = clients.Count(); var results = new PagedList<ClientBO>(clients, currentPage - 1, pageSize); var genericResult = new { Count = count, Results = results }; return Json(genericResult); } else { //return RedirectToAction("Index","Home"); } } How to redirect to a controller action from a JsonResult method in asp.net mvc?Any suggestion...

    Read the article

  • PHP: BBCode with SQL selection?

    - by rayne
    I would like to code a bbcode with SQL selection. Basically I want the user to be able to input [user]Anotheruser[/user] in a text field, which then is converted in the front-end to an URL that looks like this: http://mydomain.com/user/[userid]/anotheruser. So in order to get the userid, I'd need to include an SQL selection, and additionally an if else to find out of the other user actually exists. Can I do this with a preg_replace as usually used for creating bbcode, or do I need to do something more complex?

    Read the article

  • change password code error.......

    - by shimaTun
    I've created a code to change a password. Now it seem contain an error. When before I fill in the form to change password.the error is: Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\xampp\htdocs\e-Complaint(FYP)\userChangePass.php:7) in C:\Program Files\xampp\htdocs\e-Complaint(FYP)\userChangePass.php on line 126 the code: <?php # userChangePass.php //this page allows logged in user to change their password. $page_title='Change Your Password'; //if no first_name variable exists, redirect the user if(!isset($_SESSION['userid'])){ header("Location: http://" .$_SERVER['HTTP_HOST']. dirname($_SERVER['PHP_SELF'])."/index.php"); ob_end_clean(); exit(); }else{ if(isset($_POST['submit'])) {//handle form. require_once('connectioncomplaint.php'); //connec to the database //check for a new password and match againts the confirmed password. if(eregi ("^[[:alnum:]]{4,20}$", stripslashes(trim($_POST['password1'])))){ if($_POST['password1'] == $_POST['password2']){ $p =escape_data($_POST['password1']); }else{ $p=FALSE; echo'<p><font color="red" size="+1"> Your password did not match the confirmed password!</font></p>'; } }else{ $p=FALSE; echo'<p><font color="red" size="+1"> Please Enter a valid password!</font></p>'; } if($p){ //if everything OK. //make the query $query="UPDATE access SET password=PASSWORD('$p') WHERE userid={$_SESSION['userid']}"; $result=@mysql_query($query);//run the query. if(mysql_affected_rows() == 1) {//if it run ok. //send an email,if desired. echo '<p><b>your password has been changed.</b></p>'; //include('templates/footer.inc');//include the HTML footer. exit(); }else{//if it did not run ok $message= '<p>Your password could not be change due to a system error.We apolpgize for any inconvenience.</p><p>' .mysql_error() .'</p>'; } mysql_close();//close the database connection. }else{//failed the validation test. echo '<p><font color="red" size="+1"> Please try again.</font></p>'; } }//end of the main Submit conditional. } ?> the error at this line:- header("Location: http://" .$_SERVER['HTTP_HOST']. dirname($_SERVER['PHP_SELF'])."/index.php"); please help me guy...

    Read the article

  • Transferring a flat file database to a MySQL database

    - by Jon
    I have a flat file database (yeah gross I know - the worst part is that it's 1.4GB), and I'm in the process of moving it to a MySQL database. The problem is that I'm not sure how to go about doing this - and I've checked through every related question on here but none relate to what I want to do, nor how my database is currently setup. My current flat file database is setup to where a normal MySQL row is its own file, and a MySQL table would be the directory. So for example if you have a user named Jon, there would be a file for the user in a directory named /members/. Within that file would be various information for the user including the users id, rank etc - all separated by tabs, all on separate lines (userid\t4). So here's an example user file: userid 4 notes staff notes: bla bla staff2 notes: bla bla bla username Example So how can I convert the above into their own rows and fields in MySQL? And if possible, could I do thousands of these files at once? Thanks.

    Read the article

  • Insert record in Linq to Sql

    - by Anders Svensson
    Is this the easiest way to insert a record with Linq to Sql when there's a many-to-many relationship, or is there a better/cleaner way? I wasn't sure why things weren't working at first, but when I added a second SubmitChanges() it worked. Why was this necessary? Would be grateful if someone could clarify this a bit! private void InsertNew() { UserPageDBDataContext context = new UserPageDBDataContext(); User user = new User(); ManyToMany.Model.Page page = new ManyToMany.Model.Page(); user.Name = "Madde Andersson"; page.Url = "anderscom/references"; context.Users.InsertOnSubmit(user); context.Pages.InsertOnSubmit(page); context.SubmitChanges(); UserPage userPage = new UserPage(); userPage.UserID = user.UserID; userPage.PageID = page.PageID; user.UserPages.Add(userPage); context.SubmitChanges(); }

    Read the article

  • Datamodel for a MVC learning project

    - by Dofs
    Hi, I am trying to learn Microsoft MVC 2, and have in that case found a small project I wanted to deploy it on. My idea was to simulate a restaurant where you can order a table. Basics: A user can only reserve a full table, so I don't have the trouble of merging people on different tables. A person can order a table for a certain amount of hours. My question was how I could make the data model the smartest way. I thought of just having a my database like this: Table { Id, TableName } Reservations { Id TableId ReservedFrom ReservedTo UserId } User { UserId UserName ... } By doing it this way I would have to program a lot of the logic in e.g. the business layer, to support which tables are occupied at what time, instead of having the data model handle it. Therefore do you guys have a better way to do this?

    Read the article

  • how to get the sql connection

    - by sweetsecret
    FS_Setting is a VB class which has all the details of the connections ie: Public Class FS_Setting Public Function Get_RS_Connection() As SqlConnection Try Get_RS_Connection = New SqlConnection("Data Source=***********;User ID=sa;Password=*****;database=*********") Catch ex As System.Exception Throw New System.Exception("Get_RS_Connection Error:" + ex.Message) End Try End Function I need to call the function Get_RS_Connection() in a different class instead of getting the connection all the way again and hard coding.... I want to call the above class where the SQL connection is declared Namespace FS_Library Public Class FS_Errorlog Inherits FS_BaseClass Try **cn = New SqlConnection("Data Source=***********;UserID=sa;Password=*****;database=*********")** cmd = New SqlCommand("dbo.FS_ErrorLog_ADD", cn) cmd.CommandType = CommandType.StoredProcedure cmd.CommandTimeout = Convert.ToInt32(ConfigurationSettings.AppSettings("Command_Timeout")) Me.AddParameter(cmd, "@p_tableKey", SqlDbType.Int, tableKey) Me.AddParameter(cmd, "@p_FunctionCode", SqlDbType.Int, FunctionCode) Me.AddParameter(cmd, "@p_TableAlias", SqlDbType.VarChar, TableAlias) Me.AddParameter(cmd, "@p_ValidationCode", SqlDbType.Int, ValidationCode) If Filename = "" Then Filename = "N/A" End If Me.AddParameter(cmd, "@p_FileName", SqlDbType.VarChar, Filename) Me.AddParameter(cmd, "@p_Message", SqlDbType.VarChar, Message) Me.AddParameter(cmd, "@p_CreateUser", SqlDbType.VarChar, userID) Me.AddParameter(cmd, "@p_UserActionID", SqlDbType.UniqueIdentifier, UserActionID) cn.Open()

    Read the article

  • T-SQL: Opposite to string concatenation - how to split string into multiple records

    - by kristof
    I have seen a couple of questions related to string concatenation in SQL. I wonder how would you approach the opposite problem: splitting coma delimited string into rows of data: Lets say I have tables: userTypedTags(userID,commaSeparatedTags) 'one entry per user tags(tagID,name) And want to insert data into table userTag(userID,tagID) 'multiple entries per user Inspired by Which tags are not in the database? question EDIT Thanks for the answers, actually more then one deserves to be accepted but I can only pick one, and the solution presented by Cade Roux with recursions seems pretty clean to me. It works on SQL Server 2005 and above. For earlier version of SQL Server the solution provided by miies can be used. For working with text data type wcm answer will be helpful. Thanks again.

    Read the article

  • ASP.NET EnqityDataSource WhereParameters, creates new property.

    - by Alex
    I am trying to populate GridView, using EntityDataSource(code behind), I need to able to sort GridView. However when I sort i get error: A property with name 'aspnet_Users.UserId1' does not exist in metadata for entity type So I beleive it is because I generate where parameter in code behind: ActiveEnqDataSource.WhereParameters.Add(new SessionParameter("aspnet_Users.UserId", TypeCode.Object, "UserName")); Full code is : ActiveEnqDataSource.ConnectionString = db.Connection.ConnectionString; ActiveEnqDataSource.DefaultContainerName = "Entities"; ActiveEnqDataSource.EntitySetName = "Enquiries"; ActiveEnqDataSource.Include = "UserCars.CarModel.CarMake, Category, aspnet_Users"; ActiveEnqDataSource.EnableUpdate = true; ActiveEnqDataSource.EnableInsert = true; ActiveEnqDataSource.EnableDelete = true; ActiveEnqDataSource.AutoGenerateWhereClause = true; ActiveEnqDataSource.WhereParameters.Add(new SessionParameter("aspnet_Users.UserId", TypeCode.Object, "UserName")); Any suggestions? Thank you very much! The gridview itself renders perfectly, only thing I cannot sort it, any "whereParameters" I add, Add 1 to the property e.g UserId1,EnquiryStatus1, ProdauctName1. etc...

    Read the article

  • Filter DataTable to show only the most recent transaction for each user

    - by Dan Neely
    I have a datatable that contains rows of transaction data for multiple users. Each row includes UserID and UserTransactionID columns. What would I use for as a RowFilter in the tables DefaultView to only show the row for each user that has the highest UserTransactionID value? sample data and results UserID UserTransactionID PassesFilter 1 1 False 1 2 False 1 3 True 2 1 True 3 1 False 3 2 True My data is orginating in a non-SQL source, the DataTable is being created to be bound to a DataGridView so I can't make changes to a query being used to get the data initially.

    Read the article

  • Syntax to change the value of a cached object property

    - by Craig
    In an ASP.NET 3.5 VB web app, I successfully manage to cache an object containing several personal details such as name, address, etc. One of the items is CreditNum which I'd like to change in the cache on the fly. Is there a way to access this directly in the cache or do I have to destroy and rebuild the whole object just to change the value of objMemberDetails.CreditNum? The cache is set using: Public Shared Sub CacheSet(ByVal key As String, ByVal value As Object) Dim userID As String = HttpContext.Current.User.Identity.Name HttpContext.Current.Cache(key & "_" & userID) = value End Sub

    Read the article

  • JQuery $.getJSON appends a question mark to the request URL

    - by David Neale
    I have the folliwng JSON request code on an ASP.NET MVC web application: var userID = 'id=' + $('#namesList').val(); $.getJSON('/Person/GetPerson/', userID, function(data) { $('#collar').text(data.collarNumber); $('#name').text(data.Name); $('#email').text(data.EmailAddress); }); This creates a request such as: http://localhost:48610/Person/GetPerson/?id=6. Why is there a question mark in there? I get the server error The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32'.... If I make the request manually without the question mark it works fine.

    Read the article

  • linq2sql and multiple joins

    - by zerkms
    is it possible to do multiple joins: from g in dataContext.Groups join ug in dataContext.UsersGroups on g.Id equals ug.GroupId join u in dataContext.Users on u. where ug.UserId == user.Id select GroupRepository.ToEntity(g); in the sample above all is fine until i press "." in the end of the 3rd line. there i expect to get intellisense and write u.Id == ug.UserId but it doesn't appear. and of course this code doesn't compile after. what did i wrong?

    Read the article

  • debugging loadwith has subnodes in domainservice, but not when called in viewmodel

    - by Jakob
    Hi, I'm trying to use the .LoadWith method I have these lines of code in my domainservice: public IEnumerable<Subject> GetSubjectList(Guid userid) { DataLoadOptions loadopts = new DataLoadOptions(); loadopts.LoadWith<Subject>(s => s.Notes); this.DataContext.LoadOptions = loadopts; return this.DataContext.Subjects; } I can see debugging that a list of subjects get loaded, and that the Subjects.Notes property which is a List is also populated with subitems, but when I do ctx.Load(ctx.GetSubjectListQuery(WebContext.Current.User.UserId), lo => { serverdata = ctx.Subjects; }, null); I only get a flat list of subjects loaded into serverdata, and no note subitems are loaded to subject.notes

    Read the article

  • dynamiclly schedule a lead sales agent

    - by Josh
    I have a website that I'm trying to migrate from classic asp to asp.net. It had a lead schedule, where each sales agent would be featured for the current day, or part of the day.The next day a new agent would be scheduled. It was driven off a database table that had a row for each day in it. So to figure out if a sales agent would show on a day, it was easy, just find today's date in the table. Problem was it ran out rows, and you had to run a script to update the lead days 6 months at a time. Plus if there was ever any change to the schedule, you had to delete all the rows and re-run the script. So I'm trying to code it where sql server figures that out for me, and no script has to be ran. I have a table like so CREATE TABLE [dbo].[LeadSchedule]( [leadid] [int] IDENTITY(1,1) NOT NULL, [userid] [int] NOT NULL, [sunday] [bit] NOT NULL, [monday] [bit] NOT NULL, [tuesday] [bit] NOT NULL, [wednesday] [bit] NOT NULL, [thursday] [bit] NOT NULL, [friday] [bit] NOT NULL, [saturday] [bit] NOT NULL, [StartDate] [smalldatetime] NULL, [EndDate] [smalldatetime] NULL, [StartTime] [time](0) NULL, [EndTime] [time](0) NULL, [order] [int] NULL, So the user can schedule a sales agent depending on their work schedule. Also if they wanted to they could split certain days, or sales agents by time, So from Midnight to 4 it was one agent, from 4-midnight it was another. So far I've tried using a numbers table, row numbers, goofy date math, and I'm at a loss. Any suggestions on how to handle this purely from sql code? If it helps, the table should always be small, like less than 20 never over 100. update After a few hours all I've managed to come up with is the below. It doesn't handle filling in days not available or times, just rotates through all the sales agents with leadTable as ( select leadid,userid,[order],StartDate, case DATEPART(dw,getdate()) when 1 then sunday when 2 then monday when 3 then tuesday when 4 then wednesday when 5 then thursday when 6 then friday when 7 then saturday end as DayAvailable , ROW_NUMBER() OVER (ORDER BY [order] ASC) AS ROWID from LeadSchedule where GETDATE()>=StartDate and (CONVERT(time(0),GETDATE())>= StartTime or StartTime is null) and (CONVERT(time(0),GETDATE())<= EndTime or EndTime is null) ) select userid, DATEADD(d,(number+ROWID-2)*totalUsers,startdate ) leadday from (select *, (select COUNT(1) from leadTable) totalUsers from leadTable inner join Numbers on 1=1 where DayAvailable =1 ) tb1 order by leadday asc

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >