Showing posts with label oracle. Show all posts
Showing posts with label oracle. Show all posts

Thursday, March 29, 2012

Aligning Check Boxes with Text Boxes - Is it near Impossible?

I have a report that we give to our Doctors to fill out that has patient
information on it. One of the things we are supposed to have on the report
is a checkbox for symptoms found. I would like it if I could get a check box
to align with its associated text. If you have over 3 rows of this on your
report they all start to get out of alignment. The more rows you have the
more out of whack it becomes, until it looks like the texbox has no
association with its associated check box.
This is very frustrating. I just spent about four hours tweaking a report
to get them to look okay but yet they still are not aligned exactly as they
should be.
To create the check box I am using the wingdings font lower case 'o'
character. Of course I cannot put the wingdings font in the same text box as
the symptoms textbox as then the symptoms would be gibberish.
Any thoughts on how to make this process easier, more accurate? I am using
a listbox as my container.
--
Thank you,
Johnone thing I liked about crystal reports is you can change formatting of
individual characters in a text box... cant do this in reporting server
unfortinuatly...
"John A" <i-code4food@.newsgroups.nospam> wrote in message
news:D8DC91FB-52E7-41B4-8C83-6A8F03EF98E5@.microsoft.com...
>I have a report that we give to our Doctors to fill out that has patient
> information on it. One of the things we are supposed to have on the
> report
> is a checkbox for symptoms found. I would like it if I could get a check
> box
> to align with its associated text. If you have over 3 rows of this on
> your
> report they all start to get out of alignment. The more rows you have the
> more out of whack it becomes, until it looks like the texbox has no
> association with its associated check box.
> This is very frustrating. I just spent about four hours tweaking a report
> to get them to look okay but yet they still are not aligned exactly as
> they
> should be.
> To create the check box I am using the wingdings font lower case 'o'
> character. Of course I cannot put the wingdings font in the same text box
> as
> the symptoms textbox as then the symptoms would be gibberish.
> Any thoughts on how to make this process easier, more accurate? I am
> using
> a listbox as my container.
> --
> Thank you,
> John|||John,
Do you have to use a listbox as your container?
If you use a two column table with your check boxes in the first
column and your symptoms in the second, they should stay lined up.
Otherwise maybe use open and closed brackets or parens (e.g. [ ] or
{ } or ( ) ) as your "checkbox" inside the symptom's text boxes.
Good luck and happy reporting!!

Aligning 2 charts

I have a report with 2 charts as subreports. The X axis is time and
the charts show different data over the same time period.
I would like to position the charts so that corresponding X axis
values are aligned vertically. This seems to work if the Y axis scales
are the same ie. the labels are the same length, but if the scales are
different the charts don't quite align. The chart types might also be
causing problems i.e. Area vs. Line - it looks like they may be drawn
with different margins as well as different values on the Y scale.
Essentially, I need to get the left hand edges of the charts to line
up.
Is there a way to align these charts the way I want?
--
Andrew RowleyOn Aug 21, 8:50 pm, Andrew Rowley <aj...@.newsgroup.nospam> wrote:
> I have a report with 2 charts as subreports. The X axis is time and
> the charts show different data over the same time period.
> I would like to position the charts so that corresponding X axis
> values are aligned vertically. This seems to work if the Y axis scales
> are the same ie. the labels are the same length, but if the scales are
> different the charts don't quite align. The chart types might also be
> causing problems i.e. Area vs. Line - it looks like they may be drawn
> with different margins as well as different values on the Y scale.
> Essentially, I need to get the left hand edges of the charts to line
> up.
> Is there a way to align these charts the way I want?
> --
> Andrew Rowley
I'm not sure if this will help, but you might try putting the 2 charts
in the same subreport or in the main report and/or inside a rectangle
control. Normally, subreports are a little difficult to align. Hope
this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||You could also try setting the scale (interval) of the y axis yourself.
"EMartinez" wrote:
> On Aug 21, 8:50 pm, Andrew Rowley <aj...@.newsgroup.nospam> wrote:
> > I have a report with 2 charts as subreports. The X axis is time and
> > the charts show different data over the same time period.
> >
> > I would like to position the charts so that corresponding X axis
> > values are aligned vertically. This seems to work if the Y axis scales
> > are the same ie. the labels are the same length, but if the scales are
> > different the charts don't quite align. The chart types might also be
> > causing problems i.e. Area vs. Line - it looks like they may be drawn
> > with different margins as well as different values on the Y scale.
> >
> > Essentially, I need to get the left hand edges of the charts to line
> > up.
> >
> > Is there a way to align these charts the way I want?
> > --
> > Andrew Rowley
>
> I'm not sure if this will help, but you might try putting the 2 charts
> in the same subreport or in the main report and/or inside a rectangle
> control. Normally, subreports are a little difficult to align. Hope
> this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>|||David <David@.discussions.microsoft.com> wrote:
>You could also try setting the scale (interval) of the y axis yourself.
The problem is the scales need to be different, e.g. one is 0-100 and
the other is 0-5.
--
Andrew Rowley|||Hello Andrew,
You need to get the same font size for your X Axis label of both Charts.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

alignement data

