Wednesday, March 21, 2012
Group Test Field
How do I expand my group by text box to use some of that empty space ?
Thanks in advance,
ChrisFigured it out, right-click on the cell select Merge Cells and can spread across entire row. Nice!
I'm a huge fan!
Chris
"Chris" wrote:
> When adding a text box in my group section, the textbox width is limited to the width of the first column in the detail of the report, or any detail column. It cannot span multiple columns, even though it is the only textbox on the entire 8 inch line, it is limited to my .5 inch column 1 width.
> How do I expand my group by text box to use some of that empty space ?
> Thanks in advance,
> Chris
Monday, March 19, 2012
Group no. of records by text in a text/varchar field
(Text1 varchar(500))
insert Test values('I love SQL')
insert Test values('SQL rocks')
insert Test values('SQL rocks in 2005')
insert Test values('MS rocks too')
insert Test values('MS is short for microsoft')
So i want to run a query where I would like to group by some key text words
..
So i want to get a count of entries in the table that has words 'SQL' and
'MS' in it
Output should be
KeyWord Count
MS 2
SQL 3
What is the query ? I would eventually add more keywords to the query..
Thanksyou'd want to unpack your input string into a table then it's just a matter
of finding the occurrences.
e.g.
declare @.s varchar(100)
set @.s='MS,SQL'
declare @.padded varchar(8000);set @.padded=','+@.s+','
select s,count(*)
from (select
substring(@.padded,digit+1,charindex(',',
@.padded,digit+1)-digit-1)
from racdigits
where digit <= len(@.padded)-1
and substring(@.padded,digit,1)= ',') derived(s)
join Test on Test.Text1 like '%'+derived.s+'%'
group by s
racdigits is just an auxilary table with value from 1-8000 (i.e. select top
8000 digit=identity(int,1,1) into racdigits from sysobjects,syscolumns)
-oj
"Hassan" <Hassan@.hotmail.com> wrote in message
news:e5HDQH2jGHA.3440@.TK2MSFTNGP02.phx.gbl...
> Create table Test
> (Text1 varchar(500))
> insert Test values('I love SQL')
> insert Test values('SQL rocks')
> insert Test values('SQL rocks in 2005')
> insert Test values('MS rocks too')
> insert Test values('MS is short for microsoft')
> So i want to run a query where I would like to group by some key text
> words ..
> So i want to get a count of entries in the table that has words 'SQL' and
> 'MS' in it
> Output should be
> KeyWord Count
> MS 2
> SQL 3
> What is the query ? I would eventually add more keywords to the query..
> Thanks
>
>|||Where do you want to show data?
If you use front end application, split data there
Madhivanan
Hassan wrote:
> Create table Test
> (Text1 varchar(500))
> insert Test values('I love SQL')
> insert Test values('SQL rocks')
> insert Test values('SQL rocks in 2005')
> insert Test values('MS rocks too')
> insert Test values('MS is short for microsoft')
> So i want to run a query where I would like to group by some key text word
s
> ..
> So i want to get a count of entries in the table that has words 'SQL' and
> 'MS' in it
> Output should be
> KeyWord Count
> MS 2
> SQL 3
> What is the query ? I would eventually add more keywords to the query..
> Thanks|||On Tue, 13 Jun 2006 20:22:47 -0700, Hassan wrote:
>Create table Test
>(Text1 varchar(500))
>insert Test values('I love SQL')
>insert Test values('SQL rocks')
>insert Test values('SQL rocks in 2005')
>insert Test values('MS rocks too')
>insert Test values('MS is short for microsoft')
>So i want to run a query where I would like to group by some key text words
>..
>So i want to get a count of entries in the table that has words 'SQL' and
>'MS' in it
>Output should be
>KeyWord Count
>MS 2
>SQL 3
>What is the query ? I would eventually add more keywords to the query..
Hi Hassan,
Store the keywords in a seperate table, then use a query such as this:
SELECT k.Keyword, COUNT(t.Text1)
FROM Keywords AS k
LEFT JOIN Test AS t
ON t.Text1 LIKE '%' + k.Keyword + '%'
GROUP BY k.Keyword
Hugo Kornelis, SQL Server MVP
Group newbie: question on parsing a field value
dynamic tree on a web page. For example:
"1.1"
"1.2"
"1.2.1"
"1.2.2"
--
--
'1.2.10"
--
etc..
What I need to do is compare this field "value" to another value in a query.
(I'm using ASP and VBScript to create the statement). For example:
sql = "SELECT SomeField FROM MyTable WHERE TreeNode>=' " & MyNode & " ' "
The problem I run into is when the TreeNode value is say "1.2.10", and it's
being compared against "1.2.1" and "1.2.2". It should be greater than both
of these (in my implementation of this), but it actually falls between the
two, since it is a text comparison.
All I'm really interested in is the last value. But I can't use the RIGHT
function, because the last value may be one or more digits, and there could
be any number of levels (periods).
Is there an SQL function I could use that would strip away everything but
the text following the last period? I could then easily do the same in the
ASP script and compare integers. Something like:
sql = "SELECT SomeField FROM MyTable WHERE GetLastValueSQL(TreeNode) >= " &
GetLastValueASP(MyTreeNode)
This also needs to work in MS Access BTW :-)
Thanks in advance for any help!
Calan
AxMaster Guitar Software
www.jcsautomation.com
www.jcsautomation.com/music.asp
Music software and web design/hosting
"Reality exists only in the minds of the extremely deranged""Calan" <calan_svcREMOVE@.yaNOSPAMhoo.com> wrote in message news:<P3Jcc.643$FB1.182@.fe25.usenetserver.com>...
> I have a text field (called TreeNode) that contains node identifiers for a
> dynamic tree on a web page. For example:
> "1.1"
> "1.2"
> "1.2.1"
> "1.2.2"
> --
> --
> '1.2.10"
> --
> etc..
> What I need to do is compare this field "value" to another value in a query.
> (I'm using ASP and VBScript to create the statement). For example:
> sql = "SELECT SomeField FROM MyTable WHERE TreeNode>=' " & MyNode & " ' "
> The problem I run into is when the TreeNode value is say "1.2.10", and it's
> being compared against "1.2.1" and "1.2.2". It should be greater than both
> of these (in my implementation of this), but it actually falls between the
> two, since it is a text comparison.
> All I'm really interested in is the last value. But I can't use the RIGHT
> function, because the last value may be one or more digits, and there could
> be any number of levels (periods).
> Is there an SQL function I could use that would strip away everything but
> the text following the last period? I could then easily do the same in the
> ASP script and compare integers. Something like:
> sql = "SELECT SomeField FROM MyTable WHERE GetLastValueSQL(TreeNode) >= " &
> GetLastValueASP(MyTreeNode)
> This also needs to work in MS Access BTW :-)
> Thanks in advance for any help!
> Calan
> AxMaster Guitar Software
> www.jcsautomation.com
> www.jcsautomation.com/music.asp
> Music software and web design/hosting
> "Reality exists only in the minds of the extremely deranged"
This is one way:
declare @.node varchar(50)
set @.node = '1.2.1.10'
select substring(
@.node,
len(@.node) - charindex('.', reverse(@.node))+2,
charindex('.', reverse(@.node))
)
Or this may be easier to read:
select reverse(left(reverse(@.node), charindex('.', reverse(@.node))-1))
You could put this into a function (in SQL2000), but it would be
invoked once per row in queries, so using a stored procedure is
probably a better approach.
Simon|||> Is there an SQL function I could use that would strip away everything but
> the text following the last period? I could then easily do the same in the
> ASP script and compare integers. Something like:
> This also needs to work in MS Access BTW :-)
Hi,
I don't know anything about Access. You can use a table of numbers
trick to parse your "node" into individual nodes by using the period
as a delimiter. Erland has documented it in his site. In the code
below, I called my table of numbers TALLY which has one column ID with
values from 1,2,3,... to 8000.
declare @.node varchar (50)
set @.node='1.2.10'
SELECT
substring(phrase,s,(e-s-1)) as NODES
FROM
(
SELECT
id,
phrase,
charindex('.','.'+phrase+'.',id) as s,
charindex('.','.'+phrase+'.',id+1) as e
FROM tally,(select phrase=@.node) A
WHERE charindex('.','.'+phrase+'.',id) <
charindex('.','.'+phrase+'.',id+1)
) B
OUTPUTS:
NODES
----------------
1
2
10
Further modifying it to output the last NODE piece:
SELECT
substring(phrase,s,(e-s-1)) as NODES, identity(int,1,1) as i
INTO #T
FROM
(
SELECT
id,
phrase,
charindex('.','.'+phrase+'.',id) as s,
charindex('.','.'+phrase+'.',id+1) as e
FROM tally,(select phrase=@.node) A
WHERE charindex('.','.'+phrase+'.',id) <
charindex('.','.'+phrase+'.',id+1)
) B
SELECT NODES FROM #T WHERE i=(SELECT max(i) as i FROM #T)
OUTPUTS:
NODES
----------------
10
Group Heading text different on repeated headers
Is there any way to have the data displayed in a group header different on the first occurrence of the header from subsequent occurrences within that same group?
I have the Repeat Header option checked, so the header appears on every page. I want the pages where it is a continuation (has been repeated because the option is on) to look different, e.g., the group's name cell should be "<name> (cont.)", where on the first page it appears it should be just "<name>". I can use an expression in a cell in the header, but I don't see any convenient function or other way to detect whether this is the first, or a subsequent, instance of the header.
I thought of using the RowNumber function, scoped to the header grouping, but this seems to return the row number of the bottom-most (last) detail row of the group - that is, the number of rows in the group - so that doesn't seem to help.
Have you found any solution to the issue in your post? I would like to do the same on a grouped table report and cannot seem to find the key.Group Heading text different on repeated headers
Is there any way to have the data displayed in a group header different on the first occurrence of the header from subsequent occurrences within that same group?
I have the Repeat Header option checked, so the header appears on every page. I want the pages where it is a continuation (has been repeated because the option is on) to look different, e.g., the group's name cell should be "<name> (cont.)", where on the first page it appears it should be just "<name>". I can use an expression in a cell in the header, but I don't see any convenient function or other way to detect whether this is the first, or a subsequent, instance of the header.
I thought of using the RowNumber function, scoped to the header grouping, but this seems to return the row number of the bottom-most (last) detail row of the group - that is, the number of rows in the group - so that doesn't seem to help.
Have you found any solution to the issue in your post? I would like to do the same on a grouped table report and cannot seem to find the key.Friday, March 9, 2012
Group by problem!
different format.
For example, column "terminalID" can contain "0123" and '123' pointing to
the same terminal.
Group by treats these as 2 different groups.
I used CAST (terminalID as INT) as 'terminalID' in SELECT but still got the
same problem since I cannot use CAST in Group By clause.
Any help is greatly appreciated!
Bill
select CAST(terminalID as INT) as terminalID
from table A
group by terminalID> I used CAST (terminalID as INT) as 'terminalID' in SELECT but still got
> the same problem since I cannot use CAST in Group By clause.
CAST is allowed in a GROUP BY clause. The example below should work,
assuming terminalID is always numeric.
SELECT CAST(terminalID AS int) AS terminalID
FROM MyTable
GROUP BY CAST(terminalID AS int)
Hope this helps.
Dan Guzman
SQL Server MVP
"Bill nguyen" <billn_nospam_please@.jaco.com> wrote in message
news:O3Ud$mBBGHA.1028@.TK2MSFTNGP11.phx.gbl...
>I need to use Group By on a text column that contain numeric data in
>different format.
> For example, column "terminalID" can contain "0123" and '123' pointing to
> the same terminal.
> Group by treats these as 2 different groups.
> I used CAST (terminalID as INT) as 'terminalID' in SELECT but still got
> the same problem since I cannot use CAST in Group By clause.
> Any help is greatly appreciated!
> Bill
>
> select CAST(terminalID as INT) as terminalID
> from table A
> group by terminalID
>
>|||>> I need to use Group By on a text column that contain numeric data in diff
erent format. <<
Well, that is realllllly screwed up! In the RDBMS model, unlike 1950's
COBOL, there is no formatting in the database. We have abstract data
types. Look at the possible Numeric data types in any basic book on
SQL.
Gee, those are strings and not numeric at all! This is sooo basic.
1) Find the moron that did this schema and kill him. It will greatly
improve data quality.
2) Now, decide if this column is a string or a numeric; change the
table to reflect this decision; add a CHECK() constraint mto enforce
the correct format. Go thru all of your code and clean it up.
3) Read any book on SQL programming.|||Sounds like it is possible that the text column has 0s for padding when it
is created. Prior to Casting perhaps you could use a substring or trim
function to clean up the data. You might have to put the data in a temp
table are requery it so that you query the clean stuff.
Keith
"Bill nguyen" <billn_nospam_please@.jaco.com> wrote in message
news:O3Ud$mBBGHA.1028@.TK2MSFTNGP11.phx.gbl...
>I need to use Group By on a text column that contain numeric data in
>different format.
> For example, column "terminalID" can contain "0123" and '123' pointing to
> the same terminal.
> Group by treats these as 2 different groups.
> I used CAST (terminalID as INT) as 'terminalID' in SELECT but still got
> the same problem since I cannot use CAST in Group By clause.
> Any help is greatly appreciated!
> Bill
>
> select CAST(terminalID as INT) as terminalID
> from table A
> group by terminalID
>
>|||Thank you all.
Dan's statement below solved the problem.
Celko's comments are seriously considered
Bill
"Dan Guzman" <guzmanda@.nospam-online.sbcglobal.net> wrote in message
news:uRKfgtBBGHA.240@.TK2MSFTNGP11.phx.gbl...
> CAST is allowed in a GROUP BY clause. The example below should work,
> assuming terminalID is always numeric.
> SELECT CAST(terminalID AS int) AS terminalID
> FROM MyTable
> GROUP BY CAST(terminalID AS int)
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Bill nguyen" <billn_nospam_please@.jaco.com> wrote in message
> news:O3Ud$mBBGHA.1028@.TK2MSFTNGP11.phx.gbl...
>
Wednesday, March 7, 2012
Group by on the text colum throws error
I have this query
paprojnumber is varchar
patx500 is text
palineitemseq is int
select Paprojnumber,Patx500,max(palineitemseq) from pa02101,pa01601
where
pa02101.pabillnoteidx=pa01601.pabillnoteidx group by
paprojnumber,patx500
it throws this error
Server: Msg 306, Level 16, State 2, Line 1
The text, ntext, and image data types cannot be compared or sorted,
except when using IS NULL or LIKE operator.
Thanks a lot for your help.
AJHere it means exactly what the error says. You cannot sort on a text field
(or NText field), which is what your "group by" code is trying to do.
"AJ" <aj70000@.hotmail.com> wrote in message
news:6097f505.0409300838.a81c800@.posting.google.co m...
> Hi ,
> I have this query
> paprojnumber is varchar
> patx500 is text
> palineitemseq is int
> select Paprojnumber,Patx500,max(palineitemseq) from pa02101,pa01601
> where
> pa02101.pabillnoteidx=pa01601.pabillnoteidx group by
> paprojnumber,patx500
> it throws this error
> Server: Msg 306, Level 16, State 2, Line 1
> The text, ntext, and image data types cannot be compared or sorted,
> except when using IS NULL or LIKE operator.
> Thanks a lot for your help.
> AJ|||On Thu, 30 Sep 2004 18:24:58 +0100, Robin Tucker wrote:
> Here it means exactly what the error says. You cannot sort on a text field
> (or NText field), which is what your "group by" code is trying to do.
You can, however, group by an expression using it:
select Paprojnumber,Patx500,max(palineitemseq)
from pa02101,pa01601
where pa02101.pabillnoteidx=pa01601.pabillnoteidx
group by paprojnumber,convert(varchar(50),patx500)
Sunday, February 19, 2012
Gridview Search
I tried doing a text box search within Gridview. My code are as follows. However, when I clicked on the search button, nothing shown.
Any help would be appreciated. I'm using an ODBC connection to MySql database. Could it be due to the parameters not accepted in MySql?
Protected
Sub Page_Load(ByVal senderAsObject,ByVal eAs System.EventArgs)
SqlDataSource1.SelectCommand =
"SELECT * FROM carrier_list WHERE carrierName LIKE '%' + @.carrierName + '%'"EndSub
Sub doSearch(ByVal SourceAsObject,ByVal EAs EventArgs)
GridViewCarrierList.DataSourceID ="SqlDataSource1"
GridViewCarrierList.DataBind()
EndSub
HTML CODES (Snippet)<asp:ButtonID="btnSearchCarrier"runat="server"onclick="doSearch"Text="Search"/>
' Gridview
<asp:GridViewID="GridViewCarrierList"runat="server"DataSourceID="SqlDataSource1">
<
asp:SqlDataSourceID="SqlDataSource2"runat="server"ConnectionString="<%$ ConnectionStrings:ConnectionString %>"ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"SelectCommand="SELECT * FROM carrier_list"></asp:SqlDataSource><asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:ConnectionString %>"ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>"><SelectParameters><asp:ControlParameterControlID="txtSearchCarrier"Name="carrierName"PropertyName="Text"Type="String"></asp:ControlParameter></SelectParameters>
</asp:SqlDataSource>
It's a syntax error on your SQL statement.
Try this:
SqlDataSource1.SelectCommand = "SELECT *FROM carrier_listWHERE carrierNameLIKE'%" + @.carrierName + "%'"
You had an extra ' after first '% and before last %'
Hope this helps and let me know if it worked.
Jae.|||
It reverted with a :
"Character is not valid." error.
Line 33: SqlDataSource1.SelectCommand = "SELECT * FROM carrier_list WHERE carrierName LIKE '%" + @.carrierName + "%'"
|||check what your server is passing to sqldatasource by doing following:
response.write("SELECT * FROM carrier_list WHERE carrierName LIKE '%" + @.carrierName + "%'")
it print out:
SELECT * FROM carrier_list WHERE carrierName LIKE %yourvalue%
Also, note that your value (carrierName) should not contain any single quote or double quote.
Hope this helps.
Jae.
|||check what your server is passing to sqldatasource by doing following:
response.write("SELECT * FROM carrier_list WHERE carrierName LIKE '%" + @.carrierName + "%'")
it print out:
SELECT * FROM carrier_list WHERE carrierName LIKE '%yourvalue%'
Also, note that your value (carrierName) should not contain any single quote or double quote.
Hope this helps.
Jae.
|||Hi it still prompts the same error:
response.write(
"SELECT * FROM carrier_list WHERE carrierName'%" + @.carrierName + "%'")|||i just looked at your code from beginning again.
1. it's VB, so why should you use +? instead of &? (sorry i thought of C#)
2. you're mising LIKE on above statement.
3. you can't LITERALLY pass @.carrierName as value. Your value is txtSearchCarrier.text
4. I don't understand why you have 2 sqldatasource (Delete sqldatasource2 - this will show same effect, read on)
So, let's write it again and clean up a bit:
SqlDataSource.SelectCommand = "select * from carrier_list where carriername like '%" & txtSearchCarrier.text & "%'"
Also, you don't need <controlparameter> tag within "select parameter", try this approach:
HTML CODES (Snippet)
<asp:Textbox id="txtSearchCarrier" runat="server"/>
<asp:Button ID="btnSearchCarrier" runat="server" onclick="doSearch" Text="Search" />
' Gridview
<asp:GridView ID="GridViewCarrierList" runat="server" DataSourceID="SqlDataSource1" />
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" />
That's it.
This will show ALL carriers like you had with sqldatasource2, but with only one sqldatasource1 (because it will pass like '%%' whichi will return all)
*** Also, when carrier name is typed into txtSearchCarrier (obviously a textbox), it will return result sets with characters displayed in textbox.
*** Also, you should have your LOAD_PAGE empty.
If you don't want to diplay anything at first, don't bind DataSourceID = "sqldatasource1", but rather do it on btnSearchCarrier_OnClick handler.
Something like this:
sub btnSeachCarrier_OnClick (....)
.... you other code ...
gridViewCarrierList.datasourceid = "sqlDataSouce1"
gridViewCarrierList.databind()
end sub
This way, you only retrieve data when you click "searchcarrier" button.
Hope this helps and if it doesn't send me the aspx page and I will help you with it. (send it to my email,jae.lee@.jaeleeandco.com)
Jae.
|||just in case, you HAVE to do following:
1. delete PAGE_LOAD
2. add select command to on_click look at below:
sub btnSeachCarrier_OnClick (....)
.... you other code ...
SqlDataSource.SelectCommand = "select * from carrier_list where carriername like '%" & txtSearchCarrier.text & "%'"
gridViewCarrierList.datasourceid = "sqlDataSouce1"
gridViewCarrierList.databind()
end sub
Thanks Jae,
Actually I used
SqlDataSource1.SelectCommand ="SELECT * FROM carrier_list WHERE carrierName LIKE ? '%' ORDER BY carrierName ASC"
instead and it works.
Will try your suggestion too! Thanks!
Grid vs Text output
the option to change the output from grid to text for printing if
needed. My question is, can this be programmed so a stored procedure
will always print in text without having to manually change the window
each time the procedure is run? I could find nothing under the logical
searches in books online.
Thanks JABYou can modify the QA to use text or use a grid regardless what you are
running in the QA. You can't set default behavior for each object or
each type of object.
Adi
jab wrote:
Quote:
Originally Posted by
In SQL Query Analyzer, there is a Query drop down window that gives you
the option to change the output from grid to text for printing if
needed. My question is, can this be programmed so a stored procedure
will always print in text without having to manually change the window
each time the procedure is run? I could find nothing under the logical
searches in books online.
>
Thanks JAB
Grid mode, Query Analyzer
Does anyone know how to force Query Analyzer in Grid mode
to return results in chunks like it is in Text Mode? For
instance, when I have a query that returns results in a
loop, in Grid mode I would have to wait until the loop
exits to see the whole lot of them. With Text mode it's
different - I see results as I go.
Thanks,
Oskar
I do not think this is possible. Speaking as a developer, the grids in QA
auto adjusts their width taking into account the length of the header and
data, which would only be possible once you've loaded all the data into the
grid.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> Hi,
> Does anyone know how to force Query Analyzer in Grid mode
> to return results in chunks like it is in Text Mode? For
> instance, when I have a query that returns results in a
> loop, in Grid mode I would have to wait until the loop
> exits to see the whole lot of them. With Text mode it's
> different - I see results as I go.
> --
> Thanks,
> Oskar
>
|||I can't see a problem here: each result returned in a loop
has its own headers and data, the length of which should
be known. Maybe Query Analyzer just can't/won't read this
information during the execution?
Thanks,
Oskar
>--Original Message--
>I do not think this is possible. Speaking as a
developer, the grids in QA
>auto adjusts their width taking into account the length
of the header and
>data, which would only be possible once you've loaded all
the data into the
>grid.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
mode
>
>.
>
|||You mean there are multiple result sets returned? Then you're right, QA
(theoretically) should be able to display each result set as they come in.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...[vbcol=seagreen]
> I can't see a problem here: each result returned in a loop
> has its own headers and data, the length of which should
> be known. Maybe Query Analyzer just can't/won't read this
> information during the execution?
> --
> Thanks,
> Oskar
> developer, the grids in QA
> of the header and
> the data into the
> free!
> message
> mode
|||You're right, multiple result sets.
>--Original Message--
>You mean there are multiple result sets returned? Then
you're right, QA
>(theoretically) should be able to display each result set
as they come in.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message[vbcol=seagreen]
>news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
loop[vbcol=seagreen]
this[vbcol=seagreen]
all[vbcol=seagreen]
Lite,[vbcol=seagreen]
For[vbcol=seagreen]
in a[vbcol=seagreen]
loop[vbcol=seagreen]
it's
>
>.
>
Grid mode, Query Analyzer
Does anyone know how to force Query Analyzer in Grid mode
to return results in chunks like it is in Text Mode? For
instance, when I have a query that returns results in a
loop, in Grid mode I would have to wait until the loop
exits to see the whole lot of them. With Text mode it's
different - I see results as I go.
Thanks,
OskarI do not think this is possible. Speaking as a developer, the grids in QA
auto adjusts their width taking into account the length of the header and
data, which would only be possible once you've loaded all the data into the
grid.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> Hi,
> Does anyone know how to force Query Analyzer in Grid mode
> to return results in chunks like it is in Text Mode? For
> instance, when I have a query that returns results in a
> loop, in Grid mode I would have to wait until the loop
> exits to see the whole lot of them. With Text mode it's
> different - I see results as I go.
> --
> Thanks,
> Oskar
>|||I can't see a problem here: each result returned in a loop
has its own headers and data, the length of which should
be known. Maybe Query Analyzer just can't/won't read this
information during the execution?
Thanks,
Oskar
>--Original Message--
>I do not think this is possible. Speaking as a
developer, the grids in QA
>auto adjusts their width taking into account the length
of the header and
>data, which would only be possible once you've loaded all
the data into the
>grid.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
mode[vbcol=seagreen]
>
>.
>|||You mean there are multiple result sets returned? Then you're right, QA
(theoretically) should be able to display each result set as they come in.
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...[vbcol=seagreen]
> I can't see a problem here: each result returned in a loop
> has its own headers and data, the length of which should
> be known. Maybe Query Analyzer just can't/won't read this
> information during the execution?
> --
> Thanks,
> Oskar
>
> developer, the grids in QA
> of the header and
> the data into the
> free!
> message
> mode|||You're right, multiple result sets.
>--Original Message--
>You mean there are multiple result sets returned? Then
you're right, QA
>(theoretically) should be able to display each result set
as they come in.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
loop[vbcol=seagreen]
this[vbcol=seagreen]
all[vbcol=seagreen]
Lite,[vbcol=seagreen]
For[vbcol=seagreen]
in a[vbcol=seagreen]
loop[vbcol=seagreen]
it's[vbcol=seagreen]
>
>.
>
Grid mode, Query Analyzer
Does anyone know how to force Query Analyzer in Grid mode
to return results in chunks like it is in Text Mode? For
instance, when I have a query that returns results in a
loop, in Grid mode I would have to wait until the loop
exits to see the whole lot of them. With Text mode it's
different - I see results as I go.
--
Thanks,
OskarI do not think this is possible. Speaking as a developer, the grids in QA
auto adjusts their width taking into account the length of the header and
data, which would only be possible once you've loaded all the data into the
grid.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> Hi,
> Does anyone know how to force Query Analyzer in Grid mode
> to return results in chunks like it is in Text Mode? For
> instance, when I have a query that returns results in a
> loop, in Grid mode I would have to wait until the loop
> exits to see the whole lot of them. With Text mode it's
> different - I see results as I go.
> --
> Thanks,
> Oskar
>|||I can't see a problem here: each result returned in a loop
has its own headers and data, the length of which should
be known. Maybe Query Analyzer just can't/won't read this
information during the execution?
--
Thanks,
Oskar
>--Original Message--
>I do not think this is possible. Speaking as a
developer, the grids in QA
>auto adjusts their width taking into account the length
of the header and
>data, which would only be possible once you've loaded all
the data into the
>grid.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
>> Hi,
>> Does anyone know how to force Query Analyzer in Grid
mode
>> to return results in chunks like it is in Text Mode? For
>> instance, when I have a query that returns results in a
>> loop, in Grid mode I would have to wait until the loop
>> exits to see the whole lot of them. With Text mode it's
>> different - I see results as I go.
>> --
>> Thanks,
>> Oskar
>
>.
>|||You mean there are multiple result sets returned? Then you're right, QA
(theoretically) should be able to display each result set as they come in.
--
Peter Yeoh
http://www.yohz.com
Need smaller SQL2K backup files? Use MiniSQLBackup Lite, free!
"Oskar" <anonymous@.discussions.microsoft.com> wrote in message
news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
> I can't see a problem here: each result returned in a loop
> has its own headers and data, the length of which should
> be known. Maybe Query Analyzer just can't/won't read this
> information during the execution?
> --
> Thanks,
> Oskar
> >--Original Message--
> >I do not think this is possible. Speaking as a
> developer, the grids in QA
> >auto adjusts their width taking into account the length
> of the header and
> >data, which would only be possible once you've loaded all
> the data into the
> >grid.
> >
> >--
> >Peter Yeoh
> >http://www.yohz.com
> >Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
> free!
> >
> >
> >"Oskar" <anonymous@.discussions.microsoft.com> wrote in
> message
> >news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
> >> Hi,
> >>
> >> Does anyone know how to force Query Analyzer in Grid
> mode
> >> to return results in chunks like it is in Text Mode? For
> >> instance, when I have a query that returns results in a
> >> loop, in Grid mode I would have to wait until the loop
> >> exits to see the whole lot of them. With Text mode it's
> >> different - I see results as I go.
> >>
> >> --
> >> Thanks,
> >> Oskar
> >>
> >
> >
> >.
> >|||You're right, multiple result sets.
>--Original Message--
>You mean there are multiple result sets returned? Then
you're right, QA
>(theoretically) should be able to display each result set
as they come in.
>--
>Peter Yeoh
>http://www.yohz.com
>Need smaller SQL2K backup files? Use MiniSQLBackup Lite,
free!
>
>"Oskar" <anonymous@.discussions.microsoft.com> wrote in
message
>news:2de601c4b1c0$5c2592e0$a501280a@.phx.gbl...
>> I can't see a problem here: each result returned in a
loop
>> has its own headers and data, the length of which should
>> be known. Maybe Query Analyzer just can't/won't read
this
>> information during the execution?
>> --
>> Thanks,
>> Oskar
>> >--Original Message--
>> >I do not think this is possible. Speaking as a
>> developer, the grids in QA
>> >auto adjusts their width taking into account the length
>> of the header and
>> >data, which would only be possible once you've loaded
all
>> the data into the
>> >grid.
>> >
>> >--
>> >Peter Yeoh
>> >http://www.yohz.com
>> >Need smaller SQL2K backup files? Use MiniSQLBackup
Lite,
>> free!
>> >
>> >
>> >"Oskar" <anonymous@.discussions.microsoft.com> wrote in
>> message
>> >news:086101c4b1b2$df5fd070$a401280a@.phx.gbl...
>> >> Hi,
>> >>
>> >> Does anyone know how to force Query Analyzer in Grid
>> mode
>> >> to return results in chunks like it is in Text Mode?
For
>> >> instance, when I have a query that returns results
in a
>> >> loop, in Grid mode I would have to wait until the
loop
>> >> exits to see the whole lot of them. With Text mode
it's
>> >> different - I see results as I go.
>> >>
>> >> --
>> >> Thanks,
>> >> Oskar
>> >>
>> >
>> >
>> >.
>> >
>
>.
>