http://coldfusion.com logo
Join Slack
Powered by
# sql
  • r

    Randy L. Smith

    04/19/2023, 5:29 PM
    Also, I have used some diagramming and dictionary tools in the past, but it's been a while. Favorites, anyone?
    r
    • 2
    • 1
  • c

    chris_hopkins

    04/20/2023, 8:58 AM
    main issue i find with views in views in sql server anywho is when you alter one in the chain you need to call refresh view to make the next one in the chain pick up the changes. and when they are 5 views deep you have to do that in the correct order and its annoying
  • s

    s1deburn

    04/20/2023, 12:05 PM
    depends on the DB engine, i know oracle handles views very differently, so you may see multiple views chained for performance reasons or to leverage the oracle specific view behavior, which i think is pretty neat
    c
    c
    • 3
    • 3
  • b

    byron70

    04/28/2023, 9:11 PM
    Has anyone ever seen a case where a computed column in MS Sql looses it's value when cfoutput. It should be a 2, but the dump and output is showing as 0.
    a
    r
    • 3
    • 29
  • z

    zackster

    05/14/2023, 12:38 PM
    anyone tried this out? https://twitter.com/hnasr/status/1657569218609684480 https://github.com/0xShamil/ulid4j
    a
    a
    • 3
    • 5
  • j

    John Wilson

    05/17/2023, 6:46 PM
    Can someone tell me how to create a datasource to connect to an MSSQL instance that is not the default?
    dbaseServer\DEMO
    , for example? When using this in Lucee, the instance name is ignored.
    t
    • 2
    • 4
  • s

    Simone

    06/19/2023, 4:55 PM
    how can i format this date in sql to show it properly including if there is any timezone 2023-06-19T151016.381+00:00 using sql server 2014
    z
    a
    • 3
    • 12
  • z

    zackster

    09/14/2023, 3:26 PM
    https://www.postgresql.org/about/news/postgresql-16-released-2715/
    💥 2
  • d

    davla

    09/29/2023, 8:15 AM
    Has anyone upgraded an AWS RDS mySQL database from v5.7 to v8? Or even just switched from 5.7 to 8. Any pain points I should be aware of? I need to move some legacy applications as 5.7 is reaching end of support.
  • w

    websolete

    10/09/2023, 2:53 PM
    anyone know offhand if there is a TSQL function similar to COALESCE but instead of it returning the first non-null value it returns the largest value in the series?
    r
    p
    • 3
    • 5
  • w

    websolete

    10/23/2023, 5:29 PM
    sql server, is it possible to determine how much storage a particular column in a table is consuming (rather than the table as a whole)?
    p
    s
    • 3
    • 5
  • g

    gsr

    12/01/2023, 2:50 AM
    i am trying to check against the datetime of my table
    select * from schedule where TRIM(gameTime)  = "2023-11-14 00:00:00"
    and my column gameTime is
    gameTime	datetime	YES
  • g

    gsr

    12/01/2023, 2:50 AM
    i am using Mysql 5
  • g

    gsr

    12/01/2023, 2:50 AM
    it has one row but it is retuning me no rows
  • g

    gavinbaumanis

    12/01/2023, 5:57 AM
    You don't need to trim a datetime type. What is returned when you leave out the WHERE?
    select * from schedule;
    And as a test you can use BETWEEN
    select * from schedule where gameTime between 'xxx' AND 'yyy';
    Actually I might have just worked it out... What results do you get if you use single-quotes instead of double-quotes? Double quotes is used a column name in mySQL
    select * from schedule where TRIM(gameTime)  = '2023-11-14 00:00:00'
    You can avoid that problem by using
    cfqueryparam
    for all items that appear in a WHERE / GROUP By etc.
  • b

    Brian

    02/08/2024, 7:31 PM
    I have an application where I'm reading in a data set from a flat file, parsing it, and storing it into a set of four tables in SQL Server db. It should replace the data that's already there and I won't know how much is the same or different. What I'd like to do at the start of the process is to back up the current db data into a set of duplicate tables, clear the main tables, then process the new data. I want to do this because I don't know if my new data will process successfully or not and want to be able restore the original data, if needed. Because of the relationships between tables, my original strategy of copying the data table by table became rather convoluted. Then I tried SELECT INTO, but my code doesn't currently have permission to drop the old backup tables before creating the new ones from the main ones. I can probably get the permissions for the test db without too much problem, but the acceptance and production dbs might be more challenging. How do other people create backups in cases like this?
    w
    s
    • 3
    • 10
  • s

    shawnoden

    02/13/2024, 12:14 PM
    At a minimum, you'd need ALTER TABLE permissions for that user. And that one could still be a pretty big security risk. So your DBA may not want to give it to the CF user that runs most of your other queries. You may need to make this a special user.
  • s

    shawnoden

    02/13/2024, 12:14 PM
    https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql?view=sql-server-ver16#permissions
    b
    • 2
    • 1
  • s

    shawnoden

    02/13/2024, 12:14 PM
    What version of SQL Server?
  • g

    gsr

    02/28/2024, 3:22 PM
    is there java jar based or exex tool for creating ERD diagram, as small utility type should be good, because i plan to bundle it in a custom tag and wrap it inside a folder to execute
    a
    • 2
    • 4
  • e

    ehoffman

    03/04/2024, 4:50 PM
    I have a somewhat generic question; our platform is in AWS; client DB in Azure and as an enterprise, want to keep it there. So we are being asked about our platform in AWS calling Azure DB directly for certain data. Anyone have experience to share? I immediately think about latency issues, etc but maybe there something I am not considering....
    • 1
    • 1
  • s

    Scott Stroz

    04/16/2024, 3:37 PM
    I have a problem that is causing my hair to go gray(er). I am storing an array of data in a column that is
    varchar(max)
    . This data can be very large (an array of base64 encoded images). On my local dev environment, I can retrieve this data without issue. However, on the staging server, the data in this column gets truncated at 64,000 characters. I have verified that CLOB is enabled for the data source (oddly enough, the CLOB buffer is higher than 64,000 bytes). I am using Cf 2021, and the DB is SQL Server. Has anyone ever seen issues like that and can point me toward a solution?
    c
    • 2
    • 15
  • d

    Dave Merrill

    05/01/2024, 1:17 PM
    Is there a way to comment out a block of code in SSMS that uses this syntax: /* this is commented out */ The toolbar buttons don't do that, they prepend two hyphens to each line. If there is a way, does it have a keyboard shortcut? This has bugged me for years, and my googling didn't find anything that actually works. Thanks.
    d
    x
    • 3
    • 7
  • r

    Ryan Albrecht

    06/11/2024, 7:45 PM
    Does anyone know if sql server 2014 and sql server 2022 handles
    NULL
    differently when inserting to an identity column?
    r
    • 2
    • 2
  • d

    Daniel Mejia

    07/12/2024, 11:54 PM
    what database services have the "easy" button? sign up, create db, create table, get connection string?
    s
    a
    +2
    • 5
    • 11
  • d

    Daniel Mejia

    08/17/2024, 1:59 AM
    @Daniel Mejia has left the channel
  • t

    Travis

    09/23/2024, 8:55 PM
    Is anyone using the Lucee MariaDB Extension, and if so, can anyone help me with a Null Pointer Exception I'm getting with a query that should be working? I've tried versions 3.0.7 through 3.3.1
    Copy code
    var q = new query();
    		q.setDatasource( getDSN('Aug') );
    		q.addParam( name = "empID", value = "#empID#", cfsqltype = "varchar" );
    		q.setSQL("
    			SELECT gusIndex
    			FROM gblUsers
    			WHERE lower(gusEmployeeID) = lower(:empID)
    		");
    		var r = q.execute();
    NPE at q.execute();
    b
    g
    • 3
    • 16
  • n

    Narges Navidi

    10/01/2024, 10:34 PM
    @Narges Navidi has left the channel
  • b

    Brian

    05/07/2025, 2:48 PM
    Let's liven up this channel a bit. One of our database people is telling me I need to upgrade my SSIS packages to 2022. I've found a bunch of articles on the subject, but none of them seem to coincide with what I'm seeing. I'm trying to use Virtual Studio Community and the SSIS Package Upgrade Wizard appears to be installed, but I can't find anywhere in Studio to launch it. Does anyone have an experience with this?
    t
    • 2
    • 1
  • z

    zackster

    05/07/2025, 10:36 PM
    https://pganalyze.com/blog/postgres-18-async-io
    👍 1