My application has production server and backup sever for data reporting .
There is some tools in SQL 2K (or third part tool) for alignement data at
run time between two servers?
Thanks in advance
StperAre you talking about transforming data? Have you explored DTS? See SQL
Server Books Online for more information.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"stefano perab" <stefano.perabo@.speedautomazione.it> wrote in message
news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
My application has production server and backup sever for data reporting .
There is some tools in SQL 2K (or third part tool) for alignement data at
run time between two servers?
Thanks in advance
Stper|||Hi Vyas,
It seems Stper need to syncronize the report server with production server
online.
Stper,
If above is the case you can go for either of the below approach
1. Transactional Replication
2. Log Shipping
This method will sync. the Report server database with report server.
Thanks
Hari
MCDBA
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> Are you talking about transforming data? Have you explored DTS? See SQL
> Server Books Online for more information.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "stefano perab" <stefano.perabo@.speedautomazione.it> wrote in message
> news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> My application has production server and backup sever for data reporting
.
> There is some tools in SQL 2K (or third part tool) for alignement data at
> run time between two servers?
> Thanks in advance
> Stper
>
>|||In that case, I'd strongly recommend transactional replication. It is meant
to satisfy reporting requirements.
Log shipping is ideal for maintaining standby servers, but not really for
reporting purposes.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
Hi Vyas,
It seems Stper need to syncronize the report server with production server
online.
Stper,
If above is the case you can go for either of the below approach
1. Transactional Replication
2. Log Shipping
This method will sync. the Report server database with report server.
Thanks
Hari
MCDBA
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> Are you talking about transforming data? Have you explored DTS? See SQL
> Server Books Online for more information.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "stefano perab" <stefano.perabo@.speedautomazione.it> wrote in message
> news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> My application has production server and backup sever for data reporting
.
> There is some tools in SQL 2K (or third part tool) for alignement data at
> run time between two servers?
> Thanks in advance
> Stper
>
>|||Thanks Hari, i think the Transactional Replication is the solution for my
problem. Now i must study the configuration
I found this an article in
www.awprofessional.com/articles/article.asp?p=170234
Do you have some suggestion for examples and/or configuration
Thanks
Stper
"Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
> Hi Vyas,
> It seems Stper need to syncronize the report server with production server
> online.
> Stper,
> If above is the case you can go for either of the below approach
> 1. Transactional Replication
> 2. Log Shipping
> This method will sync. the Report server database with report server.
> Thanks
> Hari
> MCDBA
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
reporting[vbcol=seagreen]
> .
at[vbcol=seagreen]
>|||stper,
Books Online is a very valuable reference.
http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
to replication. There is a book coming soon on Snapshot and
Transactional replication from Hilary Cotter which is excellent, see the
link in my sig.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
stper wrote:
> Thanks Hari, i think the Transactional Replication is the solution for my
> problem. Now i must study the configuration
> I found this an article in
> www.awprofessional.com/articles/article.asp?p=170234
> Do you have some suggestion for examples and/or configuration
> Thanks
> Stper
> "Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
> news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
>
> reporting
>
> at
>
>|||i made the configuration and now i testing my first "PULL SUbscription".
Unfortunately i have my first error message : "Unexpected EOF encountered in
BCP data-file" when i run with alignement.
Do yuo have some suggestion ?
stper
"Mark Allison" <marka@.no.tinned.meat.mvps.org> ha scritto nel messaggio
news:#7aQdhybEHA.4092@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> stper,
> Books Online is a very valuable reference.
> http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
> to replication. There is a book coming soon on Snapshot and
> Transactional replication from Hilary Cotter which is excellent, see the
> link in my sig.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> stper wrote:
my[vbcol=seagreen]
server[vbcol=seagreen]|||After testing and testying i can say (like Pitagora) : EUREKA !!!
now i must tuning the task but the functionality work very well.
Thanks
Stper
"stper" <stefano.perabo@.speedautomazione.it> ha scritto nel messaggio
news:eZICqZzbEHA.596@.TK2MSFTNGP11.phx.gbl...
> i made the configuration and now i testing my first "PULL SUbscription".
> Unfortunately i have my first error message : "Unexpected EOF encountered
in
> BCP data-file" when i run with alignement.
> Do yuo have some suggestion ?
> stper
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> ha scritto nel messaggio
> news:#7aQdhybEHA.4092@.TK2MSFTNGP11.phx.gbl...
> my
> server
SQL[vbcol=seagreen]
message[vbcol=seagreen]
data[vbcol=seagreen]
>

alignement data

