Viewing 15 posts - 13,966 through 13,980 (of 15,381 total)
Ahh I missed that part somewhere along the way. You certainly don't need to use a cursor for this. You can use ROW_NUMBER(). I will toss together an example so...
September 22, 2011 at 9:49 am
I don't think you can use dynamic sql as the query for a cursor. Just take my example above and run your dynamic sql to fill a temp table and...
September 22, 2011 at 9:41 am
What is the point of the RoomAvailable table? Are you using that a holder for all available rooms? That seems like not a good idea to me. Seems like all...
September 22, 2011 at 9:26 am
prakash 67108 (9/22/2011)
yes, i need dynamic query because i have to pass the table name and column name values through parameters as i shown in the query....i need cursor because...
September 22, 2011 at 9:20 am
TheOxblood (9/22/2011)
SELECT * FROM Table WHERE ArrivalDate <> ... AND DepartureDate <>...
September 22, 2011 at 9:09 am
Unless you are trying to get the results for more than 1 row. You can't store multiple results in a single variable. If that is what you are trying to...
September 22, 2011 at 8:46 am
TheOxblood (9/22/2011)
Yes it is for hotel reservation! 🙂
How can I allow per each room their status?
For example, RoomNo 10 is RESERVED at 7:00am-12:00pm
but 12:00pm...
September 22, 2011 at 8:35 am
I doubt you really need a cursor but the problem is the select statement for your cursor. Whatever you posted here is a total disaster. It looks like maybe you...
September 22, 2011 at 8:27 am
TheOxblood (9/22/2011)
I need to retrieve all available rooms? do i need to create a new table?
how and what are...
September 22, 2011 at 8:21 am
I don't understand your question. Can you please clarify? Are you asking which sql server should you use to connect to your database?
September 22, 2011 at 8:11 am
Charlottecb (9/22/2011)
Sean Lange (9/21/2011)
September 22, 2011 at 7:27 am
That looks like a good start but you will have to add some of looping to handle multiple line inserts. If Lowell doesn't have time I can give you a...
September 21, 2011 at 3:26 pm
Glad you were able to find at least a temporary solution. I think you could take what you learned about how to use the Delimited split function and just add...
September 21, 2011 at 3:15 pm
Whenever there is a delete statement there is a transaction started by the system. This trigger is just rolling it back. Yes it is probably redundant but best practice is...
September 21, 2011 at 2:36 pm
LOL well I guess that would work too assuming they only send one type of file. I guess I am more used to users who send attachments of who knows...
September 21, 2011 at 2:31 pm
Viewing 15 posts - 13,966 through 13,980 (of 15,381 total)