﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2012 / SQL Server 2012 -  T-SQL  / T-SQL Cursors / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sat, 25 May 2013 03:51:54 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: T-SQL Cursors</title><link>http://www.sqlservercentral.com/Forums/Topic1373605-3077-1.aspx</link><description>This sounds like an issue for the presentation layer and not the data layer.</description><pubDate>Wed, 06 Mar 2013 03:28:31 GMT</pubDate><dc:creator>Sean Pearce</dc:creator></item><item><title>RE: T-SQL Cursors</title><link>http://www.sqlservercentral.com/Forums/Topic1373605-3077-1.aspx</link><description>This doesn't read like an SQL issue, more a GUI issue.I may be wrong but it sounds like what she wants is that if the field is NULL then do not display the field on the formChanging the number of columns returned by a query would require Dynamic SQL which should be avoided whenever possible for a number of reasons(SQL injection attacks and query plan cacheing to name two)</description><pubDate>Thu, 15 Nov 2012 09:27:57 GMT</pubDate><dc:creator>aaron.reese</dc:creator></item><item><title>RE: T-SQL Cursors</title><link>http://www.sqlservercentral.com/Forums/Topic1373605-3077-1.aspx</link><description>[quote][b]computergirl (10/16/2012)[/b][hr]Okay I am kind of new to this and I am trying to create a table and if the user doesn't fill all the fields I need the empty field to not be shown just the fields that are filled. How can I do this using a cursor? Any pointers??thanks in advance[/quote]Hi,Because you're a newbie you'd better read this first: http://www.sqlservercentral.com/articles/Best+Practices/61537/May be you think of usage ISNULL, COALESCE, or something else ... in your loop, but with such explanation we could just imagine what you need.RegardsIgorMi</description><pubDate>Tue, 13 Nov 2012 14:13:02 GMT</pubDate><dc:creator>IgorMi</dc:creator></item><item><title>RE: T-SQL Cursors</title><link>http://www.sqlservercentral.com/Forums/Topic1373605-3077-1.aspx</link><description>[quote][b]computergirl (10/16/2012)[/b][hr]Okay I am kind of new to this and I am trying to create a table and if the user doesn't fill all the fields I need the empty field to not be shown just the fields that are filled. How can I do this using a cursor? Any pointers??thanks in advance[/quote]Agreed that elaboration is needed.First of all you refer to "fields" but SQL tables contain "columns."  How many columns?Neither can columns be "empty" - they can be NULL (which is another way to say the value is unknown).Are you saying you want to write a query that only returns a column if that column does not contain a NULL value?Refer to the first line in my signature.  If you are new it's not too late for you.  Don't think about CURSORs as a first resort.  SQL processes sets, so you should think of sets first and 99.9% of the time you can solve the problem without resorting to a CURSOR (that should always be a last resort).</description><pubDate>Thu, 01 Nov 2012 18:55:26 GMT</pubDate><dc:creator>dwain.c</dc:creator></item><item><title>RE: T-SQL Cursors</title><link>http://www.sqlservercentral.com/Forums/Topic1373605-3077-1.aspx</link><description>[quote][b]computergirl (10/16/2012)[/b][hr]Okay I am kind of new to this and I am trying to create a table and if the user doesn't fill all the fields I need the empty field to not be shown just the fields that are filled. How can I do this using a cursor? Any pointers??thanks in advance[/quote]Could you elaborate on this one. Some thing like a sample so, that we could answer or give ideas on your question. :-)</description><pubDate>Tue, 16 Oct 2012 22:14:20 GMT</pubDate><dc:creator>sriren6029</dc:creator></item><item><title>T-SQL Cursors</title><link>http://www.sqlservercentral.com/Forums/Topic1373605-3077-1.aspx</link><description>Okay I am kind of new to this and I am trying to create a table and if the user doesn't fill all the fields I need the empty field to not be shown just the fields that are filled. How can I do this using a cursor? Any pointers??thanks in advance</description><pubDate>Tue, 16 Oct 2012 21:03:30 GMT</pubDate><dc:creator>computergirl</dc:creator></item></channel></rss>