Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Wednesday, March 28, 2012

Link table from another database?

Recently moved on SQL Server 2000.
Looks like I saw somewhere, but can't find now if can link the table from
another database on the same SQL Server 2000.
Also if it's possible, then question is if possible to link table from
another remote
SQL Server 2000, and from another version of SQL, from SQL Server 6.5 for
example.
Regards,
Michael
If the tables both reside on the same instance of SQL Server there is no
need to define a linked server. Just use three parts of the four-part
naming convention:
SELECT a.Col1, b.Col2
FROM DBName.Owner.TableName a
JOIN DBName.Owner.TableName b
ON a.Col1 = b.Col1
If they reside on seperate instances, you can define a linked server (see
Books Online for full information)
and reference the tables the same way except use
LinkedServerName.DBName.Owner.TableName
"MichaelK" <michaelk@.gomobile.com> wrote in message
news:uv6WgHWKEHA.2452@.TK2MSFTNGP09.phx.gbl...
> Recently moved on SQL Server 2000.
> Looks like I saw somewhere, but can't find now if can link the table from
> another database on the same SQL Server 2000.
> Also if it's possible, then question is if possible to link table from
> another remote
> SQL Server 2000, and from another version of SQL, from SQL Server 6.5 for
> example.
> Regards,
> Michael
>

Monday, March 19, 2012

Line Feed in Text Box on rdl file

I am triyng to add a line feed char to my DB string which is assigned to a
text box, cant figure out how.
Line One"\n"Line Twotry appending a char(10) at the end of the string.
Ex:
print 'abcd'+char(10)+'efgh'
or
print 'abcd'+char(13)+'efgh'
"Adi" wrote:

> I am triyng to add a line feed char to my DB string which is assigned to a
> text box, cant figure out how.
> Line One"\n"Line Two|||Maybe use both. Most windows apps look for a Carriage Return and a Line
Feed together.
print 'abcd'+char(13)+char(10)+'efgh'
However, is this post even in the right forum? Are you trying to do this in
SQL Server, in VB.Net, Javascript?
"tthrone" <tthrone@.discussions.microsoft.com> wrote in message
news:D577C263-F691-4AE3-B7BD-6219F1F90B94@.microsoft.com...
> try appending a char(10) at the end of the string.
> Ex:
> print 'abcd'+char(10)+'efgh'
> or
> print 'abcd'+char(13)+'efgh'
> "Adi" wrote:
>
a

Monday, February 20, 2012

Limit string lengh

There is a way to limit the length in characters returned by but I cant find what it is.

As an example, returning only the first 20 characters of a field.

Any help would be greatly appreciated.

You can either SUBSTRING or LEFT string functions in your case to get what you want. For example,

SELECTLEFT(yourcolumn, 20)AS col20_1,SUBSTRING(yourcolumn,1,20)as co20_2 FROM yourtable

You can find more string function from this link.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_fa-fz_7oqb.asp

Limno

|||Thank you!