My application has production server and backup sever for data reporting .
There is some tools in SQL 2K (or third part tool) for alignement data at
run time between two servers?
Thanks in advance
Stper
Are you talking about transforming data? Have you explored DTS? See SQL
Server Books Online for more information.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"stefano perab" <stefano.perabo@.speedautomazione.it> wrote in message
news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
My application has production server and backup sever for data reporting .
There is some tools in SQL 2K (or third part tool) for alignement data at
run time between two servers?
Thanks in advance
Stper
|||Hi Vyas,
It seems Stper need to syncronize the report server with production server
online.
Stper,
If above is the case you can go for either of the below approach
1. Transactional Replication
2. Log Shipping
This method will sync. the Report server database with report server.
Thanks
Hari
MCDBA
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> Are you talking about transforming data? Have you explored DTS? See SQL
> Server Books Online for more information.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "stefano perab" <stefano.perabo@.speedautomazione.it> wrote in message
> news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> My application has production server and backup sever for data reporting
..
> There is some tools in SQL 2K (or third part tool) for alignement data at
> run time between two servers?
> Thanks in advance
> Stper
>
>
|||In that case, I'd strongly recommend transactional replication. It is meant
to satisfy reporting requirements.
Log shipping is ideal for maintaining standby servers, but not really for
reporting purposes.
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
Hi Vyas,
It seems Stper need to syncronize the report server with production server
online.
Stper,
If above is the case you can go for either of the below approach
1. Transactional Replication
2. Log Shipping
This method will sync. the Report server database with report server.
Thanks
Hari
MCDBA
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> Are you talking about transforming data? Have you explored DTS? See SQL
> Server Books Online for more information.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "stefano perab" <stefano.perabo@.speedautomazione.it> wrote in message
> news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> My application has production server and backup sever for data reporting
..
> There is some tools in SQL 2K (or third part tool) for alignement data at
> run time between two servers?
> Thanks in advance
> Stper
>
>
|||Thanks Hari, i think the Transactional Replication is the solution for my
problem. Now i must study the configuration
I found this an article in
http://www.awprofessional.com/articl...e.asp?p=170234
Do you have some suggestion for examples and/or configuration
Thanks
Stper
"Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> Hi Vyas,
> It seems Stper need to syncronize the report server with production server
> online.
> Stper,
> If above is the case you can go for either of the below approach
> 1. Transactional Replication
> 2. Log Shipping
> This method will sync. the Report server database with report server.
> Thanks
> Hari
> MCDBA
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
reporting[vbcol=seagreen]
> .
at
>
|||stper,
Books Online is a very valuable reference.
http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
to replication. There is a book coming soon on Snapshot and
Transactional replication from Hilary Cotter which is excellent, see the
link in my sig.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
stper wrote:
> Thanks Hari, i think the Transactional Replication is the solution for my
> problem. Now i must study the configuration
> I found this an article in
> http://www.awprofessional.com/articl...e.asp?p=170234
> Do you have some suggestion for examples and/or configuration
> Thanks
> Stper
> "Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
> news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
>
> reporting
>
> at
>
>
|||i made the configuration and now i testing my first "PULL SUbscription".
Unfortunately i have my first error message : "Unexpected EOF encountered in
BCP data-file" when i run with alignement.
Do yuo have some suggestion ?
stper
"Mark Allison" <marka@.no.tinned.meat.mvps.org> ha scritto nel messaggio
news:#7aQdhybEHA.4092@.TK2MSFTNGP11.phx.gbl...[vbcol=seagreen]
> stper,
> Books Online is a very valuable reference.
> http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
> to replication. There is a book coming soon on Snapshot and
> Transactional replication from Hilary Cotter which is excellent, see the
> link in my sig.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> stper wrote:
my[vbcol=seagreen]
server[vbcol=seagreen]
|||After testing and testying i can say (like Pitagora) : EUREKA !!!
now i must tuning the task but the functionality work very well.
Thanks
Stper
"stper" <stefano.perabo@.speedautomazione.it> ha scritto nel messaggio
news:eZICqZzbEHA.596@.TK2MSFTNGP11.phx.gbl...
> i made the configuration and now i testing my first "PULL SUbscription".
> Unfortunately i have my first error message : "Unexpected EOF encountered
in[vbcol=seagreen]
> BCP data-file" when i run with alignement.
> Do yuo have some suggestion ?
> stper
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> ha scritto nel messaggio
> news:#7aQdhybEHA.4092@.TK2MSFTNGP11.phx.gbl...
> my
> server
SQL[vbcol=seagreen]
message[vbcol=seagreen]
data
>

alignement data

