Forum Replies Created

Viewing 15 posts - 7,186 through 7,200 (of 13,460 total)

  • RE: export all table to excel with header using bcp

    if you have to do this via bcp and not SSIS, then there are two ways that i can think of.

    one exports a global temp table, and the other uses...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: How to Encrypt the communication between SQL Server and the Webserver. My Application uses SQL Server authentication to connect to MSSQL.

    i'm very eak on this, never implemented it, but i thought there was a "Force Encyption" property on the server that could do that; otherwise it's an optional client connection...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: index on view

    a view is just a stored SQL statement. it gets run or rerun on demand whenever you select from it.

    if you think about how indexes work, you can't put an...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: View with 2 fields combined

    yep that's what i figured; my model that i posted last will do what you are asking, but of course you have to adapt it.

    I don't think you ever posted...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Need to paste long SQL statement into variable

    in SSMS, you just put everything between single quotes, lines and all: you might need to find and replace single quotes with two single quotes

    DECLARE @sql varchar(max)

    set @sql = '

    CREATE...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Problem loading Excel files: Mixed types changed to NULL, even with IMEX=1

    there's afew posts out there that describe how the driver scans the first 8 rows to determine the data type;usually you can set the extended property "IMEX" of provider to...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error while storing results of sp_spaceused in a new table.

    do a PRINT @sql before you EXEC(@sql); that gives you the statement so you can run it independantly;

    look at the costruction in the middle where you inserted EXECUTE:

    ...EXECUTE USE ......

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Help with VERY slow update

    check your join criteria as well... any chance something could be invalid, like JOIN Table2 T2 t1.ID = t1.ID (when it should be t1.id = t2.id?)

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Login Failure

    since this is express, can you find the link to SSMS and right click...run as administrator? does that get you in so you can disable the trigger?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Login Failure

    Logon failed for login [server name/instance] due to trigger execution.

    that says right there that A logon trigger has been put on the server and it is specifically rolling back your...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error while storing results of sp_spaceused in a new table.

    ahh i see it:

    you need EXEC in there: can just have the proc name.,

    ...unused]) EXECUTE '+ @db_name+'..sp_spaceused ...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error while storing results of sp_spaceused in a new table.

    what you pasted was missing a lot...the table1 definition, three variables and more.

    i think your insert needs to be inside the @sql variable.

    SET @sql = ' insert into [master].[dbo].[Table_MetaData]([name],[rows],[reserved],[data],[index_sze],[unused]) '+...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: View with 2 fields combined

    ok, to do that, i think you'll just want to wrap a grouping query , and join that to the original table...

    it might look scary, but it's one way...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: will any one help

    just break it down into it's peices:

    SELECT

    NEWID(),--returns a varchar-ish something like D93D157E-3749-4A26-8410-859B237CE7FF

    CHECKSUM(NEWID()), --returns a bigint like 1339413509 or -1323543251

    ABS(CHECKSUM(NEWID())), --makes sure it's positive like 1585842432

    RAND(CHECKSUM(NEWID())) --returns a value between...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Way to find the deleted database

    you could try using the built in Schema Changes Report in SSMS;

    instead of a specific database, right click ont he server itself and browse to schema changes history

    look for the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 7,186 through 7,200 (of 13,460 total)