Showing posts with label ill. Show all posts
Showing posts with label ill. Show all posts

Wednesday, March 28, 2012

Help with sql

Hi,
This might be a simple one .. I have a table with two fields (There are more
but Ill concentrate on this ones).
One field is 'address', the other is 'address2', both are nvarchar
If I want to select both into another table but 'concatenate them' how can I
do this ?
At the moment this is what I have
Select address, address2
into table2
from table1
How can I have something like
Select address + address2 as BIGaddress
into table2
from table1
AleksYour statement seems to be ok...or I haven't understood your question...
Select address + address2 as BIGaddress
into table2
from table1
Francesco Anti
"Aleks" <arkark2004@.hotmail.com> wrote in message
news:%23vZHbeDbFHA.3328@.TK2MSFTNGP10.phx.gbl...
> Hi,
> This might be a simple one .. I have a table with two fields (There are
> more but Ill concentrate on this ones).
> One field is 'address', the other is 'address2', both are nvarchar
> If I want to select both into another table but 'concatenate them' how can
> I do this ?
> At the moment this is what I have
> Select address, address2
> into table2
> from table1
> How can I have something like
> Select address + address2 as BIGaddress
> into table2
> from table1
> Aleks
>|||What you have should work fine
Select address + address2 as BIGaddress
into table2
from table1
The SELECT INTO will create a new table called table2 with one column called
BIGaddress
If table2 already exists then change the SELECT INTO into an INSERT
"Aleks" <arkark2004@.hotmail.com> wrote in message
news:#vZHbeDbFHA.3328@.TK2MSFTNGP10.phx.gbl...
> Hi,
> This might be a simple one .. I have a table with two fields (There are
more
> but Ill concentrate on this ones).
> One field is 'address', the other is 'address2', both are nvarchar
> If I want to select both into another table but 'concatenate them' how can
I
> do this ?
> At the moment this is what I have
> Select address, address2
> into table2
> from table1
> How can I have something like
> Select address + address2 as BIGaddress
> into table2
> from table1
> Aleks
>|||The query which you have given will work Right ?
Regards,
Peri
"Aleks" <arkark2004@.hotmail.com> wrote in message
news:#vZHbeDbFHA.3328@.TK2MSFTNGP10.phx.gbl...
> Hi,
> This might be a simple one .. I have a table with two fields (There are
more
> but Ill concentrate on this ones).
> One field is 'address', the other is 'address2', both are nvarchar
> If I want to select both into another table but 'concatenate them' how can
I
> do this ?
> At the moment this is what I have
> Select address, address2
> into table2
> from table1
> How can I have something like
> Select address + address2 as BIGaddress
> into table2
> from table1
> Aleks
>|||Just watch out for two things:
1. If either address or address2 is NULL, the concatenation will be NULL.
You can use this instead: coalesce(address,N'') + coalesce(address2,N'')
2. If address+address2 exceeds 4000 characters, you will lose information.
Steve Kass
Drew University
Aleks wrote:

>Hi,
>This might be a simple one .. I have a table with two fields (There are mor
e
>but Ill concentrate on this ones).
>One field is 'address', the other is 'address2', both are nvarchar
>If I want to select both into another table but 'concatenate them' how can
I
>do this ?
>At the moment this is what I have
>Select address, address2
>into table2
>from table1
>How can I have something like
>Select address + address2 as BIGaddress
>into table2
>from table1
>Aleks
>
>|||Jaja .. I didnt even tested and worked fine ... how silly
A
"Steve Kass" <skass@.drew.edu> wrote in message
news:u27rGxDbFHA.2440@.TK2MSFTNGP10.phx.gbl...
> Just watch out for two things:
> 1. If either address or address2 is NULL, the concatenation will be NULL.
> You can use this instead: coalesce(address,N'') + coalesce(address2,N'')
> 2. If address+address2 exceeds 4000 characters, you will lose information.
> Steve Kass
> Drew University
>
> Aleks wrote:
>

Monday, February 27, 2012

Help with MSDE 1.0

Hi everyone!
First I'll expose my problem: I have a crashed disk which I believe had MSDE
1.0 installed (MSSQL7 folder). I had no problems recovering the databases
from backups but there was some DTS's that obviously were in msdb database.
I have the .mdf and .ldf files and I also have a backup but the problem is
that I can't find any disk with that version nor download from Internet, the
version is not available from microsoft downloads anymore. I tried to
recover it with MSDE 2 Release A, but if I try to upload the backup it says
that it was created with other version, and if I just overwrite the msf file
it goes to "suspect" state.
Now, I have two petitions :
1.- Can anybody point me to a place where I can download MSDE 1.0 o tell me
one software app has it included ?
2.- Does somebody know any workaround to recover this data using MSDE 2 Rel
A?
Thanks in advance
Eduardo Martinez O.
Chief of Information Systems
Industria Envasadora de Queretaro, S.A. de C.V.
hi Eduardo,
"Eduardo Martinez" <eduardom@.nospamieqsa.com.mx> ha scritto nel
messaggio news:OCyWNNV2EHA.1192@.tk2msftngp13.phx.gbl
> Hi everyone!
> First I'll expose my problem: I have a crashed disk which I believe
> had MSDE
> 1.0 installed (MSSQL7 folder). I had no problems recovering the
> databases from backups but there was some DTS's that obviously were
> in msdb database. I have the .mdf and .ldf files and I also have a
> backup but the problem is that I can't find any disk with that
> version nor download from Internet, the version is not available from
> microsoft downloads anymore. I tried to recover it with MSDE 2
> Release A, but if I try to upload the backup it says that it was
> created with other version, and if I just overwrite the msf file it
> goes to "suspect" state.
> Now, I have two petitions :
> 1.- Can anybody point me to a place where I can download MSDE 1.0 o
> tell me one software app has it included ?
> 2.- Does somebody know any workaround to recover this data using MSDE
> 2 Rel A?
>
1) don't know how much legal...
http://www.blackberry.net/support/downloads/msde.shtml ... I do think (some
or all) Office 2000 (editions) should contain MSDE 1.0 too...
2) unfortunately not, as msdb database of 7.0 code base can not be restored
on 2000 versions...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.9.1 - DbaMgr ver 0.55.1
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks a lot, I downloaded from the page you told. I'll just use it to
restore mi backup and send the dts to the new disk.
Eduardo Martinez O.