My application has production server and backup sever for data reporting .
There is some tools in SQL 2K (or third part tool) for alignement data at
run time between two servers?
Thanks in advance
StperAre you talking about transforming data? Have you explored DTS? See SQL
Server Books Online for more information.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in message
news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
My application has production server and backup sever for data reporting .
There is some tools in SQL 2K (or third part tool) for alignement data at
run time between two servers?
Thanks in advance
Stper|||Hi Vyas,
It seems Stper need to syncronize the report server with production server
online.
Stper,
If above is the case you can go for either of the below approach
1. Transactional Replication
2. Log Shipping
This method will sync. the Report server database with report server.
Thanks
Hari
MCDBA
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> Are you talking about transforming data? Have you explored DTS? See SQL
> Server Books Online for more information.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in message
> news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> My application has production server and backup sever for data reporting
.
> There is some tools in SQL 2K (or third part tool) for alignement data at
> run time between two servers?
> Thanks in advance
> Stper
>
>|||In that case, I'd strongly recommend transactional replication. It is meant
to satisfy reporting requirements.
Log shipping is ideal for maintaining standby servers, but not really for
reporting purposes.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
Hi Vyas,
It seems Stper need to syncronize the report server with production server
online.
Stper,
If above is the case you can go for either of the below approach
1. Transactional Replication
2. Log Shipping
This method will sync. the Report server database with report server.
Thanks
Hari
MCDBA
"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> Are you talking about transforming data? Have you explored DTS? See SQL
> Server Books Online for more information.
> --
> HTH,
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in message
> news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> My application has production server and backup sever for data reporting
.
> There is some tools in SQL 2K (or third part tool) for alignement data at
> run time between two servers?
> Thanks in advance
> Stper
>
>|||Thanks Hari, i think the Transactional Replication is the solution for my
problem. Now i must study the configuration
I found this an article in
www.awprofessional.com/articles/article.asp?p=170234
Do you have some suggestion for examples and/or configuration
Thanks
Stper
"Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
> Hi Vyas,
> It seems Stper need to syncronize the report server with production server
> online.
> Stper,
> If above is the case you can go for either of the below approach
> 1. Transactional Replication
> 2. Log Shipping
> This method will sync. the Report server database with report server.
> Thanks
> Hari
> MCDBA
> "Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> > Are you talking about transforming data? Have you explored DTS? See SQL
> > Server Books Online for more information.
> > --
> > HTH,
> > Vyas, MVP (SQL Server)
> > http://vyaskn.tripod.com/
> >
> >
> > "stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in message
> > news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> > My application has production server and backup sever for data
reporting
> .
> > There is some tools in SQL 2K (or third part tool) for alignement data
at
> > run time between two servers?
> > Thanks in advance
> >
> > Stper
> >
> >
> >
>|||stper,
Books Online is a very valuable reference.
http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
to replication. There is a book coming soon on Snapshot and
Transactional replication from Hilary Cotter which is excellent, see the
link in my sig.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
stper wrote:
> Thanks Hari, i think the Transactional Replication is the solution for my
> problem. Now i must study the configuration
> I found this an article in
> www.awprofessional.com/articles/article.asp?p=170234
> Do you have some suggestion for examples and/or configuration
> Thanks
> Stper
> "Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
> news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
>>Hi Vyas,
>>It seems Stper need to syncronize the report server with production server
>>online.
>>Stper,
>>If above is the case you can go for either of the below approach
>>1. Transactional Replication
>>2. Log Shipping
>>This method will sync. the Report server database with report server.
>>Thanks
>>Hari
>>MCDBA
>>"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
>>news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
>>Are you talking about transforming data? Have you explored DTS? See SQL
>>Server Books Online for more information.
>>--
>>HTH,
>>Vyas, MVP (SQL Server)
>>http://vyaskn.tripod.com/
>>
>>"stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in message
>>news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
>>My application has production server and backup sever for data
> reporting
>>.
>>There is some tools in SQL 2K (or third part tool) for alignement data
> at
>>run time between two servers?
>>Thanks in advance
>>Stper
>>
>>
>|||i made the configuration and now i testing my first "PULL SUbscription".
Unfortunately i have my first error message : "Unexpected EOF encountered in
BCP data-file" when i run with alignement.
Do yuo have some suggestion ?
stper
"Mark Allison" <marka@.no.tinned.meat.mvps.org> ha scritto nel messaggio
news:#7aQdhybEHA.4092@.TK2MSFTNGP11.phx.gbl...
> stper,
> Books Online is a very valuable reference.
> http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
> to replication. There is a book coming soon on Snapshot and
> Transactional replication from Hilary Cotter which is excellent, see the
> link in my sig.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
>
> stper wrote:
> > Thanks Hari, i think the Transactional Replication is the solution for
my
> > problem. Now i must study the configuration
> > I found this an article in
> > www.awprofessional.com/articles/article.asp?p=170234
> > Do you have some suggestion for examples and/or configuration
> >
> > Thanks
> > Stper
> >
> > "Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
> > news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
> >
> >>Hi Vyas,
> >>
> >>It seems Stper need to syncronize the report server with production
server
> >>online.
> >>
> >>Stper,
> >>
> >>If above is the case you can go for either of the below approach
> >>
> >>1. Transactional Replication
> >>
> >>2. Log Shipping
> >>
> >>This method will sync. the Report server database with report server.
> >>
> >>Thanks
> >>Hari
> >>MCDBA
> >>
> >>"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> >>news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> >>
> >>Are you talking about transforming data? Have you explored DTS? See SQL
> >>Server Books Online for more information.
> >>--
> >>HTH,
> >>Vyas, MVP (SQL Server)
> >>http://vyaskn.tripod.com/
> >>
> >>
> >>"stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in message
> >>news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> >>My application has production server and backup sever for data
> >
> > reporting
> >
> >>.
> >>
> >>There is some tools in SQL 2K (or third part tool) for alignement data
> >
> > at
> >
> >>run time between two servers?
> >>Thanks in advance
> >>
> >>Stper
> >>
> >>
> >>
> >>
> >>
> >
> >|||After testing and testying i can say (like Pitagora) : EUREKA !!!
now i must tuning the task but the functionality work very well.
Thanks
Stper
"stper" <stefano.perabo@.speedautomazione.it> ha scritto nel messaggio
news:eZICqZzbEHA.596@.TK2MSFTNGP11.phx.gbl...
> i made the configuration and now i testing my first "PULL SUbscription".
> Unfortunately i have my first error message : "Unexpected EOF encountered
in
> BCP data-file" when i run with alignement.
> Do yuo have some suggestion ?
> stper
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> ha scritto nel messaggio
> news:#7aQdhybEHA.4092@.TK2MSFTNGP11.phx.gbl...
> > stper,
> >
> > Books Online is a very valuable reference.
> > http://www.mssqlserver.com/replication/primer_p1.asp has a nice primer
> > to replication. There is a book coming soon on Snapshot and
> > Transactional replication from Hilary Cotter which is excellent, see the
> > link in my sig.
> >
> > --
> > Mark Allison, SQL Server MVP
> > http://www.markallison.co.uk
> >
> > Looking for a SQL Server replication book?
> > http://www.nwsu.com/0974973602.html
> >
> >
> >
> > stper wrote:
> > > Thanks Hari, i think the Transactional Replication is the solution for
> my
> > > problem. Now i must study the configuration
> > > I found this an article in
> > > www.awprofessional.com/articles/article.asp?p=170234
> > > Do you have some suggestion for examples and/or configuration
> > >
> > > Thanks
> > > Stper
> > >
> > > "Hari Prasad" <hari_prasad_k@.hotmail.com> ha scritto nel messaggio
> > > news:#AoYEqxbEHA.3480@.TK2MSFTNGP11.phx.gbl...
> > >
> > >>Hi Vyas,
> > >>
> > >>It seems Stper need to syncronize the report server with production
> server
> > >>online.
> > >>
> > >>Stper,
> > >>
> > >>If above is the case you can go for either of the below approach
> > >>
> > >>1. Transactional Replication
> > >>
> > >>2. Log Shipping
> > >>
> > >>This method will sync. the Report server database with report server.
> > >>
> > >>Thanks
> > >>Hari
> > >>MCDBA
> > >>
> > >>"Narayana Vyas Kondreddi" <answer_me@.hotmail.com> wrote in message
> > >>news:uDRYaMxbEHA.3988@.tk2msftngp13.phx.gbl...
> > >>
> > >>Are you talking about transforming data? Have you explored DTS? See
SQL
> > >>Server Books Online for more information.
> > >>--
> > >>HTH,
> > >>Vyas, MVP (SQL Server)
> > >>http://vyaskn.tripod.com/
> > >>
> > >>
> > >>"stefano perabò" <stefano.perabo@.speedautomazione.it> wrote in
message
> > >>news:%23wzR3DxbEHA.556@.tk2msftngp13.phx.gbl...
> > >>My application has production server and backup sever for data
> > >
> > > reporting
> > >
> > >>.
> > >>
> > >>There is some tools in SQL 2K (or third part tool) for alignement
data
> > >
> > > at
> > >
> > >>run time between two servers?
> > >>Thanks in advance
> > >>
> > >>Stper
> > >>
> > >>
> > >>
> > >>
> > >>
> > >
> > >
>sql

Tuesday, March 27, 2012

align the parameters in reports

IS it possible to design the Parameters Layout in Reporting Service
reports
miniYou can modify styles in HTMLViewer.css style sheet present in Reporting
Services\ReportServer\Styles folder but you will only affect appearance of
the elements, not the distribution or type of controls you want to show.
If you want to fully customize that layout, you need to use reporting
services API, as I have done. For example, I have used radio buttons to
choose report parameters instead of the default combobox.
Jaime
"mini" wrote:
> IS it possible to design the Parameters Layout in Reporting Service
> reports
> mini
>|||thanks Jaime
can u explain how you use reporting
services API?
Can u reduce the Textbox width displayed in parameter layout?
thanks
mini

Align image

I have an image in a table cell in my report. Naturally not all images fit 100% in the cell which is why I'd like to align the images in the middle of the cell, horisontally and vertically.

I've been unable to figure out how to do this in Reporting Services for SQL Server 2000. Am I missing something or is this simply not possible? Does anyone know whether it can be done in 2005?

try manipulating the padding values Big Smile|||I would but we're talking an entire column of images of varying sizes here thus I would have to calculate the correct padding size based on the size of the column and of the image itself. It seems like a little much for such a simple thing.|||I have not seen any built in functionality for this in reporting services so I guess your options are pretty limited. Padding values are a sure way to get this done but you could have the cell fixed sized and have your image fit proportionally|||http://blogs.msdn.com/ChrisHays/

this link tells you what i been saying all along. paddings are the only way to go.

and the working sample is here

Align Calculated Members and Measures

Hi

I created two calculated member:

CREATEMEMBERCURRENTCUBE.[MEASURES].[Penetracion]

ASIIf([Measures].[Surtimientos] = 0,0,[Measures].[Seguros]/[Measures].[Surtimientos]),

FORMAT_STRING = "Percent",

VISIBLE = 1;

CREATEMEMBERCURRENTCUBE.[MEASURES].[Calidad]

ASIIf([Measures].[Seguros] = 0,0,[Measures].[Prima Seguros]/[Measures].[Seguros]),

FORMAT_STRING = "$#,##0.00",

VISIBLE = 1 ;

I have two measures called [Measures].[Surtimientos] and [Measures].[Seguros] and both have its FormatString property #,#.

When I browse the cube the measure and calculated meber values ared formated but they have left alignment. If I take away the FormatString they have right alignment.

Is there a way to align the values to right when I use FormatString?

Regards

If you change FORMAT_STRING = "$#,##0.00", to FORMAT_STRING = "$# ##0.00"?

Regards

Thomas Ivarsson

aliasing two columns in SQL

Hi,

Here is my original query:

select rosterid, lastname, firstname from table
order by lastname

I would like to use column aliasing to display
lastname, firstname in a column entitled name.

I tried the following syntax, but it's not working:

select rosterid, lastname+', '+firstname as name
from table
order by name

This results in a 2 column table with the headings "ROSTERID" and
"NAME". However, NAME contains th last name only, rather than "lastname,
firstname".

Any help greatly appreciated.

Thanks,
Google Jeny

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!One thing worth looking at is not using reserved words such as Name.
You need to change this to something different.

R

Google Jenny <michiamo@.yahoo.com> wrote in message news:<412cfc29$0$14430$c397aba@.news.newsgroups.ws>...
> Hi,
> Here is my original query:
> select rosterid, lastname, firstname from table
> order by lastname
>
> I would like to use column aliasing to display
> lastname, firstname in a column entitled name.
> I tried the following syntax, but it's not working:
> select rosterid, lastname+', '+firstname as name
> from table
> order by name
> This results in a 2 column table with the headings "ROSTERID" and
> "NAME". However, NAME contains th last name only, rather than "lastname,
> firstname".
> Any help greatly appreciated.
> Thanks,
> Google Jeny
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Google Jenny <michiamo@.yahoo.com> wrote in message news:<412cfc29$0$14430$c397aba@.news.newsgroups.ws>...
> Hi,
> Here is my original query:
> select rosterid, lastname, firstname from table
> order by lastname
>
> I would like to use column aliasing to display
> lastname, firstname in a column entitled name.
> I tried the following syntax, but it's not working:
> select rosterid, lastname+', '+firstname as name
> from table
> order by name
> This results in a 2 column table with the headings "ROSTERID" and
> "NAME". However, NAME contains th last name only, rather than "lastname,
> firstname".
> Any help greatly appreciated.
> Thanks,
> Google Jeny
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

This query works for me in pubs:

select au_id, au_lname + ', ' + au_fname as 'name'
from authors
order by 'name'

Perhaps you could post your CREATE TABLE statement and some sample data?

Simon|||You may want to add the following as well to remove any additional
spaces in the name fields:

select rosterid, rtrim(lastname) +', ' + rtrim(firstname) as Name
from table|||Thanks so much. The rtrim did the trick.

Google Jenny

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Aliasing columns for a DMX subquery

I require the column of a nested table (KOL s) as part of the output of my DMX query, which needs to be written out to a relational table. Hence, I flatten the <select_list> of the SELECT DMX query as below:

SELECT FLATTENED

([Speciality].[SPECIALITY ID]) as [Speciality_Id],

(0) as [Bool_NameInAuthors],

(0) as [Bool_EmailInAbstract],

(0) as [Bool_AffiliationInAbstract],

(SELECT ([KOL ID]) as [Id], ([FIRST NAME]) as [FirstName], ([MIDDLE NAME]) as [MiddleName], ([LAST NAME]) as [LastName], ([AFFILIATION]) as [Affiliation], ([EMAILADDRESS]) as [EmailAddress] FROM [Speciality].[KO Ls]),

(SELECT ([Speciality Term DESCRIPTION]) as [Term] FROM [Speciality].[SPECIALITYTERMS]) AS Spec

From

[Speciality]

PREDICTION JOIN

OPENQUERY([ETL Profiler DB],

'SELECT

[SPECIALITY_ID]

FROM

[dbo].[KOLs]

') AS t

ON

[Speciality].[SPECIALITY ID] = t.[SPECIALITY_ID]

However, this causes the subquery columns (ID, FirstName, ...) to be aliased as Expression.ID, Expression.FirstName...

How do I alias these flattened columns properly?

I tried to alias the subquery to a derived table (as follows), but it just replaces the Expression word by the derived table alias (KOL in this case). So, does not solve my problem.

(SELECT ([KOL ID]) as [Id], ([FIRST NAME]) as [FirstName], ([MIDDLE NAME]) as [MiddleName], ([LAST NAME]) as [LastName], ([AFFILIATION]) as [Affiliation], ([EMAILADDRESS]) as [EmailAddress] FROM [Speciality].[KO Ls]) AS KOL

You can enclose the entire query in another SELECT where you alias the nested table columns -

SELECT [KOL.Id] as KOL_Id, [KOL.FirstName] as KOL_FirstName, ....

FROM

(SELECT FLATTENED ....) AS TT

sql

Aliasing a column name

Hi,
I'm trying to write a SQL event (view or storied proceedure). I have a table that is meant for reporting....the data is arranged verticle. I deal in Fiscal Years ie 2006/2007, 2007/2008, ect. The table in question has generic column lables ie FY1, FY2. I'm writing a report off the table and I want to dynamically turn FY1 into the current FiscalYear, FY2 into current FiscalYear + 1. I tried:

SELECT dbo.tblBudgetConfig.CurrentBudgetYear, dbo.tblBudgetProjectedCurrent.FY4 AS Left ([dbo.tblbudgetConfig.CurrentBudgetYear],4)+3 & "/" & Right([dbo.tblbudgetConfig.CurrentBudgetYear],4)+3
FROM dbo.tblBudgetConfig INNER JOIN
dbo.tblBudgetProjectedCurrent ON dbo.tblBudgetConfig.CurrentBudgetYear = dbo.tblBudgetProjectedCurrent.CurrentBudgetYear

But SQL squawks everytime I try this and tells me that there is something a miss near 'Left'.

Any help will be appreciated.

Nope, you cannot dynamically alias columns. Columns are part of the definition of the query and have to be there at the end of compile phase, not execution. To do this you would need to use dynamic SQL like EXEC ('query string'). You would have to build up the AS in a prior query .

A couple of things to note:

& does not work in SQL. You have to use + for concatenation (and you have to cast everything to the proper datatype_

"value" does not mean a literal, it means a column name. Use single quotes 'value'

Consider using the user interface to manage such things. This wouldn't be likely possible query anyhow because the data could change row by row, so you could then have a variable column name (it may not in your case, but SQL doesn't know that.) Instead of using the column names, add a column named fiscal year and store your value in there. Then let the UI put it in the right places and make it look all pretty for the user.

|||

AFAIK, you can′t compose the Aliases on the fly.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||Thanks for your help. Its not the answer I was hoping for but what you are saying does make sense. And thanks for the t-sql tips too. I am really new at this so any help is appreciated.

Aliasing a column name

Hi,
I'm trying to write a SQL event (view or storied proceedure). I have a table that is meant for reporting....the data is arranged verticle. I deal in Fiscal Years ie 2006/2007, 2007/2008, ect. The table in question has generic column lables ie FY1, FY2. I'm writing a report off the table and I want to dynamically turn FY1 into the current FiscalYear, FY2 into current FiscalYear + 1. I tried:

SELECT dbo.tblBudgetConfig.CurrentBudgetYear, dbo.tblBudgetProjectedCurrent.FY4 AS Left ([dbo.tblbudgetConfig.CurrentBudgetYear],4)+3 & "/" & Right([dbo.tblbudgetConfig.CurrentBudgetYear],4)+3
FROM dbo.tblBudgetConfig INNER JOIN
dbo.tblBudgetProjectedCurrent ON dbo.tblBudgetConfig.CurrentBudgetYear = dbo.tblBudgetProjectedCurrent.CurrentBudgetYear

But SQL squawks everytime I try this and tells me that there is something a miss near 'Left'.

Any help will be appreciated.

Nope, you cannot dynamically alias columns. Columns are part of the definition of the query and have to be there at the end of compile phase, not execution. To do this you would need to use dynamic SQL like EXEC ('query string'). You would have to build up the AS in a prior query .

A couple of things to note:

& does not work in SQL. You have to use + for concatenation (and you have to cast everything to the proper datatype_

"value" does not mean a literal, it means a column name. Use single quotes 'value'

Consider using the user interface to manage such things. This wouldn't be likely possible query anyhow because the data could change row by row, so you could then have a variable column name (it may not in your case, but SQL doesn't know that.) Instead of using the column names, add a column named fiscal year and store your value in there. Then let the UI put it in the right places and make it look all pretty for the user.

|||

AFAIK, you can′t compose the Aliases on the fly.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||Thanks for your help. Its not the answer I was hoping for but what you are saying does make sense. And thanks for the t-sql tips too. I am really new at this so any help is appreciated.

Aliases not found on log in

When loggining into SSMS there does not appear to be a way to connect to the
ALIAS remote servers names like you could with SQL Server 2000. Does any one
know how to use the Alias names at the SQL Server 2005 connection dialog?D. Haber (DHaber@.discussions.microsoft.com) writes:
> When loggining into SSMS there does not appear to be a way to connect to
> the ALIAS remote servers names like you could with SQL Server 2000. Does
> any one know how to use the Alias names at the SQL Server 2005
> connection dialog?
What aliases? Those you defined in the Client Network Utility? I guess you
need to use the SQL Configuration Manager to set up aliaes for the SQL 2005
tools. It's under SQL Native Client configuration, which is a little
misleading, but I did a very quick test, and it seemed to work.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Aliases & Columns Name w/ Spaces

Formatting question. The query below is failing on the columns with spaces in the name. I've tried brackets and single quotes with no luck. How should this be formatted?

-

SELECT x.trkuniq, s.mstuniq, t.meetuniq,
c.coursec AS Course_Code,
c.descript AS Course_Name,
[q.cactus #] AS Cactus_#
s.sectionn AS Section,
RTRIM(f.lastname) + ', ' + RTRIM(f.firstname) AS Teacher, f.funiq,
t.termc AS Term_Code, zd.cycldayc AS Day,
zp.periodc AS Period, zp.periodn,
p.schoolc AS School
FROM mstmeet t INNER JOIN
mstsched s ON t.mstuniq = s.mstuniq INNER JOIN
trkcrs x ON s.trkcrsuniq = x.trkcrsuniq INNER JOIN
course c ON x.crsuniq = c.crsuniq INNER JOIN
track p ON p.trkuniq = x.trkuniq INNER JOIN
facdemo f ON s.funiq = f.funiq INNER JOIN
courses q ON c.coursec = [q.course number] INNER JOIN
trkper zp ON t.periodn = zp.periodn AND
x.trkuniq = zp.trkuniq INNER JOIN
trkcycle zd ON t.cycldayn = zd.cycldayn AND
x.trkuniq = zd.trkuniq

Kinny:

Try changing your reference from [q.cactus #] to q.[cactus #]

Dave

|||

The brackets are use to encapsulate a name of a table, schema, etc, not the entire messed up name :)

You can even include dots in the name:

create table [dbo].[bad.idea]
(
[bad.idea.id] int
)

select *
from [bad.idea]

And yes, very very bad idea.

Aliases

I need to know where an alias is stored. I am new to SQL and need to
be sure I am able to recover from a server failure with all components
and jobs intact.
Thanks, JohnIn the registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MS
SQLServer\Client\ConnectTo
-Sue
On 30 Mar 2004 14:38:55 -0800, news13579@.hotmail.com
(Needing help as usual) wrote:

>I need to know where an alias is stored. I am new to SQL and need to
>be sure I am able to recover from a server failure with all components
>and jobs intact.
>Thanks, Johnsql

Aliases

I need to know where an alias is stored. I am new to SQL and need to
be sure I am able to recover from a server failure with all components
and jobs intact.
Thanks, John
In the registry under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\ Client\ConnectTo
-Sue
On 30 Mar 2004 14:38:55 -0800, news13579@.hotmail.com
(Needing help as usual) wrote:

>I need to know where an alias is stored. I am new to SQL and need to
>be sure I am able to recover from a server failure with all components
>and jobs intact.
>Thanks, John

Aliased column in stored procedure not seen by datagrid

i have an aliased column in an sql statement that works fine when
displaying its output in a datagrid, but when I transfer the sql
statement into a stored procedure , the datagrid can't see it. I get an
error "{"DataBinder.Eval: 'System.Data.DataRowView' does not contain a
property with the name myaliasedcolumn." }Hi

You may want to post the DDL for this. If you are using exactly the same SQL
Statement then it should be the same. You may want make sure that you SET
NOCOUNT ON at the start of the procedure.

John

".Net Sports" <ballz2wall@.cox.net> wrote in message
news:1126914453.889098.79790@.g47g2000cwa.googlegro ups.com...
>i have an aliased column in an sql statement that works fine when
> displaying its output in a datagrid, but when I transfer the sql
> statement into a stored procedure , the datagrid can't see it. I get an
> error "{"DataBinder.Eval: 'System.Data.DataRowView' does not contain a
> property with the name myaliasedcolumn." }

Aliased Column and Where Clauses

I want to use an aliased field with a where caluse as below

select member_ID,
CASE
WHEN (status_id & (16 | 128)) = (16 | 128) OR (status_id & 16 ) = 0
THEN CAST(1 AS bit) ELSE CAST(0 AS bit)
END AS IsMigrated
FROM member
LEFT OUTER JOIN language ON language.language_id = member.country_id
WHERE language = 'Deutsch'
-- AND IsMigrated = 1

However i keep getting "Invalid column name 'IsMigrated'" when i uncomment the AND IsMigrated = 1 line.

That construct is not available in TSQL; you will need to either need to convert that into a function or "spell it out fully" in the where clause.

Here are a few past threads that had related discussions:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=89097&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1137002&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=803299&SiteID=1

|||

You could try using a derived table, see below.

Chris

Code Snippet

SELECT t.member_ID,

t.IsMigrated

FROM (

SELECT member_ID,

CASE WHEN (status_id & (16 | 128)) = (16 | 128)

OR (status_id & 16) = 0 THEN CAST(1 AS BIT)

ELSE CAST(0 AS BIT)

END AS IsMigrated

FROM member

LEFT OUTER JOIN language ON language.language_id = member.country_id

WHERE language = 'Deutsch'

) t

WHERE t.IsMigrated = 1

|||

The data behind an 'aliased' column is not known by that alias during the data retreival. You cannot use an 'aliased' column name in the SELECT, JOIN conditions, or WHERE criteria of a query.

However, since the data from the query is 'pulled' into a derived table and then sorted, the derived table will know the 'aliased' data by the column name aliases, and you can use the alias in the ORDER BY

|||

I just keep running into this one...

A question to the developement team of SQL: is there any reason why this hasn't been implemented?

The simplest implementation would be to sunbstitue any reference to a derived column with it's definition, by doing a search & replace on the code before feeding it to the interpreter. I can't figure out why it would be difficult to implement or how it would break existing code.

Simple thing like

Col1+Col2 as Sub1,

col3 + col4 as Sub2,

Sub1 + Sub2 as Total

Shouldn't be too hard for the interpreter to figure out? (Access can do it...)

Also something like

select Col1 + '.' + Col2 as Concat,

... bla bla

Group by Concat

Order by Concat

This would really help to keep your 'eye on the ball' instead of on the technical implementation. It would also help maintainability.

So..... next CTP of Katmai it is then? ;-)

Regards,

Gert-Jan

|||

Post your suggestions at:

Suggestions for SQL Server

http://connect.microsoft.com/sqlserver

Aliased Column and Where Clauses

I want to use an aliased field with a where caluse as below

select member_ID,
CASE
WHEN (status_id & (16 | 128)) = (16 | 128) OR (status_id & 16 ) = 0
THEN CAST(1 AS bit) ELSE CAST(0 AS bit)
END AS IsMigrated
FROM member
LEFT OUTER JOIN language ON language.language_id = member.country_id
WHERE language = 'Deutsch'
-- AND IsMigrated = 1

However i keep getting "Invalid column name 'IsMigrated'" when i uncomment the AND IsMigrated = 1 line.

That construct is not available in TSQL; you will need to either need to convert that into a function or "spell it out fully" in the where clause.

Here are a few past threads that had related discussions:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=89097&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1137002&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=803299&SiteID=1

|||

You could try using a derived table, see below.

Chris

Code Snippet

SELECT t.member_ID,

t.IsMigrated

FROM (

SELECT member_ID,

CASE WHEN (status_id & (16 | 128)) = (16 | 128)

OR (status_id & 16) = 0 THEN CAST(1 AS BIT)

ELSE CAST(0 AS BIT)

END AS IsMigrated

FROM member

LEFT OUTER JOIN language ON language.language_id = member.country_id

WHERE language = 'Deutsch'

) t

WHERE t.IsMigrated = 1

|||

The data behind an 'aliased' column is not known by that alias during the data retreival. You cannot use an 'aliased' column name in the SELECT, JOIN conditions, or WHERE criteria of a query.

However, since the data from the query is 'pulled' into a derived table and then sorted, the derived table will know the 'aliased' data by the column name aliases, and you can use the alias in the ORDER BY

|||

I just keep running into this one...

A question to the developement team of SQL: is there any reason why this hasn't been implemented?

The simplest implementation would be to sunbstitue any reference to a derived column with it's definition, by doing a search & replace on the code before feeding it to the interpreter. I can't figure out why it would be difficult to implement or how it would break existing code.

Simple thing like

Col1+Col2 as Sub1,

col3 + col4 as Sub2,

Sub1 + Sub2 as Total

Shouldn't be too hard for the interpreter to figure out? (Access can do it...)

Also something like

select Col1 + '.' + Col2 as Concat,

... bla bla

Group by Concat

Order by Concat

This would really help to keep your 'eye on the ball' instead of on the technical implementation. It would also help maintainability.

So..... next CTP of Katmai it is then? ;-)

Regards,

Gert-Jan

|||

Post your suggestions at:

Suggestions for SQL Server

http://connect.microsoft.com/sqlserver

Alias with XP

Why is it necessary to create an alias in the Client Network Utility to be able to connect to SQL Server if you are running Windows XP?To clarify a little, it seems it is only necessary in XP. We don't have to create an alias when the client is running NT or 2000, only XP. Also, if the network connection goes down, we occasionally lose the alias and have to re-create it. Any ideas?sql